diff --git a/src/ManagedServiceIdentity/Az.ManagedServiceIdentity.format.ps1xml b/src/ManagedServiceIdentity/Az.ManagedServiceIdentity.format.ps1xml index 202e85fc8e09..dbfce948bc09 100644 --- a/src/ManagedServiceIdentity/Az.ManagedServiceIdentity.format.ps1xml +++ b/src/ManagedServiceIdentity/Az.ManagedServiceIdentity.format.ps1xml @@ -47,6 +47,546 @@ + + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.ProxyResourceAutoGenerated + + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.ProxyResourceAutoGenerated + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Name + + + SystemDataCreatedAt + + + SystemDataCreatedBy + + + SystemDataCreatedByType + + + SystemDataLastModifiedAt + + + SystemDataLastModifiedBy + + + SystemDataLastModifiedByType + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.Resource + + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.Resource + + + + + + + + + + + + Name + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.SystemData + + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.SystemData + + + + + + + + + + + + + + + + + + + + + + + + + + + CreatedAt + + + CreatedBy + + + CreatedByType + + + LastModifiedAt + + + LastModifiedBy + + + LastModifiedByType + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.TrackedResource + + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.TrackedResource + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Name + + + SystemDataCreatedAt + + + SystemDataCreatedBy + + + SystemDataCreatedByType + + + SystemDataLastModifiedAt + + + SystemDataLastModifiedBy + + + SystemDataLastModifiedByType + + + Location + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.CloudErrorBody + + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.CloudErrorBody + + + + + + + + + + + + + + + + + + Code + + + Message + + + Target + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.FederatedIdentityCredential + + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.FederatedIdentityCredential + + + + + + + + + + + + + + + + + + + + + Name + + + Issuer + + + Subject + + + Audience + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.FederatedIdentityCredentialsListResult + + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.FederatedIdentityCredentialsListResult + + + + + + + + + + + + NextLink + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.Identity + + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.Identity + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Location + + + Name + + + SystemDataCreatedAt + + + SystemDataCreatedBy + + + SystemDataCreatedByType + + + SystemDataLastModifiedAt + + + SystemDataLastModifiedBy + + + SystemDataLastModifiedByType + + + ResourceGroupName + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IdentityUpdate + + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IdentityUpdate + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Name + + + SystemDataCreatedAt + + + SystemDataCreatedBy + + + SystemDataCreatedByType + + + SystemDataLastModifiedAt + + + SystemDataLastModifiedBy + + + SystemDataLastModifiedByType + + + Location + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.OperationListResult + + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.OperationListResult + + + + + + + + + + + + NextLink + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.SystemAssignedIdentity + + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.SystemAssignedIdentity + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Name + + + SystemDataCreatedAt + + + SystemDataCreatedBy + + + SystemDataCreatedByType + + + SystemDataLastModifiedAt + + + SystemDataLastModifiedBy + + + SystemDataLastModifiedByType + + + Location + + + ResourceGroupName + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.UserAssignedIdentitiesListResult + + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.UserAssignedIdentitiesListResult + + + + + + + + + + + + NextLink + + + + + + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.ProxyResource @@ -70,9 +610,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.Resource + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.ResourceAutoGenerated - Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.Resource + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.ResourceAutoGenerated @@ -92,9 +632,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.TrackedResource + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.TrackedResourceAutoGenerated - Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.TrackedResource + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.TrackedResourceAutoGenerated @@ -216,9 +756,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.CloudErrorBody + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.CloudErrorBodyAutoGenerated - Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.CloudErrorBody + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.CloudErrorBodyAutoGenerated @@ -250,9 +790,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.FederatedIdentityCredential + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.FederatedIdentityCredentialAutoGenerated - Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.FederatedIdentityCredential + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.FederatedIdentityCredentialAutoGenerated @@ -260,13 +800,7 @@ - - - - - - - + @@ -276,13 +810,7 @@ Name - Issuer - - - Subject - - - Audience + ResourceGroupName @@ -324,9 +852,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.FederatedIdentityCredentialsListResult + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.FederatedIdentityCredentialsListResultAutoGenerated - Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.FederatedIdentityCredentialsListResult + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.FederatedIdentityCredentialsListResultAutoGenerated @@ -346,9 +874,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.Identity + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IdentityAutoGenerated - Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.Identity + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IdentityAutoGenerated @@ -380,9 +908,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IdentityUpdate + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IdentityUpdateAutoGenerated - Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IdentityUpdate + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IdentityUpdateAutoGenerated @@ -492,9 +1020,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.OperationListResult + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.OperationListResultAutoGenerated - Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.OperationListResult + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.OperationListResultAutoGenerated @@ -514,9 +1042,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.SystemAssignedIdentity + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.SystemAssignedIdentityAutoGenerated - Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.SystemAssignedIdentity + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.SystemAssignedIdentityAutoGenerated @@ -610,9 +1138,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.UserAssignedIdentitiesListResult + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.UserAssignedIdentitiesListResultAutoGenerated - Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.UserAssignedIdentitiesListResult + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.UserAssignedIdentitiesListResultAutoGenerated diff --git a/src/ManagedServiceIdentity/Az.ManagedServiceIdentity.psd1 b/src/ManagedServiceIdentity/Az.ManagedServiceIdentity.psd1 index 712c7d3e82b6..2dd9e2eea817 100644 --- a/src/ManagedServiceIdentity/Az.ManagedServiceIdentity.psd1 +++ b/src/ManagedServiceIdentity/Az.ManagedServiceIdentity.psd1 @@ -3,7 +3,7 @@ # # Generated by: Microsoft Corporation # -# Generated on: 10/20/2022 +# Generated on: 2/17/2023 # @{ @@ -114,13 +114,7 @@ PrivateData = @{ # IconUri = '' # ReleaseNotes of this module - ReleaseNotes = '* Supported Create/Get/Update/Remove Federated Identity Credentials on a User Assigned Managed Identity - * ''Get-AzFederatedIdentityCredentials'' - * ''New-AzFederatedIdentityCredentials'' - * ''Remove-AzFederatedIdentityCredentials'' - * ''Update-AzFederatedIdentityCredentials'' -* Supported List Associated Resources on a User Assigned Managed Identity - * ''Get-AzUserAssignedIdentityAssociatedResource''' + # ReleaseNotes = '' # Prerelease string of this module # Prerelease = '' diff --git a/src/ManagedServiceIdentity/Az.ManagedServiceIdentity.psm1 b/src/ManagedServiceIdentity/Az.ManagedServiceIdentity.psm1 index 0acbb172d9d9..68b2357d93f5 100644 --- a/src/ManagedServiceIdentity/Az.ManagedServiceIdentity.psm1 +++ b/src/ManagedServiceIdentity/Az.ManagedServiceIdentity.psm1 @@ -33,7 +33,7 @@ } if(-not $accountsModule) { - Write-Error "`nThis module requires $accountsName version 2.7.5 or greater. For installation instructions, please see: https://learn.microsoft.com/powershell/azure/install-az-ps" -ErrorAction Stop + Write-Error "`nThis module requires $accountsName version 2.7.5 or greater. For installation instructions, please see: https://docs.microsoft.com/powershell/azure/install-az-ps" -ErrorAction Stop } elseif (($accountsModule.Version -lt [System.Version]'2.7.5') -and (-not $localAccounts)) { Write-Error "`nThis module requires $accountsName version 2.7.5 or greater. An earlier version of Az.Accounts is imported in the current PowerShell session. If you are running test, please try to add the switch '-RegenerateSupportModule' when executing 'test-module.ps1'. Otherwise please open a new PowerShell session and import this module again.`nAdditionally, this error could indicate that multiple incompatible versions of Azure PowerShell modules are installed on your system. For troubleshooting information, please see: https://aka.ms/azps-version-error" -ErrorAction Stop } diff --git a/src/ManagedServiceIdentity/Changelog.md b/src/ManagedServiceIdentity/Changelog.md index eb132e23f0ba..d14454b8881b 100644 --- a/src/ManagedServiceIdentity/Changelog.md +++ b/src/ManagedServiceIdentity/Changelog.md @@ -18,6 +18,8 @@ - Additional information about change #1 --> ## Upcoming Release +* Upgraded to API version 2023-01-31. +* Federated identity credentials GA version is available now. ## Version 1.1.0 * Supported Create/Get/Update/Remove Federated Identity Credentials on a User Assigned Managed Identity diff --git a/src/ManagedServiceIdentity/ManagedServiceIdentity.sln b/src/ManagedServiceIdentity/ManagedServiceIdentity.sln index 95693c142b5c..9d9ef62d9419 100644 --- a/src/ManagedServiceIdentity/ManagedServiceIdentity.sln +++ b/src/ManagedServiceIdentity/ManagedServiceIdentity.sln @@ -1,104 +1,58 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.6.30114.105 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Accounts", "..\Accounts\Accounts\Accounts.csproj", "{546F39B2-DE97-4A6A-B1CE-20717365B355}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Accounts", "..\Accounts\Accounts\Accounts.csproj", "{76381DF9-AD5E-4F66-AC3F-5FCFD8E2F040}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Authentication", "..\Accounts\Authentication\Authentication.csproj", "{2BEEAE17-FFED-4D01-819C-998D94953F37}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AssemblyLoading", "..\Accounts\AssemblyLoading\AssemblyLoading.csproj", "{67810F89-508E-471A-B97C-2B221A525887}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Authentication.ResourceManager", "..\Accounts\Authentication.ResourceManager\Authentication.ResourceManager.csproj", "{E675828F-0AF0-4D10-8663-21B9D0D1FE01}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Authentication", "..\Accounts\Authentication\Authentication.csproj", "{41AEC1D1-C3D0-4E76-9A55-5B3D37DB7364}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AuthenticationAssemblyLoadContext", "..\Accounts\AuthenticationAssemblyLoadContext\AuthenticationAssemblyLoadContext.csproj", "{80854D19-8126-46E3-A78C-4989CEE0E556}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Authentication.ResourceManager", "..\Accounts\Authentication.ResourceManager\Authentication.ResourceManager.csproj", "{AD0BE072-966B-4B2A-AF9C-B34E54D4F48A}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Authenticators", "..\Accounts\Authenticators\Authenticators.csproj", "{99FF5124-F7AF-46AA-9735-0CF00CFEF5C2}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AuthenticationAssemblyLoadContext", "..\Accounts\AuthenticationAssemblyLoadContext\AuthenticationAssemblyLoadContext.csproj", "{A979A5D7-BA66-4587-9592-5E44D0403011}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Az.ManagedServiceIdentity", "Az.ManagedServiceIdentity.csproj", "{E579A17A-9473-4506-9C46-252051A92717}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Authenticators", "..\Accounts\Authenticators\Authenticators.csproj", "{3CF96A41-1040-4E87-B2E6-367E769D47A9}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Az.ManagedServiceIdentity", "Az.ManagedServiceIdentity.csproj", "{1D33E8C7-6DCE-47F7-A7B4-39DA6F84D55C}" 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 - Release|x64 = Release|x64 - Release|x86 = Release|x86 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {546F39B2-DE97-4A6A-B1CE-20717365B355}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {546F39B2-DE97-4A6A-B1CE-20717365B355}.Debug|Any CPU.Build.0 = Debug|Any CPU - {546F39B2-DE97-4A6A-B1CE-20717365B355}.Debug|x64.ActiveCfg = Debug|Any CPU - {546F39B2-DE97-4A6A-B1CE-20717365B355}.Debug|x64.Build.0 = Debug|Any CPU - {546F39B2-DE97-4A6A-B1CE-20717365B355}.Debug|x86.ActiveCfg = Debug|Any CPU - {546F39B2-DE97-4A6A-B1CE-20717365B355}.Debug|x86.Build.0 = Debug|Any CPU - {546F39B2-DE97-4A6A-B1CE-20717365B355}.Release|Any CPU.ActiveCfg = Release|Any CPU - {546F39B2-DE97-4A6A-B1CE-20717365B355}.Release|Any CPU.Build.0 = Release|Any CPU - {546F39B2-DE97-4A6A-B1CE-20717365B355}.Release|x64.ActiveCfg = Release|Any CPU - {546F39B2-DE97-4A6A-B1CE-20717365B355}.Release|x64.Build.0 = Release|Any CPU - {546F39B2-DE97-4A6A-B1CE-20717365B355}.Release|x86.ActiveCfg = Release|Any CPU - {546F39B2-DE97-4A6A-B1CE-20717365B355}.Release|x86.Build.0 = Release|Any CPU - {2BEEAE17-FFED-4D01-819C-998D94953F37}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {2BEEAE17-FFED-4D01-819C-998D94953F37}.Debug|Any CPU.Build.0 = Debug|Any CPU - {2BEEAE17-FFED-4D01-819C-998D94953F37}.Debug|x64.ActiveCfg = Debug|Any CPU - {2BEEAE17-FFED-4D01-819C-998D94953F37}.Debug|x64.Build.0 = Debug|Any CPU - {2BEEAE17-FFED-4D01-819C-998D94953F37}.Debug|x86.ActiveCfg = Debug|Any CPU - {2BEEAE17-FFED-4D01-819C-998D94953F37}.Debug|x86.Build.0 = Debug|Any CPU - {2BEEAE17-FFED-4D01-819C-998D94953F37}.Release|Any CPU.ActiveCfg = Release|Any CPU - {2BEEAE17-FFED-4D01-819C-998D94953F37}.Release|Any CPU.Build.0 = Release|Any CPU - {2BEEAE17-FFED-4D01-819C-998D94953F37}.Release|x64.ActiveCfg = Release|Any CPU - {2BEEAE17-FFED-4D01-819C-998D94953F37}.Release|x64.Build.0 = Release|Any CPU - {2BEEAE17-FFED-4D01-819C-998D94953F37}.Release|x86.ActiveCfg = Release|Any CPU - {2BEEAE17-FFED-4D01-819C-998D94953F37}.Release|x86.Build.0 = Release|Any CPU - {E675828F-0AF0-4D10-8663-21B9D0D1FE01}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {E675828F-0AF0-4D10-8663-21B9D0D1FE01}.Debug|Any CPU.Build.0 = Debug|Any CPU - {E675828F-0AF0-4D10-8663-21B9D0D1FE01}.Debug|x64.ActiveCfg = Debug|Any CPU - {E675828F-0AF0-4D10-8663-21B9D0D1FE01}.Debug|x64.Build.0 = Debug|Any CPU - {E675828F-0AF0-4D10-8663-21B9D0D1FE01}.Debug|x86.ActiveCfg = Debug|Any CPU - {E675828F-0AF0-4D10-8663-21B9D0D1FE01}.Debug|x86.Build.0 = Debug|Any CPU - {E675828F-0AF0-4D10-8663-21B9D0D1FE01}.Release|Any CPU.ActiveCfg = Release|Any CPU - {E675828F-0AF0-4D10-8663-21B9D0D1FE01}.Release|Any CPU.Build.0 = Release|Any CPU - {E675828F-0AF0-4D10-8663-21B9D0D1FE01}.Release|x64.ActiveCfg = Release|Any CPU - {E675828F-0AF0-4D10-8663-21B9D0D1FE01}.Release|x64.Build.0 = Release|Any CPU - {E675828F-0AF0-4D10-8663-21B9D0D1FE01}.Release|x86.ActiveCfg = Release|Any CPU - {E675828F-0AF0-4D10-8663-21B9D0D1FE01}.Release|x86.Build.0 = Release|Any CPU - {80854D19-8126-46E3-A78C-4989CEE0E556}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {80854D19-8126-46E3-A78C-4989CEE0E556}.Debug|Any CPU.Build.0 = Debug|Any CPU - {80854D19-8126-46E3-A78C-4989CEE0E556}.Debug|x64.ActiveCfg = Debug|Any CPU - {80854D19-8126-46E3-A78C-4989CEE0E556}.Debug|x64.Build.0 = Debug|Any CPU - {80854D19-8126-46E3-A78C-4989CEE0E556}.Debug|x86.ActiveCfg = Debug|Any CPU - {80854D19-8126-46E3-A78C-4989CEE0E556}.Debug|x86.Build.0 = Debug|Any CPU - {80854D19-8126-46E3-A78C-4989CEE0E556}.Release|Any CPU.ActiveCfg = Release|Any CPU - {80854D19-8126-46E3-A78C-4989CEE0E556}.Release|Any CPU.Build.0 = Release|Any CPU - {80854D19-8126-46E3-A78C-4989CEE0E556}.Release|x64.ActiveCfg = Release|Any CPU - {80854D19-8126-46E3-A78C-4989CEE0E556}.Release|x64.Build.0 = Release|Any CPU - {80854D19-8126-46E3-A78C-4989CEE0E556}.Release|x86.ActiveCfg = Release|Any CPU - {80854D19-8126-46E3-A78C-4989CEE0E556}.Release|x86.Build.0 = Release|Any CPU - {99FF5124-F7AF-46AA-9735-0CF00CFEF5C2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {99FF5124-F7AF-46AA-9735-0CF00CFEF5C2}.Debug|Any CPU.Build.0 = Debug|Any CPU - {99FF5124-F7AF-46AA-9735-0CF00CFEF5C2}.Debug|x64.ActiveCfg = Debug|Any CPU - {99FF5124-F7AF-46AA-9735-0CF00CFEF5C2}.Debug|x64.Build.0 = Debug|Any CPU - {99FF5124-F7AF-46AA-9735-0CF00CFEF5C2}.Debug|x86.ActiveCfg = Debug|Any CPU - {99FF5124-F7AF-46AA-9735-0CF00CFEF5C2}.Debug|x86.Build.0 = Debug|Any CPU - {99FF5124-F7AF-46AA-9735-0CF00CFEF5C2}.Release|Any CPU.ActiveCfg = Release|Any CPU - {99FF5124-F7AF-46AA-9735-0CF00CFEF5C2}.Release|Any CPU.Build.0 = Release|Any CPU - {99FF5124-F7AF-46AA-9735-0CF00CFEF5C2}.Release|x64.ActiveCfg = Release|Any CPU - {99FF5124-F7AF-46AA-9735-0CF00CFEF5C2}.Release|x64.Build.0 = Release|Any CPU - {99FF5124-F7AF-46AA-9735-0CF00CFEF5C2}.Release|x86.ActiveCfg = Release|Any CPU - {99FF5124-F7AF-46AA-9735-0CF00CFEF5C2}.Release|x86.Build.0 = Release|Any CPU - {E579A17A-9473-4506-9C46-252051A92717}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {E579A17A-9473-4506-9C46-252051A92717}.Debug|Any CPU.Build.0 = Debug|Any CPU - {E579A17A-9473-4506-9C46-252051A92717}.Debug|x64.ActiveCfg = Debug|Any CPU - {E579A17A-9473-4506-9C46-252051A92717}.Debug|x64.Build.0 = Debug|Any CPU - {E579A17A-9473-4506-9C46-252051A92717}.Debug|x86.ActiveCfg = Debug|Any CPU - {E579A17A-9473-4506-9C46-252051A92717}.Debug|x86.Build.0 = Debug|Any CPU - {E579A17A-9473-4506-9C46-252051A92717}.Release|Any CPU.ActiveCfg = Release|Any CPU - {E579A17A-9473-4506-9C46-252051A92717}.Release|Any CPU.Build.0 = Release|Any CPU - {E579A17A-9473-4506-9C46-252051A92717}.Release|x64.ActiveCfg = Release|Any CPU - {E579A17A-9473-4506-9C46-252051A92717}.Release|x64.Build.0 = Release|Any CPU - {E579A17A-9473-4506-9C46-252051A92717}.Release|x86.ActiveCfg = Release|Any CPU - {E579A17A-9473-4506-9C46-252051A92717}.Release|x86.Build.0 = Release|Any CPU + {76381DF9-AD5E-4F66-AC3F-5FCFD8E2F040}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {76381DF9-AD5E-4F66-AC3F-5FCFD8E2F040}.Debug|Any CPU.Build.0 = Debug|Any CPU + {76381DF9-AD5E-4F66-AC3F-5FCFD8E2F040}.Release|Any CPU.ActiveCfg = Release|Any CPU + {76381DF9-AD5E-4F66-AC3F-5FCFD8E2F040}.Release|Any CPU.Build.0 = Release|Any CPU + {67810F89-508E-471A-B97C-2B221A525887}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {67810F89-508E-471A-B97C-2B221A525887}.Debug|Any CPU.Build.0 = Debug|Any CPU + {67810F89-508E-471A-B97C-2B221A525887}.Release|Any CPU.ActiveCfg = Release|Any CPU + {67810F89-508E-471A-B97C-2B221A525887}.Release|Any CPU.Build.0 = Release|Any CPU + {41AEC1D1-C3D0-4E76-9A55-5B3D37DB7364}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {41AEC1D1-C3D0-4E76-9A55-5B3D37DB7364}.Debug|Any CPU.Build.0 = Debug|Any CPU + {41AEC1D1-C3D0-4E76-9A55-5B3D37DB7364}.Release|Any CPU.ActiveCfg = Release|Any CPU + {41AEC1D1-C3D0-4E76-9A55-5B3D37DB7364}.Release|Any CPU.Build.0 = Release|Any CPU + {AD0BE072-966B-4B2A-AF9C-B34E54D4F48A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {AD0BE072-966B-4B2A-AF9C-B34E54D4F48A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {AD0BE072-966B-4B2A-AF9C-B34E54D4F48A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {AD0BE072-966B-4B2A-AF9C-B34E54D4F48A}.Release|Any CPU.Build.0 = Release|Any CPU + {A979A5D7-BA66-4587-9592-5E44D0403011}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A979A5D7-BA66-4587-9592-5E44D0403011}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A979A5D7-BA66-4587-9592-5E44D0403011}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A979A5D7-BA66-4587-9592-5E44D0403011}.Release|Any CPU.Build.0 = Release|Any CPU + {3CF96A41-1040-4E87-B2E6-367E769D47A9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3CF96A41-1040-4E87-B2E6-367E769D47A9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3CF96A41-1040-4E87-B2E6-367E769D47A9}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3CF96A41-1040-4E87-B2E6-367E769D47A9}.Release|Any CPU.Build.0 = Release|Any CPU + {1D33E8C7-6DCE-47F7-A7B4-39DA6F84D55C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1D33E8C7-6DCE-47F7-A7B4-39DA6F84D55C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1D33E8C7-6DCE-47F7-A7B4-39DA6F84D55C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1D33E8C7-6DCE-47F7-A7B4-39DA6F84D55C}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection EndGlobal diff --git a/src/ManagedServiceIdentity/README.md b/src/ManagedServiceIdentity/README.md index f3b8491a41f4..e34eec4c6087 100644 --- a/src/ManagedServiceIdentity/README.md +++ b/src/ManagedServiceIdentity/README.md @@ -34,13 +34,14 @@ branch: main require: - $(this-folder)/../readme.azure.noprofile.md input-file: + - $(repo)/specification/msi/resource-manager/Microsoft.ManagedIdentity/stable/2023-01-31/ManagedIdentity.json - $(repo)/specification/msi/resource-manager/Microsoft.ManagedIdentity/preview/2022-01-31-preview/ManagedIdentity.json subject-prefix: "" resourcegroup-append: true nested-object-to-string: true identity-correction-for-post: true -module-version: 0.2.0 +module-version: 0.3.0 directive: - where: @@ -65,7 +66,7 @@ directive: set: parameter-name: Name - # Associated Resources + # Associated Resources use 2022-01-31-preview API version - where: subject: UserAssignedIdentityAssociatedResource @@ -78,6 +79,8 @@ directive: set: preview-message: This is a preview version of the Associated Resources feature. + # END + # Federated identity credentials - where: @@ -132,8 +135,26 @@ directive: - Subject - Audience + # END + + # Below instructions remove duplicate API methods which use 2022-01-31-preview. MUST be removed when 2022-01-31-preview is removed. + - where: subject: FederatedIdentityCredentials - set: - preview-message: This is a preview version of the Federated Identity Credentials feature. + variant: ^Get1$|^List1$|^GetViaIdentity1$|^Create1$|^CreateExpanded1$|^CreateViaIdentity1$|^CreateViaIdentityExpanded1$|^Delete1$|^DeleteViaIdentity1$|^Update1$|^UpdateExpanded1$|^UpdateViaIdentity1$|^UpdateViaIdentityExpanded1$ + remove: true + + - where: + verb: Get + subject: SystemAssignedIdentity + variant: ^Get1$|^GetViaIdentity1$ + remove: true + + - where: + subject: UserAssignedIdentity + variant: ^Get1$|^GetViaIdentity1$|^List2$|^List3$|^Create1$|^CreateExpanded1$|^CreateViaIdentity1$|^CreateViaIdentityExpanded1$|^Delete1$|^DeleteViaIdentity1$|^Update1$|^UpdateExpanded1$|^UpdateViaIdentity1$|^UpdateViaIdentityExpanded1$ + remove: true + + # END + ``` diff --git a/src/ManagedServiceIdentity/custom/README.md b/src/ManagedServiceIdentity/custom/README.md index e9c93e1b132c..28e8dbbeb447 100644 --- a/src/ManagedServiceIdentity/custom/README.md +++ b/src/ManagedServiceIdentity/custom/README.md @@ -32,7 +32,7 @@ These provide functionality to our HTTP pipeline and other useful features. In s ### Attributes For processing the cmdlets, we've created some additional attributes: - `Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.DescriptionAttribute` - - Used in C# cmdlets to provide a high-level description of the cmdlet. This is propagated to reference documentation via [help comments](https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_comment_based_help) in the exported scripts. + - Used in C# cmdlets to provide a high-level description of the cmdlet. This is propagated to reference documentation via [help comments](https://docs.microsoft.com/powershell/module/microsoft.powershell.core/about/about_comment_based_help) in the exported scripts. - `Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.DoNotExportAttribute` - Used in C# and script cmdlets to suppress creating an exported cmdlet at build-time. These cmdlets will *not be exposed* by `Az.ManagedServiceIdentity`. - `Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.InternalExportAttribute` diff --git a/src/ManagedServiceIdentity/exports/Get-AzFederatedIdentityCredentials.ps1 b/src/ManagedServiceIdentity/exports/Get-AzFederatedIdentityCredentials.ps1 index f89f77f10c61..0dfe250eac41 100644 --- a/src/ManagedServiceIdentity/exports/Get-AzFederatedIdentityCredentials.ps1 +++ b/src/ManagedServiceIdentity/exports/Get-AzFederatedIdentityCredentials.ps1 @@ -31,7 +31,7 @@ New-AzFederatedIdentityCredentials -ResourceGroupName azure-rg-test -IdentityNam .Inputs Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.IManagedServiceIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredential +Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IFederatedIdentityCredential .Notes COMPLEX PARAMETER PROPERTIES @@ -48,7 +48,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.managedserviceidentity/get-azfederatedidentitycredentials #> function Get-AzFederatedIdentityCredentials { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredential])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IFederatedIdentityCredential])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] @@ -68,7 +68,8 @@ param( [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Category('Path')] [System.String] - # The name of the Resource Group to which the identity belongs. + # The name of the resource group. + # The name is case insensitive. ${ResourceGroupName}, [Parameter(ParameterSetName='Get')] diff --git a/src/ManagedServiceIdentity/exports/Get-AzSystemAssignedIdentity.ps1 b/src/ManagedServiceIdentity/exports/Get-AzSystemAssignedIdentity.ps1 index a99c4d7e5b92..44a1d4da136a 100644 --- a/src/ManagedServiceIdentity/exports/Get-AzSystemAssignedIdentity.ps1 +++ b/src/ManagedServiceIdentity/exports/Get-AzSystemAssignedIdentity.ps1 @@ -23,12 +23,12 @@ Gets the systemAssignedIdentity available under the specified RP scope. Get-AzSystemAssignedIdentity -Scope "/subscriptions/00000000-0000-0000-00000000000/resourcegroups/lucas-rg-test/providers/Microsoft.Web/sites/functionportal01" .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ISystemAssignedIdentity +Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ISystemAssignedIdentity .Link https://learn.microsoft.com/powershell/module/az.managedserviceidentity/get-azsystemassignedidentity #> function Get-AzSystemAssignedIdentity { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ISystemAssignedIdentity])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ISystemAssignedIdentity])] [CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] param( [Parameter(Mandatory)] diff --git a/src/ManagedServiceIdentity/exports/Get-AzUserAssignedIdentity.ps1 b/src/ManagedServiceIdentity/exports/Get-AzUserAssignedIdentity.ps1 index 97528349d726..ec947222bf4f 100644 --- a/src/ManagedServiceIdentity/exports/Get-AzUserAssignedIdentity.ps1 +++ b/src/ManagedServiceIdentity/exports/Get-AzUserAssignedIdentity.ps1 @@ -32,7 +32,7 @@ New-AzUserAssignedIdentity -ResourceGroupName azure-rg-test -Name uai-pwsh01 -Lo .Inputs Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.IManagedServiceIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentity +Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IIdentity .Notes COMPLEX PARAMETER PROPERTIES @@ -49,7 +49,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.managedserviceidentity/get-azuserassignedidentity #> function Get-AzUserAssignedIdentity { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentity])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IIdentity])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] diff --git a/src/ManagedServiceIdentity/exports/New-AzFederatedIdentityCredentials.ps1 b/src/ManagedServiceIdentity/exports/New-AzFederatedIdentityCredentials.ps1 index b2a0139a14ea..060ab5f310e0 100644 --- a/src/ManagedServiceIdentity/exports/New-AzFederatedIdentityCredentials.ps1 +++ b/src/ManagedServiceIdentity/exports/New-AzFederatedIdentityCredentials.ps1 @@ -28,12 +28,12 @@ New-AzFederatedIdentityCredentials -ResourceGroupName azure-rg-test -IdentityNam -Audience @("api://AzureADTokenExchange-Modified") .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredential +Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IFederatedIdentityCredential .Link https://learn.microsoft.com/powershell/module/az.managedserviceidentity/new-azfederatedidentitycredentials #> function New-AzFederatedIdentityCredentials { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredential])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IFederatedIdentityCredential])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -51,7 +51,8 @@ param( [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Category('Path')] [System.String] - # The name of the Resource Group to which the identity belongs. + # The name of the resource group. + # The name is case insensitive. ${ResourceGroupName}, [Parameter()] diff --git a/src/ManagedServiceIdentity/exports/New-AzUserAssignedIdentity.ps1 b/src/ManagedServiceIdentity/exports/New-AzUserAssignedIdentity.ps1 index 6d617617354d..6ff75a9cf191 100644 --- a/src/ManagedServiceIdentity/exports/New-AzUserAssignedIdentity.ps1 +++ b/src/ManagedServiceIdentity/exports/New-AzUserAssignedIdentity.ps1 @@ -23,12 +23,12 @@ Create or update an identity in the specified subscription and resource group. New-AzUserAssignedIdentity -ResourceGroupName azure-rg-test -Name uai-pwsh01 -Location eastus .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentity +Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IIdentity .Link https://learn.microsoft.com/powershell/module/az.managedserviceidentity/new-azuserassignedidentity #> function New-AzUserAssignedIdentity { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentity])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IIdentity])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] diff --git a/src/ManagedServiceIdentity/exports/ProxyCmdletDefinitions.ps1 b/src/ManagedServiceIdentity/exports/ProxyCmdletDefinitions.ps1 index c5765d38b34f..9c3d93a939ef 100644 --- a/src/ManagedServiceIdentity/exports/ProxyCmdletDefinitions.ps1 +++ b/src/ManagedServiceIdentity/exports/ProxyCmdletDefinitions.ps1 @@ -31,7 +31,7 @@ New-AzFederatedIdentityCredentials -ResourceGroupName azure-rg-test -IdentityNam .Inputs Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.IManagedServiceIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredential +Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IFederatedIdentityCredential .Notes COMPLEX PARAMETER PROPERTIES @@ -48,7 +48,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.managedserviceidentity/get-azfederatedidentitycredentials #> function Get-AzFederatedIdentityCredentials { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredential])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IFederatedIdentityCredential])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] @@ -68,7 +68,8 @@ param( [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Category('Path')] [System.String] - # The name of the Resource Group to which the identity belongs. + # The name of the resource group. + # The name is case insensitive. ${ResourceGroupName}, [Parameter(ParameterSetName='Get')] @@ -235,12 +236,12 @@ Gets the systemAssignedIdentity available under the specified RP scope. Get-AzSystemAssignedIdentity -Scope "/subscriptions/00000000-0000-0000-00000000000/resourcegroups/lucas-rg-test/providers/Microsoft.Web/sites/functionportal01" .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ISystemAssignedIdentity +Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ISystemAssignedIdentity .Link https://learn.microsoft.com/powershell/module/az.managedserviceidentity/get-azsystemassignedidentity #> function Get-AzSystemAssignedIdentity { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ISystemAssignedIdentity])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ISystemAssignedIdentity])] [CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] param( [Parameter(Mandatory)] @@ -585,7 +586,7 @@ New-AzUserAssignedIdentity -ResourceGroupName azure-rg-test -Name uai-pwsh01 -Lo .Inputs Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.IManagedServiceIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentity +Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IIdentity .Notes COMPLEX PARAMETER PROPERTIES @@ -602,7 +603,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.managedserviceidentity/get-azuserassignedidentity #> function Get-AzUserAssignedIdentity { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentity])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IIdentity])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] @@ -776,12 +777,12 @@ New-AzFederatedIdentityCredentials -ResourceGroupName azure-rg-test -IdentityNam -Audience @("api://AzureADTokenExchange-Modified") .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredential +Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IFederatedIdentityCredential .Link https://learn.microsoft.com/powershell/module/az.managedserviceidentity/new-azfederatedidentitycredentials #> function New-AzFederatedIdentityCredentials { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredential])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IFederatedIdentityCredential])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -799,7 +800,8 @@ param( [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Category('Path')] [System.String] - # The name of the Resource Group to which the identity belongs. + # The name of the resource group. + # The name is case insensitive. ${ResourceGroupName}, [Parameter()] @@ -966,12 +968,12 @@ Create or update an identity in the specified subscription and resource group. New-AzUserAssignedIdentity -ResourceGroupName azure-rg-test -Name uai-pwsh01 -Location eastus .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentity +Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IIdentity .Link https://learn.microsoft.com/powershell/module/az.managedserviceidentity/new-azuserassignedidentity #> function New-AzUserAssignedIdentity { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentity])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IIdentity])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -1179,7 +1181,8 @@ param( [Parameter(ParameterSetName='Delete', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Category('Path')] [System.String] - # The name of the Resource Group to which the identity belongs. + # The name of the resource group. + # The name is case insensitive. ${ResourceGroupName}, [Parameter(ParameterSetName='Delete')] @@ -1534,7 +1537,7 @@ Get-AzFederatedIdentityCredentials -ResourceGroupName azure-rg-test -IdentityNam .Inputs Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.IManagedServiceIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredential +Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IFederatedIdentityCredential .Notes COMPLEX PARAMETER PROPERTIES @@ -1551,7 +1554,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.managedserviceidentity/update-azfederatedidentitycredentials #> function Update-AzFederatedIdentityCredentials { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredential])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IFederatedIdentityCredential])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] @@ -1569,7 +1572,8 @@ param( [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Category('Path')] [System.String] - # The name of the Resource Group to which the identity belongs. + # The name of the resource group. + # The name is case insensitive. ${ResourceGroupName}, [Parameter(ParameterSetName='UpdateExpanded')] @@ -1748,7 +1752,7 @@ Get-AzUserAssignedIdentity -ResourceGroupName azure-rg-test -Name uai-pwsh01 | U .Inputs Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.IManagedServiceIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentity +Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IIdentity .Notes COMPLEX PARAMETER PROPERTIES @@ -1765,7 +1769,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.managedserviceidentity/update-azuserassignedidentity #> function Update-AzUserAssignedIdentity { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentity])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IIdentity])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] diff --git a/src/ManagedServiceIdentity/exports/README.md b/src/ManagedServiceIdentity/exports/README.md index 796f5791b302..5ca68aff42a8 100644 --- a/src/ManagedServiceIdentity/exports/README.md +++ b/src/ManagedServiceIdentity/exports/README.md @@ -1,5 +1,5 @@ # Exports -This directory contains the cmdlets *exported by* `Az.ManagedServiceIdentity`. No other cmdlets in this repository are directly exported. What that means is the `Az.ManagedServiceIdentity` module will run [Export-ModuleMember](https://learn.microsoft.com/powershell/module/microsoft.powershell.core/export-modulemember) on the cmldets in this directory. The cmdlets in this directory are generated at **build-time**. Do not put any custom code, files, cmdlets, etc. into this directory. Please use `..\custom` for all custom implementation. +This directory contains the cmdlets *exported by* `Az.ManagedServiceIdentity`. No other cmdlets in this repository are directly exported. What that means is the `Az.ManagedServiceIdentity` module will run [Export-ModuleMember](https://docs.microsoft.com/powershell/module/microsoft.powershell.core/export-modulemember) on the cmldets in this directory. The cmdlets in this directory are generated at **build-time**. Do not put any custom code, files, cmdlets, etc. into this directory. Please use `..\custom` for all custom implementation. ## Info - Modifiable: no diff --git a/src/ManagedServiceIdentity/exports/Remove-AzFederatedIdentityCredentials.ps1 b/src/ManagedServiceIdentity/exports/Remove-AzFederatedIdentityCredentials.ps1 index deb4d5dcf52b..62c8f3dae3c6 100644 --- a/src/ManagedServiceIdentity/exports/Remove-AzFederatedIdentityCredentials.ps1 +++ b/src/ManagedServiceIdentity/exports/Remove-AzFederatedIdentityCredentials.ps1 @@ -62,7 +62,8 @@ param( [Parameter(ParameterSetName='Delete', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Category('Path')] [System.String] - # The name of the Resource Group to which the identity belongs. + # The name of the resource group. + # The name is case insensitive. ${ResourceGroupName}, [Parameter(ParameterSetName='Delete')] diff --git a/src/ManagedServiceIdentity/exports/Update-AzFederatedIdentityCredentials.ps1 b/src/ManagedServiceIdentity/exports/Update-AzFederatedIdentityCredentials.ps1 index c1712d1cee2f..1f8250ddf4ca 100644 --- a/src/ManagedServiceIdentity/exports/Update-AzFederatedIdentityCredentials.ps1 +++ b/src/ManagedServiceIdentity/exports/Update-AzFederatedIdentityCredentials.ps1 @@ -29,7 +29,7 @@ Get-AzFederatedIdentityCredentials -ResourceGroupName azure-rg-test -IdentityNam .Inputs Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.IManagedServiceIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredential +Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IFederatedIdentityCredential .Notes COMPLEX PARAMETER PROPERTIES @@ -46,7 +46,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.managedserviceidentity/update-azfederatedidentitycredentials #> function Update-AzFederatedIdentityCredentials { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredential])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IFederatedIdentityCredential])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] @@ -64,7 +64,8 @@ param( [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Category('Path')] [System.String] - # The name of the Resource Group to which the identity belongs. + # The name of the resource group. + # The name is case insensitive. ${ResourceGroupName}, [Parameter(ParameterSetName='UpdateExpanded')] diff --git a/src/ManagedServiceIdentity/exports/Update-AzUserAssignedIdentity.ps1 b/src/ManagedServiceIdentity/exports/Update-AzUserAssignedIdentity.ps1 index 648e4290294e..4defcb20189c 100644 --- a/src/ManagedServiceIdentity/exports/Update-AzUserAssignedIdentity.ps1 +++ b/src/ManagedServiceIdentity/exports/Update-AzUserAssignedIdentity.ps1 @@ -27,7 +27,7 @@ Get-AzUserAssignedIdentity -ResourceGroupName azure-rg-test -Name uai-pwsh01 | U .Inputs Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.IManagedServiceIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentity +Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IIdentity .Notes COMPLEX PARAMETER PROPERTIES @@ -44,7 +44,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.managedserviceidentity/update-azuserassignedidentity #> function Update-AzUserAssignedIdentity { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentity])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IIdentity])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] diff --git a/src/ManagedServiceIdentity/generate-info.json b/src/ManagedServiceIdentity/generate-info.json index 68a77cd41acd..dee5ef6c6c80 100644 --- a/src/ManagedServiceIdentity/generate-info.json +++ b/src/ManagedServiceIdentity/generate-info.json @@ -1,8 +1,8 @@ { - "swagger_commit": "8d9e22058eb70f4d20baf1f0594b22f76f957c96", + "swagger_commit": "28c34aa8fa4298e2ad22a868410b0c50128fdd28", "node": "v14.15.5", "autorest": "`-- (empty)", - "autorest_core": "3.9.3", + "autorest_core": "3.9.4", "autorest_modelerfour": "4.15.414", - "autorest_powershell": "3.0.0" + "autorest_powershell": "3.0.498" } diff --git a/src/ManagedServiceIdentity/generated/api/ManagedServiceIdentityClient.cs b/src/ManagedServiceIdentity/generated/api/ManagedServiceIdentityClient.cs index 848903896d0a..8ad2973bb37c 100644 --- a/src/ManagedServiceIdentity/generated/api/ManagedServiceIdentityClient.cs +++ b/src/ManagedServiceIdentity/generated/api/ManagedServiceIdentityClient.cs @@ -14,6 +14,60 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity public partial class ManagedServiceIdentityClient { + /// + /// Create or update a federated identity credential under the specified user assigned identity. + /// + /// The Id of the Subscription to which the identity belongs. + /// The name of the resource group. The name is case insensitive. + /// The name of the identity resource. + /// The name of the federated identity credential resource. + /// Parameters to create or update the federated identity credential. + /// 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.ManagedServiceIdentity.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 FederatedIdentityCredentialsCreateOrUpdate(string subscriptionId, string resourceGroupName, string resourceName, string federatedIdentityCredentialResourceName, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IFederatedIdentityCredential 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.ManagedServiceIdentity.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-01-31"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ManagedIdentity/userAssignedIdentities/" + + global::System.Uri.EscapeDataString(resourceName) + + "/federatedIdentityCredentials/" + + global::System.Uri.EscapeDataString(federatedIdentityCredentialResourceName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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.ManagedServiceIdentity.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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.ManagedServiceIdentity.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.FederatedIdentityCredentialsCreateOrUpdate_Call(request,onOk,onCreated,onDefault,eventListener,sender); + } + } + /// /// Create or update a federated identity credential under the specified user assigned identity. /// @@ -31,7 +85,7 @@ public partial class ManagedServiceIdentityClient /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task FederatedIdentityCredentialsCreateOrUpdate(string subscriptionId, string resourceGroupName, string resourceName, string federatedIdentityCredentialResourceName, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredential 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.ManagedServiceIdentity.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task FederatedIdentityCredentialsCreateOrUpdate1(string subscriptionId, string resourceGroupName, string resourceName, string federatedIdentityCredentialResourceName, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredentialAutoGenerated 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.ManagedServiceIdentity.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.ISendAsync sender) { var apiVersion = @"2022-01-31-preview"; // Constant Parameters @@ -64,7 +118,7 @@ public partial class ManagedServiceIdentityClient request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.FederatedIdentityCredentialsCreateOrUpdate_Call(request,onOk,onCreated,onDefault,eventListener,sender); + await this.FederatedIdentityCredentialsCreateOrUpdate1_Call(request,onOk,onCreated,onDefault,eventListener,sender); } } @@ -82,7 +136,7 @@ public partial class ManagedServiceIdentityClient /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task FederatedIdentityCredentialsCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredential 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.ManagedServiceIdentity.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task FederatedIdentityCredentialsCreateOrUpdate1ViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredentialAutoGenerated 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.ManagedServiceIdentity.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.ISendAsync sender) { var apiVersion = @"2022-01-31-preview"; // Constant Parameters @@ -128,12 +182,12 @@ public partial class ManagedServiceIdentityClient request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.FederatedIdentityCredentialsCreateOrUpdate_Call(request,onOk,onCreated,onDefault,eventListener,sender); + await this.FederatedIdentityCredentialsCreateOrUpdate1_Call(request,onOk,onCreated,onDefault,eventListener,sender); } } /// - /// Actual wire call for method. + /// Actual wire call for method. /// /// the prepared HttpRequestMessage to send. /// a delegate that is called when the remote service returns 200 (OK). @@ -145,7 +199,7 @@ public partial class ManagedServiceIdentityClient /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task FederatedIdentityCredentialsCreateOrUpdate_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.ManagedServiceIdentity.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task FederatedIdentityCredentialsCreateOrUpdate1_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.ManagedServiceIdentity.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -163,19 +217,19 @@ public partial class ManagedServiceIdentityClient case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.FederatedIdentityCredential.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.FederatedIdentityCredentialAutoGenerated.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } case global::System.Net.HttpStatusCode.Created: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onCreated(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.FederatedIdentityCredential.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onCreated(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.FederatedIdentityCredentialAutoGenerated.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.CloudErrorAutoGenerated.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -191,7 +245,7 @@ public partial class ManagedServiceIdentityClient } /// - /// Validation method for method. Call this like the actual call, + /// Validation method for method. Call this like the actual call, /// but you will get validation events back. /// /// The Id of the Subscription to which the identity belongs. @@ -203,7 +257,7 @@ public partial class ManagedServiceIdentityClient /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task FederatedIdentityCredentialsCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string resourceName, string federatedIdentityCredentialResourceName, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredential body, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task FederatedIdentityCredentialsCreateOrUpdate1_Validate(string subscriptionId, string resourceGroupName, string resourceName, string federatedIdentityCredentialResourceName, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredentialAutoGenerated body, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -216,57 +270,13 @@ public partial class ManagedServiceIdentityClient } } - /// Deletes the federated identity credential. - /// The Id of the Subscription to which the identity belongs. - /// The name of the Resource Group to which the identity belongs. - /// The name of the identity resource. - /// The name of the federated identity credential resource. - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns 204 (NoContent). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). - /// an instance that will receive events. - /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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 FederatedIdentityCredentialsDelete(string subscriptionId, string resourceGroupName, string resourceName, string federatedIdentityCredentialResourceName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.ISendAsync sender) - { - var apiVersion = @"2022-01-31-preview"; - // Constant Parameters - using( NoSynchronizationContext ) - { - // construct URL - var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/subscriptions/" - + global::System.Uri.EscapeDataString(subscriptionId) - + "/resourceGroups/" - + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.ManagedIdentity/userAssignedIdentities/" - + global::System.Uri.EscapeDataString(resourceName) - + "/federatedIdentityCredentials/" - + global::System.Uri.EscapeDataString(federatedIdentityCredentialResourceName) - + "?" - + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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.ManagedServiceIdentity.Runtime.Method.Delete, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // make the call - await this.FederatedIdentityCredentialsDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); - } - } - - /// Deletes the federated identity credential. + /// + /// Create or update a federated identity credential under the specified user assigned identity. + /// /// + /// Parameters to create or update the federated identity credential. /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns 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. @@ -274,9 +284,9 @@ public partial class ManagedServiceIdentityClient /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task FederatedIdentityCredentialsDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task FederatedIdentityCredentialsCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IFederatedIdentityCredential 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.ManagedServiceIdentity.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.ISendAsync sender) { - var apiVersion = @"2022-01-31-preview"; + var apiVersion = @"2023-01-31"; // Constant Parameters using( NoSynchronizationContext ) { @@ -311,19 +321,25 @@ public partial class ManagedServiceIdentityClient // 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.ManagedServiceIdentity.Runtime.Method.Delete, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Method.Put, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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.ManagedServiceIdentity.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.FederatedIdentityCredentialsDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + await this.FederatedIdentityCredentialsCreateOrUpdate_Call(request,onOk,onCreated,onDefault,eventListener,sender); } } - /// Actual wire call for method. + /// + /// Actual wire call for method. + /// /// the prepared HttpRequestMessage to send. /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns 204 (NoContent). + /// 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. @@ -331,7 +347,7 @@ public partial class ManagedServiceIdentityClient /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task FederatedIdentityCredentialsDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task FederatedIdentityCredentialsCreateOrUpdate_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.ManagedServiceIdentity.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -349,19 +365,19 @@ public partial class ManagedServiceIdentityClient case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.FederatedIdentityCredential.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } - case global::System.Net.HttpStatusCode.NoContent: + case global::System.Net.HttpStatusCode.Created: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onNoContent(_response); + await onCreated(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.FederatedIdentityCredential.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -377,34 +393,88 @@ public partial class ManagedServiceIdentityClient } /// - /// 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 Subscription to which the identity belongs. - /// The name of the Resource Group to which the identity belongs. + /// The name of the resource group. The name is case insensitive. /// The name of the identity resource. /// The name of the federated identity credential resource. + /// Parameters to create or update the federated identity credential. /// 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 FederatedIdentityCredentialsDelete_Validate(string subscriptionId, string resourceGroupName, string resourceName, string federatedIdentityCredentialResourceName, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task FederatedIdentityCredentialsCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string resourceName, string federatedIdentityCredentialResourceName, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IFederatedIdentityCredential body, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); await eventListener.AssertNotNull(nameof(resourceName),resourceName); await eventListener.AssertNotNull(nameof(federatedIdentityCredentialResourceName),federatedIdentityCredentialResourceName); + await eventListener.AssertRegEx(nameof(federatedIdentityCredentialResourceName),federatedIdentityCredentialResourceName,@"^[a-zA-Z0-9]{1}[a-zA-Z0-9-_]{2,119}$"); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); } } - /// Gets the federated identity credential. + /// Deletes the federated identity credential. + /// The Id of the Subscription to which the identity belongs. + /// The name of the resource group. The name is case insensitive. + /// The name of the identity resource. + /// The name of the federated identity credential resource. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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 FederatedIdentityCredentialsDelete(string subscriptionId, string resourceGroupName, string resourceName, string federatedIdentityCredentialResourceName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-01-31"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ManagedIdentity/userAssignedIdentities/" + + global::System.Uri.EscapeDataString(resourceName) + + "/federatedIdentityCredentials/" + + global::System.Uri.EscapeDataString(federatedIdentityCredentialResourceName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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.ManagedServiceIdentity.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.FederatedIdentityCredentialsDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + } + } + + /// Deletes the federated identity credential. /// The Id of the Subscription to which the identity belongs. /// The name of the Resource Group to which the identity belongs. /// The name of the identity resource. /// The name of the federated identity credential resource. /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. @@ -412,7 +482,7 @@ public partial class ManagedServiceIdentityClient /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task FederatedIdentityCredentialsGet(string subscriptionId, string resourceGroupName, string resourceName, string federatedIdentityCredentialResourceName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task FederatedIdentityCredentialsDelete1(string subscriptionId, string resourceGroupName, string resourceName, string federatedIdentityCredentialResourceName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.ISendAsync sender) { var apiVersion = @"2022-01-31-preview"; // Constant Parameters @@ -436,18 +506,19 @@ public partial class ManagedServiceIdentityClient // 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.ManagedServiceIdentity.Runtime.Method.Get, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Method.Delete, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.FederatedIdentityCredentialsGet_Call(request,onOk,onDefault,eventListener,sender); + await this.FederatedIdentityCredentialsDelete1_Call(request,onOk,onNoContent,onDefault,eventListener,sender); } } - /// Gets the federated identity credential. + /// Deletes the federated identity credential. /// /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. @@ -455,7 +526,7 @@ public partial class ManagedServiceIdentityClient /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task FederatedIdentityCredentialsGetViaIdentity(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.ManagedServiceIdentity.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task FederatedIdentityCredentialsDelete1ViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.ISendAsync sender) { var apiVersion = @"2022-01-31-preview"; // Constant Parameters @@ -492,18 +563,19 @@ public partial class ManagedServiceIdentityClient // 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.ManagedServiceIdentity.Runtime.Method.Get, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Method.Delete, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.FederatedIdentityCredentialsGet_Call(request,onOk,onDefault,eventListener,sender); + await this.FederatedIdentityCredentialsDelete1_Call(request,onOk,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 200 (OK). + /// 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. @@ -511,7 +583,7 @@ public partial class ManagedServiceIdentityClient /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task FederatedIdentityCredentialsGet_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.ManagedServiceIdentity.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task FederatedIdentityCredentialsDelete1_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -529,13 +601,19 @@ public partial class ManagedServiceIdentityClient case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.FederatedIdentityCredential.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response); + break; + } + case global::System.Net.HttpStatusCode.NoContent: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onNoContent(_response); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.CloudErrorAutoGenerated.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -551,8 +629,8 @@ public partial class ManagedServiceIdentityClient } /// - /// 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 Subscription to which the identity belongs. /// The name of the Resource Group to which the identity belongs. @@ -562,7 +640,7 @@ public partial class ManagedServiceIdentityClient /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task FederatedIdentityCredentialsGet_Validate(string subscriptionId, string resourceGroupName, string resourceName, string federatedIdentityCredentialResourceName, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task FederatedIdentityCredentialsDelete1_Validate(string subscriptionId, string resourceGroupName, string resourceName, string federatedIdentityCredentialResourceName, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -573,17 +651,10 @@ public partial class ManagedServiceIdentityClient } } - /// - /// Lists all the federated identity credentials under the specified user assigned identity. - /// - /// The Id of the Subscription to which the identity belongs. - /// The name of the Resource Group to which the identity belongs. - /// The name of the identity resource. - /// Number of records to return. - /// A skip token is used to continue retrieving items after an operation returns a partial result. - /// If a previous response contains a nextLink element, the value of the nextLink element will include a skipToken parameter - /// that specifies a starting point to use for subsequent calls. + /// Deletes the federated identity credential. + /// /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. @@ -591,26 +662,36 @@ public partial class ManagedServiceIdentityClient /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task FederatedIdentityCredentialsList(string subscriptionId, string resourceGroupName, string resourceName, int? Top, string Skiptoken, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task FederatedIdentityCredentialsDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.ISendAsync sender) { - var apiVersion = @"2022-01-31-preview"; + var apiVersion = @"2023-01-31"; // Constant Parameters using( NoSynchronizationContext ) { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ManagedIdentity/userAssignedIdentities/(?[^/]+)/federatedIdentityCredentials/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{resourceName}/federatedIdentityCredentials/{federatedIdentityCredentialResourceName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var resourceName = _match.Groups["resourceName"].Value; + var federatedIdentityCredentialResourceName = _match.Groups["federatedIdentityCredentialResourceName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" - + global::System.Uri.EscapeDataString(subscriptionId) + + subscriptionId + "/resourceGroups/" - + global::System.Uri.EscapeDataString(resourceGroupName) + + resourceGroupName + "/providers/Microsoft.ManagedIdentity/userAssignedIdentities/" - + global::System.Uri.EscapeDataString(resourceName) - + "/federatedIdentityCredentials" + + resourceName + + "/federatedIdentityCredentials/" + + federatedIdentityCredentialResourceName + "?" - + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString())) - + "&" - + (string.IsNullOrEmpty(Skiptoken) ? global::System.String.Empty : "$skiptoken=" + global::System.Uri.EscapeDataString(Skiptoken)) - + "&" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -618,24 +699,1904 @@ public partial class ManagedServiceIdentityClient // 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.ManagedServiceIdentity.Runtime.Method.Get, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Method.Delete, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.FederatedIdentityCredentialsList_Call(request,onOk,onDefault,eventListener,sender); + await this.FederatedIdentityCredentialsDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); } } - /// - /// Lists all the federated identity credentials under the specified user assigned identity. - /// - /// - /// Number of records to return. - /// A skip token is used to continue retrieving items after an operation returns a partial result. - /// If a previous response contains a nextLink element, the value of the nextLink element will include a skipToken parameter + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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 FederatedIdentityCredentialsDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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.ManagedServiceIdentity.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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.ManagedServiceIdentity.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response); + break; + } + case global::System.Net.HttpStatusCode.NoContent: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onNoContent(_response); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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. + /// + /// The Id of the Subscription to which the identity belongs. + /// The name of the resource group. The name is case insensitive. + /// The name of the identity resource. + /// The name of the federated identity credential resource. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task FederatedIdentityCredentialsDelete_Validate(string subscriptionId, string resourceGroupName, string resourceName, string federatedIdentityCredentialResourceName, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(resourceName),resourceName); + await eventListener.AssertNotNull(nameof(federatedIdentityCredentialResourceName),federatedIdentityCredentialResourceName); + await eventListener.AssertRegEx(nameof(federatedIdentityCredentialResourceName),federatedIdentityCredentialResourceName,@"^[a-zA-Z0-9]{1}[a-zA-Z0-9-_]{2,119}$"); + } + } + + /// Gets the federated identity credential. + /// The Id of the Subscription to which the identity belongs. + /// The name of the resource group. The name is case insensitive. + /// The name of the identity resource. + /// The name of the federated identity credential 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.ManagedServiceIdentity.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 FederatedIdentityCredentialsGet(string subscriptionId, string resourceGroupName, string resourceName, string federatedIdentityCredentialResourceName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-01-31"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ManagedIdentity/userAssignedIdentities/" + + global::System.Uri.EscapeDataString(resourceName) + + "/federatedIdentityCredentials/" + + global::System.Uri.EscapeDataString(federatedIdentityCredentialResourceName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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.ManagedServiceIdentity.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.FederatedIdentityCredentialsGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Gets the federated identity credential. + /// The Id of the Subscription to which the identity belongs. + /// The name of the Resource Group to which the identity belongs. + /// The name of the identity resource. + /// The name of the federated identity credential 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.ManagedServiceIdentity.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 FederatedIdentityCredentialsGet1(string subscriptionId, string resourceGroupName, string resourceName, string federatedIdentityCredentialResourceName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-01-31-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ManagedIdentity/userAssignedIdentities/" + + global::System.Uri.EscapeDataString(resourceName) + + "/federatedIdentityCredentials/" + + global::System.Uri.EscapeDataString(federatedIdentityCredentialResourceName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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.ManagedServiceIdentity.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.FederatedIdentityCredentialsGet1_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Gets the federated identity credential. + /// + /// 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.ManagedServiceIdentity.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 FederatedIdentityCredentialsGet1ViaIdentity(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.ManagedServiceIdentity.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-01-31-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ManagedIdentity/userAssignedIdentities/(?[^/]+)/federatedIdentityCredentials/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{resourceName}/federatedIdentityCredentials/{federatedIdentityCredentialResourceName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var resourceName = _match.Groups["resourceName"].Value; + var federatedIdentityCredentialResourceName = _match.Groups["federatedIdentityCredentialResourceName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.ManagedIdentity/userAssignedIdentities/" + + resourceName + + "/federatedIdentityCredentials/" + + federatedIdentityCredentialResourceName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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.ManagedServiceIdentity.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.FederatedIdentityCredentialsGet1_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.ManagedServiceIdentity.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 FederatedIdentityCredentialsGet1_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.ManagedServiceIdentity.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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.ManagedServiceIdentity.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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.ManagedServiceIdentity.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.FederatedIdentityCredentialAutoGenerated.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.CloudErrorAutoGenerated.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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. + /// + /// The Id of the Subscription to which the identity belongs. + /// The name of the Resource Group to which the identity belongs. + /// The name of the identity resource. + /// The name of the federated identity credential resource. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task FederatedIdentityCredentialsGet1_Validate(string subscriptionId, string resourceGroupName, string resourceName, string federatedIdentityCredentialResourceName, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(resourceName),resourceName); + await eventListener.AssertNotNull(nameof(federatedIdentityCredentialResourceName),federatedIdentityCredentialResourceName); + } + } + + /// Gets the federated identity credential. + /// + /// 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.ManagedServiceIdentity.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 FederatedIdentityCredentialsGetViaIdentity(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.ManagedServiceIdentity.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-01-31"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ManagedIdentity/userAssignedIdentities/(?[^/]+)/federatedIdentityCredentials/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{resourceName}/federatedIdentityCredentials/{federatedIdentityCredentialResourceName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var resourceName = _match.Groups["resourceName"].Value; + var federatedIdentityCredentialResourceName = _match.Groups["federatedIdentityCredentialResourceName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.ManagedIdentity/userAssignedIdentities/" + + resourceName + + "/federatedIdentityCredentials/" + + federatedIdentityCredentialResourceName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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.ManagedServiceIdentity.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.FederatedIdentityCredentialsGet_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.ManagedServiceIdentity.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 FederatedIdentityCredentialsGet_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.ManagedServiceIdentity.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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.ManagedServiceIdentity.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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.ManagedServiceIdentity.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.FederatedIdentityCredential.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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. + /// + /// The Id of the Subscription to which the identity belongs. + /// The name of the resource group. The name is case insensitive. + /// The name of the identity resource. + /// The name of the federated identity credential resource. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task FederatedIdentityCredentialsGet_Validate(string subscriptionId, string resourceGroupName, string resourceName, string federatedIdentityCredentialResourceName, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(resourceName),resourceName); + await eventListener.AssertNotNull(nameof(federatedIdentityCredentialResourceName),federatedIdentityCredentialResourceName); + await eventListener.AssertRegEx(nameof(federatedIdentityCredentialResourceName),federatedIdentityCredentialResourceName,@"^[a-zA-Z0-9]{1}[a-zA-Z0-9-_]{2,119}$"); + } + } + + /// + /// Lists all the federated identity credentials under the specified user assigned identity. + /// + /// The Id of the Subscription to which the identity belongs. + /// The name of the resource group. The name is case insensitive. + /// The name of the identity resource. + /// Number of records to return. + /// A skip token is used to continue retrieving items after an operation returns a partial result. + /// If a previous response contains a nextLink element, the value of the nextLink element will include a skipToken parameter + /// that specifies a starting point to use for subsequent calls. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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 FederatedIdentityCredentialsList(string subscriptionId, string resourceGroupName, string resourceName, int? Top, string Skiptoken, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-01-31"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ManagedIdentity/userAssignedIdentities/" + + global::System.Uri.EscapeDataString(resourceName) + + "/federatedIdentityCredentials" + + "?" + + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString())) + + "&" + + (string.IsNullOrEmpty(Skiptoken) ? global::System.String.Empty : "$skiptoken=" + global::System.Uri.EscapeDataString(Skiptoken)) + + "&" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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.ManagedServiceIdentity.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.FederatedIdentityCredentialsList_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// + /// Lists all the federated identity credentials under the specified user assigned identity. + /// + /// The Id of the Subscription to which the identity belongs. + /// The name of the Resource Group to which the identity belongs. + /// The name of the identity resource. + /// Number of records to return. + /// A skip token is used to continue retrieving items after an operation returns a partial result. + /// If a previous response contains a nextLink element, the value of the nextLink element will include a skipToken parameter + /// that specifies a starting point to use for subsequent calls. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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 FederatedIdentityCredentialsList1(string subscriptionId, string resourceGroupName, string resourceName, int? Top, string Skiptoken, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-01-31-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ManagedIdentity/userAssignedIdentities/" + + global::System.Uri.EscapeDataString(resourceName) + + "/federatedIdentityCredentials" + + "?" + + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString())) + + "&" + + (string.IsNullOrEmpty(Skiptoken) ? global::System.String.Empty : "$skiptoken=" + global::System.Uri.EscapeDataString(Skiptoken)) + + "&" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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.ManagedServiceIdentity.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.FederatedIdentityCredentialsList1_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// + /// Lists all the federated identity credentials under the specified user assigned identity. + /// + /// + /// Number of records to return. + /// A skip token is used to continue retrieving items after an operation returns a partial result. + /// If a previous response contains a nextLink element, the value of the nextLink element will include a skipToken parameter + /// that specifies a starting point to use for subsequent calls. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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 FederatedIdentityCredentialsList1ViaIdentity(global::System.String viaIdentity, int? Top, string Skiptoken, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-01-31-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ManagedIdentity/userAssignedIdentities/(?[^/]+)/federatedIdentityCredentials$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{resourceName}/federatedIdentityCredentials'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var resourceName = _match.Groups["resourceName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.ManagedIdentity/userAssignedIdentities/" + + resourceName + + "/federatedIdentityCredentials" + + "?" + + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString())) + + "&" + + (string.IsNullOrEmpty(Skiptoken) ? global::System.String.Empty : "$skiptoken=" + global::System.Uri.EscapeDataString(Skiptoken)) + + "&" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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.ManagedServiceIdentity.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.FederatedIdentityCredentialsList1_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.ManagedServiceIdentity.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 FederatedIdentityCredentialsList1_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.ManagedServiceIdentity.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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.ManagedServiceIdentity.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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.ManagedServiceIdentity.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.FederatedIdentityCredentialsListResultAutoGenerated.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.CloudErrorAutoGenerated.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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. + /// + /// The Id of the Subscription to which the identity belongs. + /// The name of the Resource Group to which the identity belongs. + /// The name of the identity resource. + /// Number of records to return. + /// A skip token is used to continue retrieving items after an operation returns a partial result. + /// If a previous response contains a nextLink element, the value of the nextLink element will include a skipToken parameter + /// that specifies a starting point to use for subsequent calls. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task FederatedIdentityCredentialsList1_Validate(string subscriptionId, string resourceGroupName, string resourceName, int? Top, string Skiptoken, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(resourceName),resourceName); + await eventListener.AssertIsGreaterThanOrEqual(nameof(Top),Top,1); + await eventListener.AssertNotNull(nameof(Skiptoken),Skiptoken); + } + } + + /// + /// Lists all the federated identity credentials under the specified user assigned identity. + /// + /// + /// Number of records to return. + /// A skip token is used to continue retrieving items after an operation returns a partial result. + /// If a previous response contains a nextLink element, the value of the nextLink element will include a skipToken parameter + /// that specifies a starting point to use for subsequent calls. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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 FederatedIdentityCredentialsListViaIdentity(global::System.String viaIdentity, int? Top, string Skiptoken, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-01-31"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ManagedIdentity/userAssignedIdentities/(?[^/]+)/federatedIdentityCredentials$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{resourceName}/federatedIdentityCredentials'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var resourceName = _match.Groups["resourceName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.ManagedIdentity/userAssignedIdentities/" + + resourceName + + "/federatedIdentityCredentials" + + "?" + + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString())) + + "&" + + (string.IsNullOrEmpty(Skiptoken) ? global::System.String.Empty : "$skiptoken=" + global::System.Uri.EscapeDataString(Skiptoken)) + + "&" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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.ManagedServiceIdentity.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.FederatedIdentityCredentialsList_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.ManagedServiceIdentity.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 FederatedIdentityCredentialsList_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.ManagedServiceIdentity.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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.ManagedServiceIdentity.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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.ManagedServiceIdentity.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.FederatedIdentityCredentialsListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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. + /// + /// The Id of the Subscription to which the identity belongs. + /// The name of the resource group. The name is case insensitive. + /// The name of the identity resource. + /// Number of records to return. + /// A skip token is used to continue retrieving items after an operation returns a partial result. + /// If a previous response contains a nextLink element, the value of the nextLink element will include a skipToken parameter /// that specifies a starting point to use for subsequent calls. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task FederatedIdentityCredentialsList_Validate(string subscriptionId, string resourceGroupName, string resourceName, int? Top, string Skiptoken, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(resourceName),resourceName); + await eventListener.AssertIsGreaterThanOrEqual(nameof(Top),Top,1); + await eventListener.AssertNotNull(nameof(Skiptoken),Skiptoken); + } + } + + /// Lists available operations for the Microsoft.ManagedIdentity provider + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task OperationsList(global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-01-31"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/providers/Microsoft.ManagedIdentity/operations" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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.ManagedServiceIdentity.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.OperationsList_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Lists available operations for the Microsoft.ManagedIdentity provider + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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 OperationsList1(global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-01-31-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/providers/Microsoft.ManagedIdentity/operations" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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.ManagedServiceIdentity.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.OperationsList1_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Lists available operations for the Microsoft.ManagedIdentity provider + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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 OperationsList1ViaIdentity(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.ManagedServiceIdentity.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-01-31-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.ManagedIdentity/operations$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/providers/Microsoft.ManagedIdentity/operations'"); + } + + // replace URI parameters with values from identity + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/providers/Microsoft.ManagedIdentity/operations" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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.ManagedServiceIdentity.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.OperationsList1_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.ManagedServiceIdentity.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 OperationsList1_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.ManagedServiceIdentity.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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.ManagedServiceIdentity.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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.ManagedServiceIdentity.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.OperationListResultAutoGenerated.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.CloudErrorAutoGenerated.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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 OperationsList1_Validate(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + + } + } + + /// Lists available operations for the Microsoft.ManagedIdentity provider + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task OperationsListViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-01-31"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/providers/Microsoft.ManagedIdentity/operations$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/providers/Microsoft.ManagedIdentity/operations'"); + } + + // replace URI parameters with values from identity + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/providers/Microsoft.ManagedIdentity/operations" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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.ManagedServiceIdentity.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.OperationsList_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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.ManagedServiceIdentity.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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.ManagedServiceIdentity.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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.ManagedServiceIdentity.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.OperationListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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.ManagedServiceIdentity.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + + } + } + + /// Gets the systemAssignedIdentity available under the specified RP scope. + /// The resource provider scope of the resource. Parent resource being extended by Managed Identities. + /// 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.ManagedServiceIdentity.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 SystemAssignedIdentitiesGetByScope(string scope, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-01-31"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/" + + (scope) + + "/providers/Microsoft.ManagedIdentity/identities/default" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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.ManagedServiceIdentity.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.SystemAssignedIdentitiesGetByScope_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Gets the systemAssignedIdentity available under the specified RP scope. + /// The resource provider scope of the resource. Parent resource being extended by Managed Identities. + /// 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.ManagedServiceIdentity.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 SystemAssignedIdentitiesGetByScope1(string scope, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-01-31-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/" + + (scope) + + "/providers/Microsoft.ManagedIdentity/identities/default" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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.ManagedServiceIdentity.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.SystemAssignedIdentitiesGetByScope1_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Gets the systemAssignedIdentity available under the specified RP scope. + /// + /// 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.ManagedServiceIdentity.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 SystemAssignedIdentitiesGetByScope1ViaIdentity(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.ManagedServiceIdentity.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-01-31-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.ManagedIdentity/identities/default$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/{scope}/providers/Microsoft.ManagedIdentity/identities/default'"); + } + + // 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.ManagedIdentity/identities/default" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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.ManagedServiceIdentity.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.SystemAssignedIdentitiesGetByScope1_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.ManagedServiceIdentity.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 SystemAssignedIdentitiesGetByScope1_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.ManagedServiceIdentity.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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.ManagedServiceIdentity.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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.ManagedServiceIdentity.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.SystemAssignedIdentityAutoGenerated.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.CloudErrorAutoGenerated.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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. + /// + /// The resource provider scope of the resource. Parent resource being extended by Managed Identities. + /// 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 SystemAssignedIdentitiesGetByScope1_Validate(string scope, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(scope),scope); + } + } + + /// Gets the systemAssignedIdentity available under the specified RP scope. + /// + /// 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.ManagedServiceIdentity.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 SystemAssignedIdentitiesGetByScopeViaIdentity(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.ManagedServiceIdentity.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-01-31"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/(?[^/]+)/providers/Microsoft.ManagedIdentity/identities/default$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/{scope}/providers/Microsoft.ManagedIdentity/identities/default'"); + } + + // 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.ManagedIdentity/identities/default" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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.ManagedServiceIdentity.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.SystemAssignedIdentitiesGetByScope_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.ManagedServiceIdentity.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 SystemAssignedIdentitiesGetByScope_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.ManagedServiceIdentity.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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.ManagedServiceIdentity.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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.ManagedServiceIdentity.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.SystemAssignedIdentity.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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. + /// + /// The resource provider scope of the resource. Parent resource being extended by Managed Identities. + /// 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 SystemAssignedIdentitiesGetByScope_Validate(string scope, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(scope),scope); + } + } + + /// Create or update an identity in the specified subscription and resource group. + /// The Id of the Subscription to which the identity belongs. + /// The name of the Resource Group to which the identity belongs. + /// The name of the identity resource. + /// Parameters to create or update the identity + /// 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.ManagedServiceIdentity.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 UserAssignedIdentitiesCreateOrUpdate(string subscriptionId, string resourceGroupName, string resourceName, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IIdentity 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.ManagedServiceIdentity.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-01-31"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ManagedIdentity/userAssignedIdentities/" + + global::System.Uri.EscapeDataString(resourceName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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.ManagedServiceIdentity.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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.ManagedServiceIdentity.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.UserAssignedIdentitiesCreateOrUpdate_Call(request,onOk,onCreated,onDefault,eventListener,sender); + } + } + + /// Create or update an identity in the specified subscription and resource group. + /// The Id of the Subscription to which the identity belongs. + /// The name of the Resource Group to which the identity belongs. + /// The name of the identity resource. + /// Parameters to create or update the identity + /// 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.ManagedServiceIdentity.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 UserAssignedIdentitiesCreateOrUpdate1(string subscriptionId, string resourceGroupName, string resourceName, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityAutoGenerated 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.ManagedServiceIdentity.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-01-31-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ManagedIdentity/userAssignedIdentities/" + + global::System.Uri.EscapeDataString(resourceName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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.ManagedServiceIdentity.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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.ManagedServiceIdentity.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.UserAssignedIdentitiesCreateOrUpdate1_Call(request,onOk,onCreated,onDefault,eventListener,sender); + } + } + + /// Create or update an identity in the specified subscription and resource group. + /// + /// Parameters to create or update the identity + /// 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.ManagedServiceIdentity.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 UserAssignedIdentitiesCreateOrUpdate1ViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityAutoGenerated 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.ManagedServiceIdentity.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-01-31-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ManagedIdentity/userAssignedIdentities/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{resourceName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var resourceName = _match.Groups["resourceName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.ManagedIdentity/userAssignedIdentities/" + + resourceName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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.ManagedServiceIdentity.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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.ManagedServiceIdentity.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.UserAssignedIdentitiesCreateOrUpdate1_Call(request,onOk,onCreated,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 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.ManagedServiceIdentity.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 UserAssignedIdentitiesCreateOrUpdate1_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.ManagedServiceIdentity.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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.ManagedServiceIdentity.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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.ManagedServiceIdentity.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IdentityAutoGenerated.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + case global::System.Net.HttpStatusCode.Created: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onCreated(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IdentityAutoGenerated.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.CloudErrorAutoGenerated.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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. + /// + /// The Id of the Subscription to which the identity belongs. + /// The name of the Resource Group to which the identity belongs. + /// The name of the identity resource. + /// Parameters to create or update the identity + /// 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 UserAssignedIdentitiesCreateOrUpdate1_Validate(string subscriptionId, string resourceGroupName, string resourceName, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityAutoGenerated body, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(resourceName),resourceName); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// Create or update an identity in the specified subscription and resource group. + /// + /// Parameters to create or update the identity + /// 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.ManagedServiceIdentity.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 UserAssignedIdentitiesCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IIdentity 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.ManagedServiceIdentity.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-01-31"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ManagedIdentity/userAssignedIdentities/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{resourceName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var resourceName = _match.Groups["resourceName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.ManagedIdentity/userAssignedIdentities/" + + resourceName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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.ManagedServiceIdentity.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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.ManagedServiceIdentity.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.UserAssignedIdentitiesCreateOrUpdate_Call(request,onOk,onCreated,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 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.ManagedServiceIdentity.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 UserAssignedIdentitiesCreateOrUpdate_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.ManagedServiceIdentity.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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.ManagedServiceIdentity.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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.ManagedServiceIdentity.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.Identity.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + case global::System.Net.HttpStatusCode.Created: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onCreated(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.Identity.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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. + /// + /// The Id of the Subscription to which the identity belongs. + /// The name of the Resource Group to which the identity belongs. + /// The name of the identity resource. + /// Parameters to create or update the identity + /// 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 UserAssignedIdentitiesCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string resourceName, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IIdentity body, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(resourceName),resourceName); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// Deletes the identity. + /// The Id of the Subscription to which the identity belongs. + /// The name of the Resource Group to which the identity belongs. + /// The name of the identity resource. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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 UserAssignedIdentitiesDelete(string subscriptionId, string resourceGroupName, string resourceName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-01-31"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ManagedIdentity/userAssignedIdentities/" + + global::System.Uri.EscapeDataString(resourceName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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.ManagedServiceIdentity.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.UserAssignedIdentitiesDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + } + } + + /// Deletes the identity. + /// The Id of the Subscription to which the identity belongs. + /// The name of the Resource Group to which the identity belongs. + /// The name of the identity resource. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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 UserAssignedIdentitiesDelete1(string subscriptionId, string resourceGroupName, string resourceName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-01-31-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ManagedIdentity/userAssignedIdentities/" + + global::System.Uri.EscapeDataString(resourceName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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.ManagedServiceIdentity.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.UserAssignedIdentitiesDelete1_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + } + } + + /// Deletes the identity. + /// /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. @@ -643,7 +2604,7 @@ public partial class ManagedServiceIdentityClient /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task FederatedIdentityCredentialsListViaIdentity(global::System.String viaIdentity, int? Top, string Skiptoken, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task UserAssignedIdentitiesDelete1ViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.ISendAsync sender) { var apiVersion = @"2022-01-31-preview"; // Constant Parameters @@ -651,10 +2612,141 @@ public partial class ManagedServiceIdentityClient { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ManagedIdentity/userAssignedIdentities/(?[^/]+)/federatedIdentityCredentials$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ManagedIdentity/userAssignedIdentities/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{resourceName}/federatedIdentityCredentials'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{resourceName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var resourceName = _match.Groups["resourceName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.ManagedIdentity/userAssignedIdentities/" + + resourceName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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.ManagedServiceIdentity.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.UserAssignedIdentitiesDelete1_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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 UserAssignedIdentitiesDelete1_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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.ManagedServiceIdentity.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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.ManagedServiceIdentity.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response); + break; + } + case global::System.Net.HttpStatusCode.NoContent: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onNoContent(_response); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.CloudErrorAutoGenerated.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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. + /// + /// The Id of the Subscription to which the identity belongs. + /// The name of the Resource Group to which the identity belongs. + /// The name of the identity resource. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task UserAssignedIdentitiesDelete1_Validate(string subscriptionId, string resourceGroupName, string resourceName, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(resourceName),resourceName); + } + } + + /// Deletes the identity. + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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 UserAssignedIdentitiesDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-01-31"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ManagedIdentity/userAssignedIdentities/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{resourceName}'"); } // replace URI parameters with values from identity @@ -669,12 +2761,7 @@ public partial class ManagedServiceIdentityClient + resourceGroupName + "/providers/Microsoft.ManagedIdentity/userAssignedIdentities/" + resourceName - + "/federatedIdentityCredentials" + "?" - + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString())) - + "&" - + (string.IsNullOrEmpty(Skiptoken) ? global::System.String.Empty : "$skiptoken=" + global::System.Uri.EscapeDataString(Skiptoken)) - + "&" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -682,18 +2769,19 @@ public partial class ManagedServiceIdentityClient // 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.ManagedServiceIdentity.Runtime.Method.Get, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Method.Delete, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.FederatedIdentityCredentialsList_Call(request,onOk,onDefault,eventListener,sender); + await this.UserAssignedIdentitiesDelete_Call(request,onOk,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 200 (OK). + /// 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. @@ -701,7 +2789,7 @@ public partial class ManagedServiceIdentityClient /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task FederatedIdentityCredentialsList_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.ManagedServiceIdentity.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task UserAssignedIdentitiesDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -719,13 +2807,19 @@ public partial class ManagedServiceIdentityClient case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.FederatedIdentityCredentialsListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response); + break; + } + case global::System.Net.HttpStatusCode.NoContent: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onNoContent(_response); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -741,33 +2835,73 @@ public partial class ManagedServiceIdentityClient } /// - /// 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 Subscription to which the identity belongs. /// The name of the Resource Group to which the identity belongs. /// The name of the identity resource. - /// Number of records to return. - /// A skip token is used to continue retrieving items after an operation returns a partial result. - /// If a previous response contains a nextLink element, the value of the nextLink element will include a skipToken parameter - /// that specifies a starting point to use for subsequent calls. /// an instance that will receive events. /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task FederatedIdentityCredentialsList_Validate(string subscriptionId, string resourceGroupName, string resourceName, int? Top, string Skiptoken, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task UserAssignedIdentitiesDelete_Validate(string subscriptionId, string resourceGroupName, string resourceName, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertNotNull(nameof(resourceName),resourceName); - await eventListener.AssertIsGreaterThanOrEqual(nameof(Top),Top,1); - await eventListener.AssertNotNull(nameof(Skiptoken),Skiptoken); } } - /// Lists available operations for the Microsoft.ManagedIdentity provider + /// Gets the identity. + /// The Id of the Subscription to which the identity belongs. + /// The name of the Resource Group to which the identity belongs. + /// The name of the identity 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.ManagedServiceIdentity.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 UserAssignedIdentitiesGet(string subscriptionId, string resourceGroupName, string resourceName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-01-31"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ManagedIdentity/userAssignedIdentities/" + + global::System.Uri.EscapeDataString(resourceName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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.ManagedServiceIdentity.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.UserAssignedIdentitiesGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Gets the identity. + /// The Id of the Subscription to which the identity belongs. + /// The name of the Resource Group to which the identity belongs. + /// The name of the identity 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). @@ -776,7 +2910,7 @@ public partial class ManagedServiceIdentityClient /// /// 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.ManagedServiceIdentity.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task UserAssignedIdentitiesGet1(string subscriptionId, string resourceGroupName, string resourceName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.ISendAsync sender) { var apiVersion = @"2022-01-31-preview"; // Constant Parameters @@ -784,7 +2918,12 @@ public partial class ManagedServiceIdentityClient { // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/providers/Microsoft.ManagedIdentity/operations" + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ManagedIdentity/userAssignedIdentities/" + + global::System.Uri.EscapeDataString(resourceName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -798,11 +2937,11 @@ public partial class ManagedServiceIdentityClient await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.OperationsList_Call(request,onOk,onDefault,eventListener,sender); + await this.UserAssignedIdentitiesGet1_Call(request,onOk,onDefault,eventListener,sender); } } - /// Lists available operations for the Microsoft.ManagedIdentity provider + /// Gets the identity. /// /// 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 @@ -812,7 +2951,7 @@ public partial class ManagedServiceIdentityClient /// /// 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.ManagedServiceIdentity.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task UserAssignedIdentitiesGet1ViaIdentity(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.ManagedServiceIdentity.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.ISendAsync sender) { var apiVersion = @"2022-01-31-preview"; // Constant Parameters @@ -820,16 +2959,24 @@ public partial class ManagedServiceIdentityClient { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/providers/Microsoft.ManagedIdentity/operations$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ManagedIdentity/userAssignedIdentities/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/providers/Microsoft.ManagedIdentity/operations'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{resourceName}'"); } // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var resourceName = _match.Groups["resourceName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/providers/Microsoft.ManagedIdentity/operations" + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.ManagedIdentity/userAssignedIdentities/" + + resourceName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -843,11 +2990,11 @@ public partial class ManagedServiceIdentityClient await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.OperationsList_Call(request,onOk,onDefault,eventListener,sender); + await this.UserAssignedIdentitiesGet1_Call(request,onOk,onDefault,eventListener,sender); } } - /// Actual wire call for method. + /// Actual wire call for method. /// the prepared HttpRequestMessage to send. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled @@ -857,7 +3004,7 @@ public partial class ManagedServiceIdentityClient /// /// 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.ManagedServiceIdentity.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task UserAssignedIdentitiesGet1_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.ManagedServiceIdentity.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -875,13 +3022,13 @@ public partial class ManagedServiceIdentityClient case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.OperationListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IdentityAutoGenerated.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.CloudErrorAutoGenerated.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -897,60 +3044,27 @@ public partial class ManagedServiceIdentityClient } /// - /// 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 Subscription to which the identity belongs. + /// The name of the Resource Group to which the identity belongs. + /// The name of the identity resource. /// an instance that will receive events. /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task OperationsList_Validate(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.IEventListener eventListener) - { - using( NoSynchronizationContext ) - { - - } - } - - /// Gets the systemAssignedIdentity available under the specified RP scope. - /// The resource provider scope of the resource. Parent resource being extended by Managed Identities. - /// 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.ManagedServiceIdentity.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 SystemAssignedIdentitiesGetByScope(string scope, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task UserAssignedIdentitiesGet1_Validate(string subscriptionId, string resourceGroupName, string resourceName, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.IEventListener eventListener) { - var apiVersion = @"2022-01-31-preview"; - // Constant Parameters using( NoSynchronizationContext ) { - // construct URL - var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/" - + (scope) - + "/providers/Microsoft.ManagedIdentity/identities/default" - + "?" - + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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.ManagedServiceIdentity.Runtime.Method.Get, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // make the call - await this.SystemAssignedIdentitiesGetByScope_Call(request,onOk,onDefault,eventListener,sender); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(resourceName),resourceName); } } - /// Gets the systemAssignedIdentity available under the specified RP scope. + /// Gets the identity. /// /// 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 @@ -960,27 +3074,32 @@ public partial class ManagedServiceIdentityClient /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task SystemAssignedIdentitiesGetByScopeViaIdentity(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.ManagedServiceIdentity.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task UserAssignedIdentitiesGetViaIdentity(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.ManagedServiceIdentity.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.ISendAsync sender) { - var apiVersion = @"2022-01-31-preview"; + var apiVersion = @"2023-01-31"; // Constant Parameters using( NoSynchronizationContext ) { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/(?[^/]+)/providers/Microsoft.ManagedIdentity/identities/default$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ManagedIdentity/userAssignedIdentities/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/{scope}/providers/Microsoft.ManagedIdentity/identities/default'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{resourceName}'"); } // replace URI parameters with values from identity - var scope = _match.Groups["scope"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var resourceName = _match.Groups["resourceName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/" - + scope - + "/providers/Microsoft.ManagedIdentity/identities/default" + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.ManagedIdentity/userAssignedIdentities/" + + resourceName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -994,11 +3113,11 @@ public partial class ManagedServiceIdentityClient await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.SystemAssignedIdentitiesGetByScope_Call(request,onOk,onDefault,eventListener,sender); + await this.UserAssignedIdentitiesGet_Call(request,onOk,onDefault,eventListener,sender); } } - /// Actual wire call for method. + /// Actual wire call for method. /// the prepared HttpRequestMessage to send. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled @@ -1008,7 +3127,7 @@ public partial class ManagedServiceIdentityClient /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task SystemAssignedIdentitiesGetByScope_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.ManagedServiceIdentity.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task UserAssignedIdentitiesGet_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.ManagedServiceIdentity.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -1026,13 +3145,13 @@ public partial class ManagedServiceIdentityClient case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.SystemAssignedIdentity.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.Identity.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -1048,29 +3167,38 @@ public partial class ManagedServiceIdentityClient } /// - /// 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 resource provider scope of the resource. Parent resource being extended by Managed Identities. + /// The Id of the Subscription to which the identity belongs. + /// The name of the Resource Group to which the identity belongs. + /// The name of the identity resource. /// an instance that will receive events. /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task SystemAssignedIdentitiesGetByScope_Validate(string scope, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task UserAssignedIdentitiesGet_Validate(string subscriptionId, string resourceGroupName, string resourceName, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { - await eventListener.AssertNotNull(nameof(scope),scope); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(resourceName),resourceName); } } - /// Create or update an identity in the specified subscription and resource group. + /// Lists the associated resources for this identity. /// The Id of the Subscription to which the identity belongs. /// The name of the Resource Group to which the identity belongs. /// The name of the identity resource. - /// Parameters to create or update the identity + /// OData filter expression to apply to the query. + /// OData orderBy expression to apply to the query. + /// Number of records to return. + /// Number of records to skip. + /// A skip token is used to continue retrieving items after an operation returns a partial result. + /// If a previous response contains a nextLink element, the value of the nextLink element will include a skipToken parameter + /// that specifies a starting point to use for subsequent calls. /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns 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. @@ -1078,7 +3206,7 @@ public partial class ManagedServiceIdentityClient /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task UserAssignedIdentitiesCreateOrUpdate(string subscriptionId, string resourceGroupName, string resourceName, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentity 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.ManagedServiceIdentity.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task UserAssignedIdentitiesListAssociatedResources(string subscriptionId, string resourceGroupName, string resourceName, string Filter, string Orderby, int? Top, int? Skip, string Skiptoken, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.ISendAsync sender) { var apiVersion = @"2022-01-31-preview"; // Constant Parameters @@ -1092,7 +3220,18 @@ public partial class ManagedServiceIdentityClient + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.ManagedIdentity/userAssignedIdentities/" + global::System.Uri.EscapeDataString(resourceName) + + "/listAssociatedResources" + "?" + + (string.IsNullOrEmpty(Filter) ? global::System.String.Empty : "$filter=" + global::System.Uri.EscapeDataString(Filter)) + + "&" + + (string.IsNullOrEmpty(Orderby) ? global::System.String.Empty : "$orderby=" + global::System.Uri.EscapeDataString(Orderby)) + + "&" + + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString())) + + "&" + + (null == Skip ? global::System.String.Empty : "$skip=" + global::System.Uri.EscapeDataString(Skip.ToString())) + + "&" + + (string.IsNullOrEmpty(Skiptoken) ? global::System.String.Empty : "$skiptoken=" + global::System.Uri.EscapeDataString(Skiptoken)) + + "&" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -1100,24 +3239,25 @@ public partial class ManagedServiceIdentityClient // 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.ManagedServiceIdentity.Runtime.Method.Put, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Method.Post, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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.ManagedServiceIdentity.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.UserAssignedIdentitiesCreateOrUpdate_Call(request,onOk,onCreated,onDefault,eventListener,sender); + await this.UserAssignedIdentitiesListAssociatedResources_Call(request,onOk,onDefault,eventListener,sender); } } - /// Create or update an identity in the specified subscription and resource group. + /// Lists the associated resources for this identity. /// - /// Parameters to create or update the identity + /// OData filter expression to apply to the query. + /// OData orderBy expression to apply to the query. + /// Number of records to return. + /// Number of records to skip. + /// A skip token is used to continue retrieving items after an operation returns a partial result. + /// If a previous response contains a nextLink element, the value of the nextLink element will include a skipToken parameter + /// that specifies a starting point to use for subsequent calls. /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns 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. @@ -1125,7 +3265,7 @@ public partial class ManagedServiceIdentityClient /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task UserAssignedIdentitiesCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentity 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.ManagedServiceIdentity.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task UserAssignedIdentitiesListAssociatedResourcesViaIdentity(global::System.String viaIdentity, string Filter, string Orderby, int? Top, int? Skip, string Skiptoken, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.ISendAsync sender) { var apiVersion = @"2022-01-31-preview"; // Constant Parameters @@ -1136,7 +3276,7 @@ public partial class ManagedServiceIdentityClient var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ManagedIdentity/userAssignedIdentities/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{resourceName}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{resourceName}/listAssociatedResources'"); } // replace URI parameters with values from identity @@ -1151,7 +3291,18 @@ public partial class ManagedServiceIdentityClient + resourceGroupName + "/providers/Microsoft.ManagedIdentity/userAssignedIdentities/" + resourceName + + "/listAssociatedResources" + "?" + + (string.IsNullOrEmpty(Filter) ? global::System.String.Empty : "$filter=" + global::System.Uri.EscapeDataString(Filter)) + + "&" + + (string.IsNullOrEmpty(Orderby) ? global::System.String.Empty : "$orderby=" + global::System.Uri.EscapeDataString(Orderby)) + + "&" + + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString())) + + "&" + + (null == Skip ? global::System.String.Empty : "$skip=" + global::System.Uri.EscapeDataString(Skip.ToString())) + + "&" + + (string.IsNullOrEmpty(Skiptoken) ? global::System.String.Empty : "$skiptoken=" + global::System.Uri.EscapeDataString(Skiptoken)) + + "&" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -1159,25 +3310,20 @@ public partial class ManagedServiceIdentityClient // 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.ManagedServiceIdentity.Runtime.Method.Put, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Method.Post, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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.ManagedServiceIdentity.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.UserAssignedIdentitiesCreateOrUpdate_Call(request,onOk,onCreated,onDefault,eventListener,sender); + await this.UserAssignedIdentitiesListAssociatedResources_Call(request,onOk,onDefault,eventListener,sender); } } /// - /// Actual wire call for method. + /// Actual wire call for method. /// /// the prepared HttpRequestMessage to send. /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns 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. @@ -1185,7 +3331,7 @@ public partial class ManagedServiceIdentityClient /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task UserAssignedIdentitiesCreateOrUpdate_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.ManagedServiceIdentity.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task UserAssignedIdentitiesListAssociatedResources_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.ManagedServiceIdentity.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -1203,19 +3349,13 @@ public partial class ManagedServiceIdentityClient case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.Identity.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - case global::System.Net.HttpStatusCode.Created: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onCreated(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.Identity.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.AssociatedResourcesListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.CloudErrorAutoGenerated.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -1231,35 +3371,87 @@ public partial class ManagedServiceIdentityClient } /// - /// 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 Subscription to which the identity belongs. /// The name of the Resource Group to which the identity belongs. /// The name of the identity resource. - /// Parameters to create or update the identity + /// OData filter expression to apply to the query. + /// OData orderBy expression to apply to the query. + /// Number of records to return. + /// Number of records to skip. + /// A skip token is used to continue retrieving items after an operation returns a partial result. + /// If a previous response contains a nextLink element, the value of the nextLink element will include a skipToken parameter + /// that specifies a starting point to use for subsequent calls. /// an instance that will receive events. /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task UserAssignedIdentitiesCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string resourceName, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentity body, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task UserAssignedIdentitiesListAssociatedResources_Validate(string subscriptionId, string resourceGroupName, string resourceName, string Filter, string Orderby, int? Top, int? Skip, string Skiptoken, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertNotNull(nameof(resourceName),resourceName); - await eventListener.AssertNotNull(nameof(body), body); - await eventListener.AssertObjectIsValid(nameof(body), body); + await eventListener.AssertNotNull(nameof(Filter),Filter); + await eventListener.AssertNotNull(nameof(Orderby),Orderby); + await eventListener.AssertIsGreaterThanOrEqual(nameof(Top),Top,1); + await eventListener.AssertIsGreaterThanOrEqual(nameof(Skip),Skip,1); + await eventListener.AssertNotNull(nameof(Skiptoken),Skiptoken); } } - /// Deletes the identity. + /// + /// Lists all the userAssignedIdentities available under the specified ResourceGroup. + /// + /// The Id of the Subscription to which the identity belongs. + /// The name of the Resource Group to which the identity belongs. + /// 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.ManagedServiceIdentity.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 UserAssignedIdentitiesListByResourceGroup(string subscriptionId, string resourceGroupName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-01-31"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ManagedIdentity/userAssignedIdentities" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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.ManagedServiceIdentity.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.UserAssignedIdentitiesListByResourceGroup_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// + /// Lists all the userAssignedIdentities available under the specified ResourceGroup. + /// /// The Id of the Subscription to which the identity belongs. /// The name of the Resource Group to which the identity belongs. - /// The name of the identity resource. /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns 204 (NoContent). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. @@ -1267,7 +3459,7 @@ public partial class ManagedServiceIdentityClient /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task UserAssignedIdentitiesDelete(string subscriptionId, string resourceGroupName, string resourceName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task UserAssignedIdentitiesListByResourceGroup1(string subscriptionId, string resourceGroupName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.ISendAsync sender) { var apiVersion = @"2022-01-31-preview"; // Constant Parameters @@ -1279,8 +3471,7 @@ public partial class ManagedServiceIdentityClient + global::System.Uri.EscapeDataString(subscriptionId) + "/resourceGroups/" + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.ManagedIdentity/userAssignedIdentities/" - + global::System.Uri.EscapeDataString(resourceName) + + "/providers/Microsoft.ManagedIdentity/userAssignedIdentities" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -1289,19 +3480,20 @@ public partial class ManagedServiceIdentityClient // 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.ManagedServiceIdentity.Runtime.Method.Delete, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.UserAssignedIdentitiesDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + await this.UserAssignedIdentitiesListByResourceGroup1_Call(request,onOk,onDefault,eventListener,sender); } } - /// Deletes the identity. + /// + /// Lists all the userAssignedIdentities available under the specified ResourceGroup. + /// /// /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns 204 (NoContent). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. @@ -1309,7 +3501,7 @@ public partial class ManagedServiceIdentityClient /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task UserAssignedIdentitiesDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task UserAssignedIdentitiesListByResourceGroup1ViaIdentity(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.ManagedServiceIdentity.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.ISendAsync sender) { var apiVersion = @"2022-01-31-preview"; // Constant Parameters @@ -1317,24 +3509,22 @@ public partial class ManagedServiceIdentityClient { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ManagedIdentity/userAssignedIdentities/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ManagedIdentity/userAssignedIdentities$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{resourceName}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var resourceName = _match.Groups["resourceName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" + subscriptionId + "/resourceGroups/" + resourceGroupName - + "/providers/Microsoft.ManagedIdentity/userAssignedIdentities/" - + resourceName + + "/providers/Microsoft.ManagedIdentity/userAssignedIdentities" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -1343,19 +3533,20 @@ public partial class ManagedServiceIdentityClient // 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.ManagedServiceIdentity.Runtime.Method.Delete, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.UserAssignedIdentitiesDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + await this.UserAssignedIdentitiesListByResourceGroup1_Call(request,onOk,onDefault,eventListener,sender); } } - /// Actual wire call for method. + /// + /// Actual wire call for method. + /// /// the prepared HttpRequestMessage to send. /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns 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. @@ -1363,7 +3554,7 @@ public partial class ManagedServiceIdentityClient /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task UserAssignedIdentitiesDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task UserAssignedIdentitiesListByResourceGroup1_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.ManagedServiceIdentity.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -1381,19 +3572,13 @@ public partial class ManagedServiceIdentityClient case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response); - break; - } - case global::System.Net.HttpStatusCode.NoContent: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onNoContent(_response); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.UserAssignedIdentitiesListResultAutoGenerated.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.CloudErrorAutoGenerated.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -1409,70 +3594,27 @@ public partial class ManagedServiceIdentityClient } /// - /// 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 Subscription to which the identity belongs. /// The name of the Resource Group to which the identity belongs. - /// The name of the identity resource. /// an instance that will receive events. /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task UserAssignedIdentitiesDelete_Validate(string subscriptionId, string resourceGroupName, string resourceName, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task UserAssignedIdentitiesListByResourceGroup1_Validate(string subscriptionId, string resourceGroupName, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); - await eventListener.AssertNotNull(nameof(resourceName),resourceName); - } - } - - /// Gets the identity. - /// The Id of the Subscription to which the identity belongs. - /// The name of the Resource Group to which the identity belongs. - /// The name of the identity 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.ManagedServiceIdentity.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 UserAssignedIdentitiesGet(string subscriptionId, string resourceGroupName, string resourceName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.ISendAsync sender) - { - var apiVersion = @"2022-01-31-preview"; - // Constant Parameters - using( NoSynchronizationContext ) - { - // construct URL - var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/subscriptions/" - + global::System.Uri.EscapeDataString(subscriptionId) - + "/resourceGroups/" - + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.ManagedIdentity/userAssignedIdentities/" - + global::System.Uri.EscapeDataString(resourceName) - + "?" - + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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.ManagedServiceIdentity.Runtime.Method.Get, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // make the call - await this.UserAssignedIdentitiesGet_Call(request,onOk,onDefault,eventListener,sender); } } - /// Gets the identity. + /// + /// Lists all the userAssignedIdentities available under the specified ResourceGroup. + /// /// /// 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 @@ -1482,32 +3624,30 @@ public partial class ManagedServiceIdentityClient /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task UserAssignedIdentitiesGetViaIdentity(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.ManagedServiceIdentity.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task UserAssignedIdentitiesListByResourceGroupViaIdentity(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.ManagedServiceIdentity.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.ISendAsync sender) { - var apiVersion = @"2022-01-31-preview"; + var apiVersion = @"2023-01-31"; // Constant Parameters using( NoSynchronizationContext ) { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ManagedIdentity/userAssignedIdentities/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ManagedIdentity/userAssignedIdentities$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{resourceName}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var resourceName = _match.Groups["resourceName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" + subscriptionId + "/resourceGroups/" + resourceGroupName - + "/providers/Microsoft.ManagedIdentity/userAssignedIdentities/" - + resourceName + + "/providers/Microsoft.ManagedIdentity/userAssignedIdentities" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -1521,11 +3661,13 @@ public partial class ManagedServiceIdentityClient await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.UserAssignedIdentitiesGet_Call(request,onOk,onDefault,eventListener,sender); + await this.UserAssignedIdentitiesListByResourceGroup_Call(request,onOk,onDefault,eventListener,sender); } } - /// Actual wire call for method. + /// + /// Actual wire call for method. + /// /// the prepared HttpRequestMessage to send. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled @@ -1535,7 +3677,7 @@ public partial class ManagedServiceIdentityClient /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task UserAssignedIdentitiesGet_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.ManagedServiceIdentity.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task UserAssignedIdentitiesListByResourceGroup_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.ManagedServiceIdentity.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -1553,13 +3695,13 @@ public partial class ManagedServiceIdentityClient case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.Identity.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.UserAssignedIdentitiesListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -1575,37 +3717,68 @@ public partial class ManagedServiceIdentityClient } /// - /// 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 Subscription to which the identity belongs. /// The name of the Resource Group to which the identity belongs. - /// The name of the identity resource. /// an instance that will receive events. /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task UserAssignedIdentitiesGet_Validate(string subscriptionId, string resourceGroupName, string resourceName, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task UserAssignedIdentitiesListByResourceGroup_Validate(string subscriptionId, string resourceGroupName, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); - await eventListener.AssertNotNull(nameof(resourceName),resourceName); } } - /// Lists the associated resources for this identity. + /// + /// Lists all the userAssignedIdentities available under the specified subscription. + /// + /// The Id of the Subscription to which the identity belongs. + /// 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.ManagedServiceIdentity.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 UserAssignedIdentitiesListBySubscription(string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-01-31"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Microsoft.ManagedIdentity/userAssignedIdentities" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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.ManagedServiceIdentity.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.UserAssignedIdentitiesListBySubscription_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// + /// Lists all the userAssignedIdentities available under the specified subscription. + /// /// The Id of the Subscription to which the identity belongs. - /// The name of the Resource Group to which the identity belongs. - /// The name of the identity resource. - /// OData filter expression to apply to the query. - /// OData orderBy expression to apply to the query. - /// Number of records to return. - /// Number of records to skip. - /// A skip token is used to continue retrieving items after an operation returns a partial result. - /// If a previous response contains a nextLink element, the value of the nextLink element will include a skipToken parameter - /// that specifies a starting point to use for subsequent calls. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). @@ -1614,7 +3787,7 @@ public partial class ManagedServiceIdentityClient /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task UserAssignedIdentitiesListAssociatedResources(string subscriptionId, string resourceGroupName, string resourceName, string Filter, string Orderby, int? Top, int? Skip, string Skiptoken, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task UserAssignedIdentitiesListBySubscription1(string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.ISendAsync sender) { var apiVersion = @"2022-01-31-preview"; // Constant Parameters @@ -1624,22 +3797,8 @@ public partial class ManagedServiceIdentityClient var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" + global::System.Uri.EscapeDataString(subscriptionId) - + "/resourceGroups/" - + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.ManagedIdentity/userAssignedIdentities/" - + global::System.Uri.EscapeDataString(resourceName) - + "/listAssociatedResources" + + "/providers/Microsoft.ManagedIdentity/userAssignedIdentities" + "?" - + (string.IsNullOrEmpty(Filter) ? global::System.String.Empty : "$filter=" + global::System.Uri.EscapeDataString(Filter)) - + "&" - + (string.IsNullOrEmpty(Orderby) ? global::System.String.Empty : "$orderby=" + global::System.Uri.EscapeDataString(Orderby)) - + "&" - + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString())) - + "&" - + (null == Skip ? global::System.String.Empty : "$skip=" + global::System.Uri.EscapeDataString(Skip.ToString())) - + "&" - + (string.IsNullOrEmpty(Skiptoken) ? global::System.String.Empty : "$skiptoken=" + global::System.Uri.EscapeDataString(Skiptoken)) - + "&" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -1647,24 +3806,19 @@ public partial class ManagedServiceIdentityClient // 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.ManagedServiceIdentity.Runtime.Method.Post, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.UserAssignedIdentitiesListAssociatedResources_Call(request,onOk,onDefault,eventListener,sender); + await this.UserAssignedIdentitiesListBySubscription1_Call(request,onOk,onDefault,eventListener,sender); } } - /// Lists the associated resources for this identity. - /// - /// OData filter expression to apply to the query. - /// OData orderBy expression to apply to the query. - /// Number of records to return. - /// Number of records to skip. - /// A skip token is used to continue retrieving items after an operation returns a partial result. - /// If a previous response contains a nextLink element, the value of the nextLink element will include a skipToken parameter - /// that specifies a starting point to use for subsequent calls. + /// + /// Lists all the userAssignedIdentities available under the specified subscription. + /// + /// /// 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). @@ -1673,7 +3827,7 @@ public partial class ManagedServiceIdentityClient /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task UserAssignedIdentitiesListAssociatedResourcesViaIdentity(global::System.String viaIdentity, string Filter, string Orderby, int? Top, int? Skip, string Skiptoken, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task UserAssignedIdentitiesListBySubscription1ViaIdentity(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.ManagedServiceIdentity.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.ISendAsync sender) { var apiVersion = @"2022-01-31-preview"; // Constant Parameters @@ -1681,36 +3835,20 @@ public partial class ManagedServiceIdentityClient { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ManagedIdentity/userAssignedIdentities/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Microsoft.ManagedIdentity/userAssignedIdentities$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{resourceName}/listAssociatedResources'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Microsoft.ManagedIdentity/userAssignedIdentities'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; - var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var resourceName = _match.Groups["resourceName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" + subscriptionId - + "/resourceGroups/" - + resourceGroupName - + "/providers/Microsoft.ManagedIdentity/userAssignedIdentities/" - + resourceName - + "/listAssociatedResources" + + "/providers/Microsoft.ManagedIdentity/userAssignedIdentities" + "?" - + (string.IsNullOrEmpty(Filter) ? global::System.String.Empty : "$filter=" + global::System.Uri.EscapeDataString(Filter)) - + "&" - + (string.IsNullOrEmpty(Orderby) ? global::System.String.Empty : "$orderby=" + global::System.Uri.EscapeDataString(Orderby)) - + "&" - + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString())) - + "&" - + (null == Skip ? global::System.String.Empty : "$skip=" + global::System.Uri.EscapeDataString(Skip.ToString())) - + "&" - + (string.IsNullOrEmpty(Skiptoken) ? global::System.String.Empty : "$skiptoken=" + global::System.Uri.EscapeDataString(Skiptoken)) - + "&" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -1718,17 +3856,17 @@ public partial class ManagedServiceIdentityClient // 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.ManagedServiceIdentity.Runtime.Method.Post, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.UserAssignedIdentitiesListAssociatedResources_Call(request,onOk,onDefault,eventListener,sender); + await this.UserAssignedIdentitiesListBySubscription1_Call(request,onOk,onDefault,eventListener,sender); } } /// - /// Actual wire call for method. + /// Actual wire call for method. /// /// the prepared HttpRequestMessage to send. /// a delegate that is called when the remote service returns 200 (OK). @@ -1739,7 +3877,7 @@ public partial class ManagedServiceIdentityClient /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task UserAssignedIdentitiesListAssociatedResources_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.ManagedServiceIdentity.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task UserAssignedIdentitiesListBySubscription1_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.ManagedServiceIdentity.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -1757,13 +3895,13 @@ public partial class ManagedServiceIdentityClient case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.AssociatedResourcesListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.UserAssignedIdentitiesListResultAutoGenerated.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.CloudErrorAutoGenerated.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -1779,83 +3917,24 @@ public partial class ManagedServiceIdentityClient } /// - /// Validation method for method. Call this like the actual call, + /// Validation method for method. Call this like the actual call, /// but you will get validation events back. /// /// The Id of the Subscription to which the identity belongs. - /// The name of the Resource Group to which the identity belongs. - /// The name of the identity resource. - /// OData filter expression to apply to the query. - /// OData orderBy expression to apply to the query. - /// Number of records to return. - /// Number of records to skip. - /// A skip token is used to continue retrieving items after an operation returns a partial result. - /// If a previous response contains a nextLink element, the value of the nextLink element will include a skipToken parameter - /// that specifies a starting point to use for subsequent calls. /// an instance that will receive events. /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task UserAssignedIdentitiesListAssociatedResources_Validate(string subscriptionId, string resourceGroupName, string resourceName, string Filter, string Orderby, int? Top, int? Skip, string Skiptoken, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task UserAssignedIdentitiesListBySubscription1_Validate(string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); - await eventListener.AssertNotNull(nameof(resourceName),resourceName); - await eventListener.AssertNotNull(nameof(Filter),Filter); - await eventListener.AssertNotNull(nameof(Orderby),Orderby); - await eventListener.AssertIsGreaterThanOrEqual(nameof(Top),Top,1); - await eventListener.AssertIsGreaterThanOrEqual(nameof(Skip),Skip,1); - await eventListener.AssertNotNull(nameof(Skiptoken),Skiptoken); - } - } - - /// - /// Lists all the userAssignedIdentities available under the specified ResourceGroup. - /// - /// The Id of the Subscription to which the identity belongs. - /// The name of the Resource Group to which the identity belongs. - /// 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.ManagedServiceIdentity.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 UserAssignedIdentitiesListByResourceGroup(string subscriptionId, string resourceGroupName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.ISendAsync sender) - { - var apiVersion = @"2022-01-31-preview"; - // Constant Parameters - using( NoSynchronizationContext ) - { - // construct URL - var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/subscriptions/" - + global::System.Uri.EscapeDataString(subscriptionId) - + "/resourceGroups/" - + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.ManagedIdentity/userAssignedIdentities" - + "?" - + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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.ManagedServiceIdentity.Runtime.Method.Get, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // make the call - await this.UserAssignedIdentitiesListByResourceGroup_Call(request,onOk,onDefault,eventListener,sender); } } /// - /// Lists all the userAssignedIdentities available under the specified ResourceGroup. + /// Lists all the userAssignedIdentities available under the specified subscription. /// /// /// a delegate that is called when the remote service returns 200 (OK). @@ -1866,29 +3945,26 @@ public partial class ManagedServiceIdentityClient /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task UserAssignedIdentitiesListByResourceGroupViaIdentity(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.ManagedServiceIdentity.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task UserAssignedIdentitiesListBySubscriptionViaIdentity(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.ManagedServiceIdentity.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.ISendAsync sender) { - var apiVersion = @"2022-01-31-preview"; + var apiVersion = @"2023-01-31"; // Constant Parameters using( NoSynchronizationContext ) { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ManagedIdentity/userAssignedIdentities$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Microsoft.ManagedIdentity/userAssignedIdentities$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Microsoft.ManagedIdentity/userAssignedIdentities'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; - var resourceGroupName = _match.Groups["resourceGroupName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" + subscriptionId - + "/resourceGroups/" - + resourceGroupName + "/providers/Microsoft.ManagedIdentity/userAssignedIdentities" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) @@ -1903,12 +3979,12 @@ public partial class ManagedServiceIdentityClient await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.UserAssignedIdentitiesListByResourceGroup_Call(request,onOk,onDefault,eventListener,sender); + await this.UserAssignedIdentitiesListBySubscription_Call(request,onOk,onDefault,eventListener,sender); } } /// - /// Actual wire call for method. + /// Actual wire call for method. /// /// the prepared HttpRequestMessage to send. /// a delegate that is called when the remote service returns 200 (OK). @@ -1919,7 +3995,7 @@ public partial class ManagedServiceIdentityClient /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task UserAssignedIdentitiesListByResourceGroup_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.ManagedServiceIdentity.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task UserAssignedIdentitiesListBySubscription_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.ManagedServiceIdentity.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -1937,13 +4013,13 @@ public partial class ManagedServiceIdentityClient case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.UserAssignedIdentitiesListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.UserAssignedIdentitiesListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -1959,28 +4035,75 @@ public partial class ManagedServiceIdentityClient } /// - /// Validation method for method. Call this like the actual call, + /// Validation method for method. Call this like the actual call, /// but you will get validation events back. /// /// The Id of the Subscription to which the identity belongs. - /// The name of the Resource Group to which the identity belongs. /// 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 UserAssignedIdentitiesListByResourceGroup_Validate(string subscriptionId, string resourceGroupName, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task UserAssignedIdentitiesListBySubscription_Validate(string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); } } - /// - /// Lists all the userAssignedIdentities available under the specified subscription. - /// + /// Update an identity in the specified subscription and resource group. + /// The Id of the Subscription to which the identity belongs. + /// The name of the Resource Group to which the identity belongs. + /// The name of the identity resource. + /// Parameters to update the identity + /// 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.ManagedServiceIdentity.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 UserAssignedIdentitiesUpdate(string subscriptionId, string resourceGroupName, string resourceName, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IIdentityUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-01-31"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ManagedIdentity/userAssignedIdentities/" + + global::System.Uri.EscapeDataString(resourceName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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.ManagedServiceIdentity.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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.ManagedServiceIdentity.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.UserAssignedIdentitiesUpdate_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Update an identity in the specified subscription and resource group. /// The Id of the Subscription to which the identity belongs. + /// The name of the Resource Group to which the identity belongs. + /// The name of the identity resource. + /// Parameters to update the identity /// 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). @@ -1989,7 +4112,7 @@ public partial class ManagedServiceIdentityClient /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task UserAssignedIdentitiesListBySubscription(string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task UserAssignedIdentitiesUpdate1(string subscriptionId, string resourceGroupName, string resourceName, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityUpdateAutoGenerated body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.ISendAsync sender) { var apiVersion = @"2022-01-31-preview"; // Constant Parameters @@ -1999,7 +4122,10 @@ public partial class ManagedServiceIdentityClient var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" + global::System.Uri.EscapeDataString(subscriptionId) - + "/providers/Microsoft.ManagedIdentity/userAssignedIdentities" + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ManagedIdentity/userAssignedIdentities/" + + global::System.Uri.EscapeDataString(resourceName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -2008,19 +4134,22 @@ public partial class ManagedServiceIdentityClient // 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.ManagedServiceIdentity.Runtime.Method.Get, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Method.Patch, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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.ManagedServiceIdentity.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.UserAssignedIdentitiesListBySubscription_Call(request,onOk,onDefault,eventListener,sender); + await this.UserAssignedIdentitiesUpdate1_Call(request,onOk,onDefault,eventListener,sender); } } - /// - /// Lists all the userAssignedIdentities available under the specified subscription. - /// + /// Update an identity in the specified subscription and resource group. /// + /// Parameters to update the identity /// 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). @@ -2029,7 +4158,7 @@ public partial class ManagedServiceIdentityClient /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task UserAssignedIdentitiesListBySubscriptionViaIdentity(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.ManagedServiceIdentity.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task UserAssignedIdentitiesUpdate1ViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityUpdateAutoGenerated body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.ISendAsync sender) { var apiVersion = @"2022-01-31-preview"; // Constant Parameters @@ -2037,19 +4166,24 @@ public partial class ManagedServiceIdentityClient { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Microsoft.ManagedIdentity/userAssignedIdentities$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ManagedIdentity/userAssignedIdentities/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Microsoft.ManagedIdentity/userAssignedIdentities'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{resourceName}'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var resourceName = _match.Groups["resourceName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" + subscriptionId - + "/providers/Microsoft.ManagedIdentity/userAssignedIdentities" + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.ManagedIdentity/userAssignedIdentities/" + + resourceName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -2058,18 +4192,20 @@ public partial class ManagedServiceIdentityClient // 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.ManagedServiceIdentity.Runtime.Method.Get, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Method.Patch, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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.ManagedServiceIdentity.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.UserAssignedIdentitiesListBySubscription_Call(request,onOk,onDefault,eventListener,sender); + await this.UserAssignedIdentitiesUpdate1_Call(request,onOk,onDefault,eventListener,sender); } } - /// - /// Actual wire call for method. - /// + /// Actual wire call for method. /// the prepared HttpRequestMessage to send. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled @@ -2079,7 +4215,7 @@ public partial class ManagedServiceIdentityClient /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task UserAssignedIdentitiesListBySubscription_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.ManagedServiceIdentity.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task UserAssignedIdentitiesUpdate1_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.ManagedServiceIdentity.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -2097,13 +4233,13 @@ public partial class ManagedServiceIdentityClient case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.UserAssignedIdentitiesListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IdentityAutoGenerated.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.CloudErrorAutoGenerated.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -2119,67 +4255,26 @@ public partial class ManagedServiceIdentityClient } /// - /// 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 Subscription to which the identity belongs. - /// 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 UserAssignedIdentitiesListBySubscription_Validate(string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.IEventListener eventListener) - { - using( NoSynchronizationContext ) - { - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - } - } - - /// Update an identity in the specified subscription and resource group. - /// The Id of the Subscription to which the identity belongs. /// The name of the Resource Group to which the identity belongs. /// The name of the identity resource. /// Parameters to update the identity - /// 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.ManagedServiceIdentity.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 UserAssignedIdentitiesUpdate(string subscriptionId, string resourceGroupName, string resourceName, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task UserAssignedIdentitiesUpdate1_Validate(string subscriptionId, string resourceGroupName, string resourceName, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityUpdateAutoGenerated body, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.IEventListener eventListener) { - var apiVersion = @"2022-01-31-preview"; - // Constant Parameters using( NoSynchronizationContext ) { - // construct URL - var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/subscriptions/" - + global::System.Uri.EscapeDataString(subscriptionId) - + "/resourceGroups/" - + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.ManagedIdentity/userAssignedIdentities/" - + global::System.Uri.EscapeDataString(resourceName) - + "?" - + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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.ManagedServiceIdentity.Runtime.Method.Patch, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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.ManagedServiceIdentity.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } - // make the call - await this.UserAssignedIdentitiesUpdate_Call(request,onOk,onDefault,eventListener,sender); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertNotNull(nameof(resourceName),resourceName); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); } } @@ -2194,9 +4289,9 @@ public partial class ManagedServiceIdentityClient /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task UserAssignedIdentitiesUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task UserAssignedIdentitiesUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IIdentityUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.ISendAsync sender) { - var apiVersion = @"2022-01-31-preview"; + var apiVersion = @"2023-01-31"; // Constant Parameters using( NoSynchronizationContext ) { @@ -2251,7 +4346,7 @@ public partial class ManagedServiceIdentityClient /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task UserAssignedIdentitiesUpdate_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.ManagedServiceIdentity.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task UserAssignedIdentitiesUpdate_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.ManagedServiceIdentity.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -2269,13 +4364,13 @@ public partial class ManagedServiceIdentityClient case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.Identity.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.Identity.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -2302,7 +4397,7 @@ public partial class ManagedServiceIdentityClient /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task UserAssignedIdentitiesUpdate_Validate(string subscriptionId, string resourceGroupName, string resourceName, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityUpdate body, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task UserAssignedIdentitiesUpdate_Validate(string subscriptionId, string resourceGroupName, string resourceName, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IIdentityUpdate body, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { diff --git a/src/ManagedServiceIdentity/generated/api/Models/Api10/ProxyResource.PowerShell.cs b/src/ManagedServiceIdentity/generated/api/Models/Api10/ProxyResource.PowerShell.cs index 20c428ac151e..5c6f21536c06 100644 --- a/src/ManagedServiceIdentity/generated/api/Models/Api10/ProxyResource.PowerShell.cs +++ b/src/ManagedServiceIdentity/generated/api/Models/Api10/ProxyResource.PowerShell.cs @@ -113,15 +113,15 @@ internal ProxyResource(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Id")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal)this).Id, global::System.Convert.ToString); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal)this).Type, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } @@ -142,15 +142,15 @@ internal ProxyResource(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("Id")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal)this).Id, global::System.Convert.ToString); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal)this).Type, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/src/ManagedServiceIdentity/generated/api/Models/Api10/ProxyResource.cs b/src/ManagedServiceIdentity/generated/api/Models/Api10/ProxyResource.cs index 084f47e87119..5b5e2afc62e1 100644 --- a/src/ManagedServiceIdentity/generated/api/Models/Api10/ProxyResource.cs +++ b/src/ManagedServiceIdentity/generated/api/Models/Api10/ProxyResource.cs @@ -16,35 +16,35 @@ public partial class ProxyResource : Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.IValidates { /// - /// Backing field for Inherited model /// - private Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.Resource(); + private Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGenerated __resourceAutoGenerated = new Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.ResourceAutoGenerated(); /// /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} /// [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Inherited)] - public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal)__resource).Id; } + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal)__resourceAutoGenerated).Id; } /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal)__resource).Id = value; } + string Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal)__resourceAutoGenerated).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal)__resourceAutoGenerated).Id = value; } /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal)__resource).Name = value; } + string Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal)__resourceAutoGenerated).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal)__resourceAutoGenerated).Name = value; } /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal)__resource).Type = value; } + string Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal)__resourceAutoGenerated).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal)__resourceAutoGenerated).Type = value; } /// The name of the resource [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Inherited)] - public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal)__resource).Name; } + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal)__resourceAutoGenerated).Name; } /// /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" /// [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Inherited)] - public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal)__resource).Type; } + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal)__resourceAutoGenerated).Type; } /// Creates an new instance. public ProxyResource() @@ -60,20 +60,20 @@ public ProxyResource() /// public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.IEventListener eventListener) { - await eventListener.AssertNotNull(nameof(__resource), __resource); - await eventListener.AssertObjectIsValid(nameof(__resource), __resource); + await eventListener.AssertNotNull(nameof(__resourceAutoGenerated), __resourceAutoGenerated); + await eventListener.AssertObjectIsValid(nameof(__resourceAutoGenerated), __resourceAutoGenerated); } } /// 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.ManagedServiceIdentity.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResource + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGenerated { } /// 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.ManagedServiceIdentity.Models.Api10.IResourceInternal + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal { } diff --git a/src/ManagedServiceIdentity/generated/api/Models/Api10/ProxyResource.json.cs b/src/ManagedServiceIdentity/generated/api/Models/Api10/ProxyResource.json.cs index 829d0d6dd2e7..30eb78a4e305 100644 --- a/src/ManagedServiceIdentity/generated/api/Models/Api10/ProxyResource.json.cs +++ b/src/ManagedServiceIdentity/generated/api/Models/Api10/ProxyResource.json.cs @@ -79,7 +79,7 @@ internal ProxyResource(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity { return; } - __resource = new Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.Resource(json); + __resourceAutoGenerated = new Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.ResourceAutoGenerated(json); AfterFromJson(json); } @@ -102,7 +102,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.Js { return container; } - __resource?.ToJson(container, serializationMode); + __resourceAutoGenerated?.ToJson(container, serializationMode); AfterToJson(ref container); return container; } diff --git a/src/ManagedServiceIdentity/generated/api/Models/Api10/Resource.PowerShell.cs b/src/ManagedServiceIdentity/generated/api/Models/Api10/ResourceAutoGenerated.PowerShell.cs similarity index 72% rename from src/ManagedServiceIdentity/generated/api/Models/Api10/Resource.PowerShell.cs rename to src/ManagedServiceIdentity/generated/api/Models/Api10/ResourceAutoGenerated.PowerShell.cs index 07ce0af7fab4..211def2ec2e5 100644 --- a/src/ManagedServiceIdentity/generated/api/Models/Api10/Resource.PowerShell.cs +++ b/src/ManagedServiceIdentity/generated/api/Models/Api10/ResourceAutoGenerated.PowerShell.cs @@ -10,8 +10,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10 /// /// Common fields that are returned in the response for all Azure Resource Manager resources /// - [System.ComponentModel.TypeConverter(typeof(ResourceTypeConverter))] - public partial class Resource + [System.ComponentModel.TypeConverter(typeof(ResourceAutoGeneratedTypeConverter))] + public partial class ResourceAutoGenerated { /// @@ -65,44 +65,46 @@ 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.ManagedServiceIdentity.Models.Api10.IResource DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGenerated DeserializeFromDictionary(global::System.Collections.IDictionary content) { - return new Resource(content); + return new ResourceAutoGenerated(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGenerated DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { - return new Resource(content); + return new ResourceAutoGenerated(content); } /// - /// Creates a new instance of , deserializing the content from a json string. + /// Creates a new instance of , deserializing the content from a json string. /// /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode.Parse(jsonText)); + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGenerated FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. - internal Resource(global::System.Collections.IDictionary content) + internal ResourceAutoGenerated(global::System.Collections.IDictionary content) { bool returnNow = false; BeforeDeserializeDictionary(content, ref returnNow); @@ -113,25 +115,25 @@ internal Resource(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Id")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal)this).Id, global::System.Convert.ToString); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal)this).Type, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. - internal Resource(global::System.Management.Automation.PSObject content) + internal ResourceAutoGenerated(global::System.Management.Automation.PSObject content) { bool returnNow = false; BeforeDeserializePSObject(content, ref returnNow); @@ -142,15 +144,15 @@ internal Resource(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("Id")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal)this).Id, global::System.Convert.ToString); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal)this).Type, global::System.Convert.ToString); } AfterDeserializePSObject(content); } @@ -173,8 +175,8 @@ public override string ToString() } } /// Common fields that are returned in the response for all Azure Resource Manager resources - [System.ComponentModel.TypeConverter(typeof(ResourceTypeConverter))] - public partial interface IResource + [System.ComponentModel.TypeConverter(typeof(ResourceAutoGeneratedTypeConverter))] + public partial interface IResourceAutoGenerated { diff --git a/src/ManagedServiceIdentity/generated/api/Models/Api10/ResourceAutoGenerated.TypeConverter.cs b/src/ManagedServiceIdentity/generated/api/Models/Api10/ResourceAutoGenerated.TypeConverter.cs new file mode 100644 index 000000000000..7c8b73875aae --- /dev/null +++ b/src/ManagedServiceIdentity/generated/api/Models/Api10/ResourceAutoGenerated.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10 +{ + using Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ResourceAutoGeneratedTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGenerated ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGenerated).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ResourceAutoGenerated.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ResourceAutoGenerated.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ResourceAutoGenerated.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/ManagedServiceIdentity/generated/api/Models/Api10/Resource.cs b/src/ManagedServiceIdentity/generated/api/Models/Api10/ResourceAutoGenerated.cs similarity index 87% rename from src/ManagedServiceIdentity/generated/api/Models/Api10/Resource.cs rename to src/ManagedServiceIdentity/generated/api/Models/Api10/ResourceAutoGenerated.cs index 5ec63a4f5586..25a7f3fe620b 100644 --- a/src/ManagedServiceIdentity/generated/api/Models/Api10/Resource.cs +++ b/src/ManagedServiceIdentity/generated/api/Models/Api10/ResourceAutoGenerated.cs @@ -10,9 +10,9 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10 /// /// Common fields that are returned in the response for all Azure Resource Manager resources /// - public partial class Resource : - Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResource, - Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal + public partial class ResourceAutoGenerated : + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGenerated, + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal { /// Backing field for property. @@ -25,13 +25,13 @@ public partial class Resource : public string Id { get => this._id; } /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal.Id { get => this._id; set { {_id = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal.Id { get => this._id; set { {_id = value;} } } /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal.Name { get => this._name; set { {_name = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal.Name { get => this._name; set { {_name = value;} } } /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal.Type { get => this._type; set { {_type = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal.Type { get => this._type; set { {_type = value;} } } /// Backing field for property. private string _name; @@ -49,14 +49,14 @@ public partial class Resource : [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Owned)] public string Type { get => this._type; } - /// Creates an new instance. - public Resource() + /// Creates an new instance. + public ResourceAutoGenerated() { } } /// Common fields that are returned in the response for all Azure Resource Manager resources - public partial interface IResource : + public partial interface IResourceAutoGenerated : Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.IJsonSerializable { /// @@ -90,7 +90,7 @@ public partial interface IResource : } /// Common fields that are returned in the response for all Azure Resource Manager resources - internal partial interface IResourceInternal + internal partial interface IResourceAutoGeneratedInternal { /// diff --git a/src/ManagedServiceIdentity/generated/api/Models/Api10/ResourceAutoGenerated.json.cs b/src/ManagedServiceIdentity/generated/api/Models/Api10/ResourceAutoGenerated.json.cs new file mode 100644 index 000000000000..68b72b2639d4 --- /dev/null +++ b/src/ManagedServiceIdentity/generated/api/Models/Api10/ResourceAutoGenerated.json.cs @@ -0,0 +1,123 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Extensions; + + /// + /// Common fields that are returned in the response for all Azure Resource Manager resources + /// + public partial class ResourceAutoGenerated + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGenerated. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGenerated. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGenerated FromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject json ? new ResourceAutoGenerated(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject instance to deserialize from. + internal ResourceAutoGenerated(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)Id;} + {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} + {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)Type;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonString(this._id.ToString()) : null, "id" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._type)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonString(this._type.ToString()) : null, "type" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/ManagedServiceIdentity/generated/api/Models/Api10/TrackedResource.PowerShell.cs b/src/ManagedServiceIdentity/generated/api/Models/Api10/TrackedResourceAutoGenerated.PowerShell.cs similarity index 66% rename from src/ManagedServiceIdentity/generated/api/Models/Api10/TrackedResource.PowerShell.cs rename to src/ManagedServiceIdentity/generated/api/Models/Api10/TrackedResourceAutoGenerated.PowerShell.cs index 68e1fbcc3678..083a6d51e35e 100644 --- a/src/ManagedServiceIdentity/generated/api/Models/Api10/TrackedResource.PowerShell.cs +++ b/src/ManagedServiceIdentity/generated/api/Models/Api10/TrackedResourceAutoGenerated.PowerShell.cs @@ -10,8 +10,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10 /// /// The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' /// - [System.ComponentModel.TypeConverter(typeof(TrackedResourceTypeConverter))] - public partial class TrackedResource + [System.ComponentModel.TypeConverter(typeof(TrackedResourceAutoGeneratedTypeConverter))] + public partial class TrackedResourceAutoGenerated { /// @@ -65,37 +65,39 @@ public partial class TrackedResource partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.ITrackedResource DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.ITrackedResourceAutoGenerated DeserializeFromDictionary(global::System.Collections.IDictionary content) { - return new TrackedResource(content); + return new TrackedResourceAutoGenerated(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.ManagedServiceIdentity.Models.Api10.ITrackedResource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.ITrackedResourceAutoGenerated DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { - return new TrackedResource(content); + return new TrackedResourceAutoGenerated(content); } /// - /// Creates a new instance of , deserializing the content from a json string. + /// Creates a new instance of , deserializing the content from a json string. /// /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.ITrackedResource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode.Parse(jsonText)); + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.ITrackedResourceAutoGenerated FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. @@ -115,11 +117,11 @@ public override string ToString() } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. - internal TrackedResource(global::System.Collections.IDictionary content) + internal TrackedResourceAutoGenerated(global::System.Collections.IDictionary content) { bool returnNow = false; BeforeDeserializeDictionary(content, ref returnNow); @@ -130,33 +132,33 @@ internal TrackedResource(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Tag")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.TrackedResourceTagsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.ITrackedResourceAutoGeneratedInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.ITrackedResourceAutoGeneratedInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.TrackedResourceTagsTypeConverter.ConvertFrom); } if (content.Contains("Location")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.ITrackedResourceInternal)this).Location, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.ITrackedResourceAutoGeneratedInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.ITrackedResourceAutoGeneratedInternal)this).Location, global::System.Convert.ToString); } if (content.Contains("Id")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal)this).Id, global::System.Convert.ToString); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal)this).Type, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. - internal TrackedResource(global::System.Management.Automation.PSObject content) + internal TrackedResourceAutoGenerated(global::System.Management.Automation.PSObject content) { bool returnNow = false; BeforeDeserializePSObject(content, ref returnNow); @@ -167,30 +169,30 @@ internal TrackedResource(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("Tag")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.TrackedResourceTagsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.ITrackedResourceAutoGeneratedInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.ITrackedResourceAutoGeneratedInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.TrackedResourceTagsTypeConverter.ConvertFrom); } if (content.Contains("Location")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.ITrackedResourceInternal)this).Location, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.ITrackedResourceAutoGeneratedInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.ITrackedResourceAutoGeneratedInternal)this).Location, global::System.Convert.ToString); } if (content.Contains("Id")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal)this).Id, global::System.Convert.ToString); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal)this).Type, global::System.Convert.ToString); } AfterDeserializePSObject(content); } } /// The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' - [System.ComponentModel.TypeConverter(typeof(TrackedResourceTypeConverter))] - public partial interface ITrackedResource + [System.ComponentModel.TypeConverter(typeof(TrackedResourceAutoGeneratedTypeConverter))] + public partial interface ITrackedResourceAutoGenerated { diff --git a/src/ManagedServiceIdentity/generated/api/Models/Api10/TrackedResourceAutoGenerated.TypeConverter.cs b/src/ManagedServiceIdentity/generated/api/Models/Api10/TrackedResourceAutoGenerated.TypeConverter.cs new file mode 100644 index 000000000000..dae8144c52cf --- /dev/null +++ b/src/ManagedServiceIdentity/generated/api/Models/Api10/TrackedResourceAutoGenerated.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10 +{ + using Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class TrackedResourceAutoGeneratedTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.ITrackedResourceAutoGenerated ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.ITrackedResourceAutoGenerated).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return TrackedResourceAutoGenerated.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return TrackedResourceAutoGenerated.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return TrackedResourceAutoGenerated.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/ManagedServiceIdentity/generated/api/Models/Api10/TrackedResource.cs b/src/ManagedServiceIdentity/generated/api/Models/Api10/TrackedResourceAutoGenerated.cs similarity index 73% rename from src/ManagedServiceIdentity/generated/api/Models/Api10/TrackedResource.cs rename to src/ManagedServiceIdentity/generated/api/Models/Api10/TrackedResourceAutoGenerated.cs index f92f54589b1d..e531babf0546 100644 --- a/src/ManagedServiceIdentity/generated/api/Models/Api10/TrackedResource.cs +++ b/src/ManagedServiceIdentity/generated/api/Models/Api10/TrackedResourceAutoGenerated.cs @@ -10,22 +10,22 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10 /// /// The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' /// - public partial class TrackedResource : - Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.ITrackedResource, - Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.ITrackedResourceInternal, + public partial class TrackedResourceAutoGenerated : + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.ITrackedResourceAutoGenerated, + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.ITrackedResourceAutoGeneratedInternal, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.IValidates { /// - /// Backing field for Inherited model /// - private Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.Resource(); + private Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGenerated __resourceAutoGenerated = new Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.ResourceAutoGenerated(); /// /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} /// [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Inherited)] - public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal)__resource).Id; } + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal)__resourceAutoGenerated).Id; } /// Backing field for property. private string _location; @@ -35,17 +35,17 @@ public partial class TrackedResource : public string Location { get => this._location; set => this._location = value; } /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal)__resource).Id = value; } + string Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal)__resourceAutoGenerated).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal)__resourceAutoGenerated).Id = value; } /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal)__resource).Name = value; } + string Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal)__resourceAutoGenerated).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal)__resourceAutoGenerated).Name = value; } /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal)__resource).Type = value; } + string Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal)__resourceAutoGenerated).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal)__resourceAutoGenerated).Type = value; } /// The name of the resource [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Inherited)] - public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal)__resource).Name; } + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal)__resourceAutoGenerated).Name; } /// Backing field for property. private Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.ITrackedResourceTags _tag; @@ -58,10 +58,10 @@ public partial class TrackedResource : /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" /// [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Inherited)] - public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal)__resource).Type; } + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal)__resourceAutoGenerated).Type; } - /// Creates an new instance. - public TrackedResource() + /// Creates an new instance. + public TrackedResourceAutoGenerated() { } @@ -74,14 +74,14 @@ public TrackedResource() /// public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.IEventListener eventListener) { - await eventListener.AssertNotNull(nameof(__resource), __resource); - await eventListener.AssertObjectIsValid(nameof(__resource), __resource); + await eventListener.AssertNotNull(nameof(__resourceAutoGenerated), __resourceAutoGenerated); + await eventListener.AssertObjectIsValid(nameof(__resourceAutoGenerated), __resourceAutoGenerated); } } /// The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' - public partial interface ITrackedResource : + public partial interface ITrackedResourceAutoGenerated : Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResource + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGenerated { /// The geo-location where the resource lives [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Info( @@ -102,8 +102,8 @@ public partial interface ITrackedResource : } /// The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' - internal partial interface ITrackedResourceInternal : - Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal + internal partial interface ITrackedResourceAutoGeneratedInternal : + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal { /// The geo-location where the resource lives string Location { get; set; } diff --git a/src/ManagedServiceIdentity/generated/api/Models/Api10/TrackedResourceAutoGenerated.json.cs b/src/ManagedServiceIdentity/generated/api/Models/Api10/TrackedResourceAutoGenerated.json.cs new file mode 100644 index 000000000000..d0f28f680e4a --- /dev/null +++ b/src/ManagedServiceIdentity/generated/api/Models/Api10/TrackedResourceAutoGenerated.json.cs @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Extensions; + + /// + /// The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' + /// + public partial class TrackedResourceAutoGenerated + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.ITrackedResourceAutoGenerated. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.ITrackedResourceAutoGenerated. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.ITrackedResourceAutoGenerated FromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject json ? new TrackedResourceAutoGenerated(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __resourceAutoGenerated?.ToJson(container, serializationMode); + AddIf( null != this._tag ? (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode) this._tag.ToJson(null,serializationMode) : null, "tags" ,container.Add ); + AddIf( null != (((object)this._location)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonString(this._location.ToString()) : null, "location" ,container.Add ); + AfterToJson(ref container); + return container; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject instance to deserialize from. + internal TrackedResourceAutoGenerated(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __resourceAutoGenerated = new Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.ResourceAutoGenerated(json); + {_tag = If( json?.PropertyT("tags"), out var __jsonTags) ? Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.TrackedResourceTags.FromJson(__jsonTags) : Tag;} + {_location = If( json?.PropertyT("location"), out var __jsonLocation) ? (string)__jsonLocation : (string)Location;} + AfterFromJson(json); + } + } +} \ No newline at end of file diff --git a/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/CloudErrorAutoGenerated.PowerShell.cs b/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/CloudErrorAutoGenerated.PowerShell.cs new file mode 100644 index 000000000000..4119018d4f05 --- /dev/null +++ b/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/CloudErrorAutoGenerated.PowerShell.cs @@ -0,0 +1,198 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.PowerShell; + + /// An error response from the ManagedServiceIdentity service. + [System.ComponentModel.TypeConverter(typeof(CloudErrorAutoGeneratedTypeConverter))] + public partial class CloudErrorAutoGenerated + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal CloudErrorAutoGenerated(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Error")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorAutoGeneratedInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorBodyAutoGenerated) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorAutoGeneratedInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.CloudErrorBodyAutoGeneratedTypeConverter.ConvertFrom); + } + if (content.Contains("Code")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorAutoGeneratedInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorAutoGeneratedInternal)this).Code, global::System.Convert.ToString); + } + if (content.Contains("Message")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorAutoGeneratedInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorAutoGeneratedInternal)this).Message, global::System.Convert.ToString); + } + if (content.Contains("Target")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorAutoGeneratedInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorAutoGeneratedInternal)this).Target, global::System.Convert.ToString); + } + if (content.Contains("Detail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorAutoGeneratedInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorBodyAutoGenerated[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorAutoGeneratedInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.CloudErrorBodyAutoGeneratedTypeConverter.ConvertFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal CloudErrorAutoGenerated(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Error")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorAutoGeneratedInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorBodyAutoGenerated) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorAutoGeneratedInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.CloudErrorBodyAutoGeneratedTypeConverter.ConvertFrom); + } + if (content.Contains("Code")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorAutoGeneratedInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorAutoGeneratedInternal)this).Code, global::System.Convert.ToString); + } + if (content.Contains("Message")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorAutoGeneratedInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorAutoGeneratedInternal)this).Message, global::System.Convert.ToString); + } + if (content.Contains("Target")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorAutoGeneratedInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorAutoGeneratedInternal)this).Target, global::System.Convert.ToString); + } + if (content.Contains("Detail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorAutoGeneratedInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorBodyAutoGenerated[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorAutoGeneratedInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.CloudErrorBodyAutoGeneratedTypeConverter.ConvertFrom)); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorAutoGenerated DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new CloudErrorAutoGenerated(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.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorAutoGenerated DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new CloudErrorAutoGenerated(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.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorAutoGenerated FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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.ManagedServiceIdentity.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// An error response from the ManagedServiceIdentity service. + [System.ComponentModel.TypeConverter(typeof(CloudErrorAutoGeneratedTypeConverter))] + public partial interface ICloudErrorAutoGenerated + + { + + } +} \ No newline at end of file diff --git a/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/CloudErrorAutoGenerated.TypeConverter.cs b/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/CloudErrorAutoGenerated.TypeConverter.cs new file mode 100644 index 000000000000..b2e1dd4f028f --- /dev/null +++ b/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/CloudErrorAutoGenerated.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class CloudErrorAutoGeneratedTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorAutoGenerated ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorAutoGenerated).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return CloudErrorAutoGenerated.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return CloudErrorAutoGenerated.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return CloudErrorAutoGenerated.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/CloudErrorAutoGenerated.cs b/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/CloudErrorAutoGenerated.cs new file mode 100644 index 000000000000..19a3087f9927 --- /dev/null +++ b/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/CloudErrorAutoGenerated.cs @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Extensions; + + /// An error response from the ManagedServiceIdentity service. + public partial class CloudErrorAutoGenerated : + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorAutoGenerated, + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorAutoGeneratedInternal + { + + /// An identifier for the error. + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Inlined)] + public string Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorBodyAutoGeneratedInternal)Error).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorBodyAutoGeneratedInternal)Error).Code = value ?? null; } + + /// A list of additional details about the error. + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorBodyAutoGenerated[] Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorBodyAutoGeneratedInternal)Error).Detail; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorBodyAutoGeneratedInternal)Error).Detail = value ?? null /* arrayOf */; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorBodyAutoGenerated _error; + + /// A list of additional details about the error. + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorBodyAutoGenerated Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.CloudErrorBodyAutoGenerated()); set => this._error = value; } + + /// + /// A message describing the error, intended to be suitable for display in a user interface. + /// + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Inlined)] + public string Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorBodyAutoGeneratedInternal)Error).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorBodyAutoGeneratedInternal)Error).Message = value ?? null; } + + /// Internal Acessors for Error + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorBodyAutoGenerated Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorAutoGeneratedInternal.Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.CloudErrorBodyAutoGenerated()); set { {_error = value;} } } + + /// + /// The target of the particular error. For example, the name of the property in error. + /// + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Inlined)] + public string Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorBodyAutoGeneratedInternal)Error).Target; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorBodyAutoGeneratedInternal)Error).Target = value ?? null; } + + /// Creates an new instance. + public CloudErrorAutoGenerated() + { + + } + } + /// An error response from the ManagedServiceIdentity service. + public partial interface ICloudErrorAutoGenerated : + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.IJsonSerializable + { + /// An identifier for the error. + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"An identifier for the error.", + SerializedName = @"code", + PossibleTypes = new [] { typeof(string) })] + string Code { get; set; } + /// A list of additional details about the error. + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A list of additional details about the error.", + SerializedName = @"details", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorBodyAutoGenerated) })] + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorBodyAutoGenerated[] Detail { get; set; } + /// + /// A message describing the error, intended to be suitable for display in a user interface. + /// + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A message describing the error, intended to be suitable for display in a user interface.", + SerializedName = @"message", + PossibleTypes = new [] { typeof(string) })] + string Message { get; set; } + /// + /// The target of the particular error. For example, the name of the property in error. + /// + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The target of the particular error. For example, the name of the property in error.", + SerializedName = @"target", + PossibleTypes = new [] { typeof(string) })] + string Target { get; set; } + + } + /// An error response from the ManagedServiceIdentity service. + internal partial interface ICloudErrorAutoGeneratedInternal + + { + /// An identifier for the error. + string Code { get; set; } + /// A list of additional details about the error. + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorBodyAutoGenerated[] Detail { get; set; } + /// A list of additional details about the error. + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorBodyAutoGenerated Error { get; set; } + /// + /// A message describing the error, intended to be suitable for display in a user interface. + /// + string Message { get; set; } + /// + /// The target of the particular error. For example, the name of the property in error. + /// + string Target { get; set; } + + } +} \ No newline at end of file diff --git a/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/CloudErrorAutoGenerated.json.cs b/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/CloudErrorAutoGenerated.json.cs new file mode 100644 index 000000000000..5f64b1057989 --- /dev/null +++ b/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/CloudErrorAutoGenerated.json.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Extensions; + + /// An error response from the ManagedServiceIdentity service. + public partial class CloudErrorAutoGenerated + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject instance to deserialize from. + internal CloudErrorAutoGenerated(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_error = If( json?.PropertyT("error"), out var __jsonError) ? Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.CloudErrorBodyAutoGenerated.FromJson(__jsonError) : Error;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorAutoGenerated. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorAutoGenerated. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorAutoGenerated FromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject json ? new CloudErrorAutoGenerated(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._error ? (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode) this._error.ToJson(null,serializationMode) : null, "error" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/CloudErrorBodyAutoGenerated.PowerShell.cs b/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/CloudErrorBodyAutoGenerated.PowerShell.cs new file mode 100644 index 000000000000..60ffa3ae884a --- /dev/null +++ b/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/CloudErrorBodyAutoGenerated.PowerShell.cs @@ -0,0 +1,190 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.PowerShell; + + /// An error response from the ManagedServiceIdentity service. + [System.ComponentModel.TypeConverter(typeof(CloudErrorBodyAutoGeneratedTypeConverter))] + public partial class CloudErrorBodyAutoGenerated + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal CloudErrorBodyAutoGenerated(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Code")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorBodyAutoGeneratedInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorBodyAutoGeneratedInternal)this).Code, global::System.Convert.ToString); + } + if (content.Contains("Message")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorBodyAutoGeneratedInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorBodyAutoGeneratedInternal)this).Message, global::System.Convert.ToString); + } + if (content.Contains("Target")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorBodyAutoGeneratedInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorBodyAutoGeneratedInternal)this).Target, global::System.Convert.ToString); + } + if (content.Contains("Detail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorBodyAutoGeneratedInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorBodyAutoGenerated[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorBodyAutoGeneratedInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.CloudErrorBodyAutoGeneratedTypeConverter.ConvertFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal CloudErrorBodyAutoGenerated(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Code")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorBodyAutoGeneratedInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorBodyAutoGeneratedInternal)this).Code, global::System.Convert.ToString); + } + if (content.Contains("Message")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorBodyAutoGeneratedInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorBodyAutoGeneratedInternal)this).Message, global::System.Convert.ToString); + } + if (content.Contains("Target")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorBodyAutoGeneratedInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorBodyAutoGeneratedInternal)this).Target, global::System.Convert.ToString); + } + if (content.Contains("Detail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorBodyAutoGeneratedInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorBodyAutoGenerated[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorBodyAutoGeneratedInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.CloudErrorBodyAutoGeneratedTypeConverter.ConvertFrom)); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorBodyAutoGenerated DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new CloudErrorBodyAutoGenerated(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.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorBodyAutoGenerated DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new CloudErrorBodyAutoGenerated(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.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorBodyAutoGenerated FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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.ManagedServiceIdentity.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// An error response from the ManagedServiceIdentity service. + [System.ComponentModel.TypeConverter(typeof(CloudErrorBodyAutoGeneratedTypeConverter))] + public partial interface ICloudErrorBodyAutoGenerated + + { + + } +} \ No newline at end of file diff --git a/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/CloudErrorBodyAutoGenerated.TypeConverter.cs b/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/CloudErrorBodyAutoGenerated.TypeConverter.cs new file mode 100644 index 000000000000..f346301e512a --- /dev/null +++ b/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/CloudErrorBodyAutoGenerated.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class CloudErrorBodyAutoGeneratedTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorBodyAutoGenerated ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorBodyAutoGenerated).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return CloudErrorBodyAutoGenerated.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return CloudErrorBodyAutoGenerated.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return CloudErrorBodyAutoGenerated.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/CloudErrorBodyAutoGenerated.cs b/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/CloudErrorBodyAutoGenerated.cs new file mode 100644 index 000000000000..5c20b7c4e21b --- /dev/null +++ b/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/CloudErrorBodyAutoGenerated.cs @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Extensions; + + /// An error response from the ManagedServiceIdentity service. + public partial class CloudErrorBodyAutoGenerated : + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorBodyAutoGenerated, + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorBodyAutoGeneratedInternal + { + + /// Backing field for property. + private string _code; + + /// An identifier for the error. + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Owned)] + public string Code { get => this._code; set => this._code = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorBodyAutoGenerated[] _detail; + + /// A list of additional details about the error. + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorBodyAutoGenerated[] Detail { get => this._detail; set => this._detail = value; } + + /// Backing field for property. + private string _message; + + /// + /// A message describing the error, intended to be suitable for display in a user interface. + /// + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Owned)] + public string Message { get => this._message; set => this._message = value; } + + /// Backing field for property. + private string _target; + + /// + /// The target of the particular error. For example, the name of the property in error. + /// + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Owned)] + public string Target { get => this._target; set => this._target = value; } + + /// Creates an new instance. + public CloudErrorBodyAutoGenerated() + { + + } + } + /// An error response from the ManagedServiceIdentity service. + public partial interface ICloudErrorBodyAutoGenerated : + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.IJsonSerializable + { + /// An identifier for the error. + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"An identifier for the error.", + SerializedName = @"code", + PossibleTypes = new [] { typeof(string) })] + string Code { get; set; } + /// A list of additional details about the error. + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A list of additional details about the error.", + SerializedName = @"details", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorBodyAutoGenerated) })] + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorBodyAutoGenerated[] Detail { get; set; } + /// + /// A message describing the error, intended to be suitable for display in a user interface. + /// + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A message describing the error, intended to be suitable for display in a user interface.", + SerializedName = @"message", + PossibleTypes = new [] { typeof(string) })] + string Message { get; set; } + /// + /// The target of the particular error. For example, the name of the property in error. + /// + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The target of the particular error. For example, the name of the property in error.", + SerializedName = @"target", + PossibleTypes = new [] { typeof(string) })] + string Target { get; set; } + + } + /// An error response from the ManagedServiceIdentity service. + internal partial interface ICloudErrorBodyAutoGeneratedInternal + + { + /// An identifier for the error. + string Code { get; set; } + /// A list of additional details about the error. + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorBodyAutoGenerated[] Detail { get; set; } + /// + /// A message describing the error, intended to be suitable for display in a user interface. + /// + string Message { get; set; } + /// + /// The target of the particular error. For example, the name of the property in error. + /// + string Target { get; set; } + + } +} \ No newline at end of file diff --git a/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/CloudErrorBodyAutoGenerated.json.cs b/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/CloudErrorBodyAutoGenerated.json.cs new file mode 100644 index 000000000000..dcd883085b5f --- /dev/null +++ b/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/CloudErrorBodyAutoGenerated.json.cs @@ -0,0 +1,122 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Extensions; + + /// An error response from the ManagedServiceIdentity service. + public partial class CloudErrorBodyAutoGenerated + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject instance to deserialize from. + internal CloudErrorBodyAutoGenerated(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_code = If( json?.PropertyT("code"), out var __jsonCode) ? (string)__jsonCode : (string)Code;} + {_message = If( json?.PropertyT("message"), out var __jsonMessage) ? (string)__jsonMessage : (string)Message;} + {_target = If( json?.PropertyT("target"), out var __jsonTarget) ? (string)__jsonTarget : (string)Target;} + {_detail = If( json?.PropertyT("details"), out var __jsonDetails) ? If( __jsonDetails as Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorBodyAutoGenerated) (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.CloudErrorBodyAutoGenerated.FromJson(__u) )) ))() : null : Detail;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorBodyAutoGenerated. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorBodyAutoGenerated. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorBodyAutoGenerated FromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject json ? new CloudErrorBodyAutoGenerated(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._code)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonString(this._code.ToString()) : null, "code" ,container.Add ); + AddIf( null != (((object)this._message)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonString(this._message.ToString()) : null, "message" ,container.Add ); + AddIf( null != (((object)this._target)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonString(this._target.ToString()) : null, "target" ,container.Add ); + if (null != this._detail) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.XNodeArray(); + foreach( var __x in this._detail ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("details",__w); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/FederatedIdentityCredential.PowerShell.cs b/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/FederatedIdentityCredentialAutoGenerated.PowerShell.cs similarity index 64% rename from src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/FederatedIdentityCredential.PowerShell.cs rename to src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/FederatedIdentityCredentialAutoGenerated.PowerShell.cs index aa088725e517..0edbe7ada421 100644 --- a/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/FederatedIdentityCredential.PowerShell.cs +++ b/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/FederatedIdentityCredentialAutoGenerated.PowerShell.cs @@ -8,8 +8,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20 using Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.PowerShell; /// Describes a federated identity credential. - [System.ComponentModel.TypeConverter(typeof(FederatedIdentityCredentialTypeConverter))] - public partial class FederatedIdentityCredential + [System.ComponentModel.TypeConverter(typeof(FederatedIdentityCredentialAutoGeneratedTypeConverter))] + public partial class FederatedIdentityCredentialAutoGenerated { /// @@ -63,39 +63,39 @@ public partial class FederatedIdentityCredential 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.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredential DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredentialAutoGenerated DeserializeFromDictionary(global::System.Collections.IDictionary content) { - return new FederatedIdentityCredential(content); + return new FederatedIdentityCredentialAutoGenerated(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.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredential DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredentialAutoGenerated DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { - return new FederatedIdentityCredential(content); + return new FederatedIdentityCredentialAutoGenerated(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. - internal FederatedIdentityCredential(global::System.Collections.IDictionary content) + internal FederatedIdentityCredentialAutoGenerated(global::System.Collections.IDictionary content) { bool returnNow = false; BeforeDeserializeDictionary(content, ref returnNow); @@ -106,41 +106,41 @@ internal FederatedIdentityCredential(global::System.Collections.IDictionary cont // actually deserialize if (content.Contains("Property")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredentialInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredentialProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredentialInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.FederatedIdentityCredentialPropertiesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredentialAutoGeneratedInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredentialProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredentialAutoGeneratedInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.FederatedIdentityCredentialPropertiesTypeConverter.ConvertFrom); } if (content.Contains("Id")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal)this).Id, global::System.Convert.ToString); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal)this).Type, global::System.Convert.ToString); } if (content.Contains("Issuer")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredentialInternal)this).Issuer = (string) content.GetValueForProperty("Issuer",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredentialInternal)this).Issuer, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredentialAutoGeneratedInternal)this).Issuer = (string) content.GetValueForProperty("Issuer",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredentialAutoGeneratedInternal)this).Issuer, global::System.Convert.ToString); } if (content.Contains("Subject")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredentialInternal)this).Subject = (string) content.GetValueForProperty("Subject",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredentialInternal)this).Subject, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredentialAutoGeneratedInternal)this).Subject = (string) content.GetValueForProperty("Subject",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredentialAutoGeneratedInternal)this).Subject, global::System.Convert.ToString); } if (content.Contains("Audience")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredentialInternal)this).Audience = (string[]) content.GetValueForProperty("Audience",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredentialInternal)this).Audience, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredentialAutoGeneratedInternal)this).Audience = (string[]) content.GetValueForProperty("Audience",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredentialAutoGeneratedInternal)this).Audience, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. - internal FederatedIdentityCredential(global::System.Management.Automation.PSObject content) + internal FederatedIdentityCredentialAutoGenerated(global::System.Management.Automation.PSObject content) { bool returnNow = false; BeforeDeserializePSObject(content, ref returnNow); @@ -151,41 +151,44 @@ internal FederatedIdentityCredential(global::System.Management.Automation.PSObje // actually deserialize if (content.Contains("Property")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredentialInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredentialProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredentialInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.FederatedIdentityCredentialPropertiesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredentialAutoGeneratedInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredentialProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredentialAutoGeneratedInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.FederatedIdentityCredentialPropertiesTypeConverter.ConvertFrom); } if (content.Contains("Id")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal)this).Id, global::System.Convert.ToString); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal)this).Type, global::System.Convert.ToString); } if (content.Contains("Issuer")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredentialInternal)this).Issuer = (string) content.GetValueForProperty("Issuer",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredentialInternal)this).Issuer, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredentialAutoGeneratedInternal)this).Issuer = (string) content.GetValueForProperty("Issuer",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredentialAutoGeneratedInternal)this).Issuer, global::System.Convert.ToString); } if (content.Contains("Subject")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredentialInternal)this).Subject = (string) content.GetValueForProperty("Subject",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredentialInternal)this).Subject, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredentialAutoGeneratedInternal)this).Subject = (string) content.GetValueForProperty("Subject",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredentialAutoGeneratedInternal)this).Subject, global::System.Convert.ToString); } if (content.Contains("Audience")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredentialInternal)this).Audience = (string[]) content.GetValueForProperty("Audience",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredentialInternal)this).Audience, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredentialAutoGeneratedInternal)this).Audience = (string[]) content.GetValueForProperty("Audience",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredentialAutoGeneratedInternal)this).Audience, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); } AfterDeserializePSObject(content); } /// - /// Creates a new instance of , deserializing the content from a json string. + /// Creates a new instance of , deserializing the content from a json + /// string. /// /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredential FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode.Parse(jsonText)); + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredentialAutoGenerated FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. @@ -205,8 +208,8 @@ public override string ToString() } } /// Describes a federated identity credential. - [System.ComponentModel.TypeConverter(typeof(FederatedIdentityCredentialTypeConverter))] - public partial interface IFederatedIdentityCredential + [System.ComponentModel.TypeConverter(typeof(FederatedIdentityCredentialAutoGeneratedTypeConverter))] + public partial interface IFederatedIdentityCredentialAutoGenerated { diff --git a/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/FederatedIdentityCredentialAutoGenerated.TypeConverter.cs b/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/FederatedIdentityCredentialAutoGenerated.TypeConverter.cs new file mode 100644 index 000000000000..739c02c3a53c --- /dev/null +++ b/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/FederatedIdentityCredentialAutoGenerated.TypeConverter.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class FederatedIdentityCredentialAutoGeneratedTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise + /// false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredentialAutoGenerated ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredentialAutoGenerated).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return FederatedIdentityCredentialAutoGenerated.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return FederatedIdentityCredentialAutoGenerated.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return FederatedIdentityCredentialAutoGenerated.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/FederatedIdentityCredential.cs b/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/FederatedIdentityCredentialAutoGenerated.cs similarity index 76% rename from src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/FederatedIdentityCredential.cs rename to src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/FederatedIdentityCredentialAutoGenerated.cs index 099e9350e6f3..245057d047ba 100644 --- a/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/FederatedIdentityCredential.cs +++ b/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/FederatedIdentityCredentialAutoGenerated.cs @@ -8,78 +8,72 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20 using static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Extensions; /// Describes a federated identity credential. - public partial class FederatedIdentityCredential : - Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredential, - Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredentialInternal, + public partial class FederatedIdentityCredentialAutoGenerated : + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredentialAutoGenerated, + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredentialAutoGeneratedInternal, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.IValidates { /// - /// Backing field for Inherited model /// - private Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.Resource(); + private Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGenerated __resourceAutoGenerated = new Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.ResourceAutoGenerated(); /// The list of audiences that can appear in the issued token. [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Inlined)] - [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.FormatTable(Index = 3)] public string[] Audience { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredentialPropertiesInternal)Property).Audience; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredentialPropertiesInternal)Property).Audience = value ?? null /* arrayOf */; } /// /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} /// [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Inherited)] - [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.DoNotFormat] - public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal)__resource).Id; } + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal)__resourceAutoGenerated).Id; } /// The URL of the issuer to be trusted. [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Inlined)] - [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.FormatTable(Index = 1)] public string Issuer { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredentialPropertiesInternal)Property).Issuer; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredentialPropertiesInternal)Property).Issuer = value ?? null; } /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal)__resource).Id = value; } + string Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal)__resourceAutoGenerated).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal)__resourceAutoGenerated).Id = value; } /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal)__resource).Name = value; } + string Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal)__resourceAutoGenerated).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal)__resourceAutoGenerated).Name = value; } /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal)__resource).Type = value; } + string Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal)__resourceAutoGenerated).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal)__resourceAutoGenerated).Type = value; } /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredentialProperties Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredentialInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.FederatedIdentityCredentialProperties()); set { {_property = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredentialProperties Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredentialAutoGeneratedInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.FederatedIdentityCredentialProperties()); set { {_property = value;} } } /// The name of the resource [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Inherited)] - [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.FormatTable(Index = 0)] - public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal)__resource).Name; } + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal)__resourceAutoGenerated).Name; } /// Backing field for property. private Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredentialProperties _property; /// The properties associated with the federated identity credential. [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Owned)] - [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.DoNotFormat] internal Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredentialProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.FederatedIdentityCredentialProperties()); set => this._property = value; } /// Gets the resource group name [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Owned)] - [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.DoNotFormat] 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); } /// The identifier of the external identity. [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Inlined)] - [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.FormatTable(Index = 2)] public string Subject { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredentialPropertiesInternal)Property).Subject; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredentialPropertiesInternal)Property).Subject = value ?? null; } /// /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" /// [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Inherited)] - [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.DoNotFormat] - public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal)__resource).Type; } + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal)__resourceAutoGenerated).Type; } - /// Creates an new instance. - public FederatedIdentityCredential() + /// + /// Creates an new instance. + /// + public FederatedIdentityCredentialAutoGenerated() { } @@ -92,14 +86,14 @@ public FederatedIdentityCredential() /// public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.IEventListener eventListener) { - await eventListener.AssertNotNull(nameof(__resource), __resource); - await eventListener.AssertObjectIsValid(nameof(__resource), __resource); + await eventListener.AssertNotNull(nameof(__resourceAutoGenerated), __resourceAutoGenerated); + await eventListener.AssertObjectIsValid(nameof(__resourceAutoGenerated), __resourceAutoGenerated); } } /// Describes a federated identity credential. - public partial interface IFederatedIdentityCredential : + public partial interface IFederatedIdentityCredentialAutoGenerated : Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResource + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGenerated { /// The list of audiences that can appear in the issued token. [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Info( @@ -128,8 +122,8 @@ public partial interface IFederatedIdentityCredential : } /// Describes a federated identity credential. - internal partial interface IFederatedIdentityCredentialInternal : - Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal + internal partial interface IFederatedIdentityCredentialAutoGeneratedInternal : + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal { /// The list of audiences that can appear in the issued token. string[] Audience { get; set; } diff --git a/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/FederatedIdentityCredentialAutoGenerated.json.cs b/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/FederatedIdentityCredentialAutoGenerated.json.cs new file mode 100644 index 000000000000..251ca8ecb006 --- /dev/null +++ b/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/FederatedIdentityCredentialAutoGenerated.json.cs @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Extensions; + + /// Describes a federated identity credential. + public partial class FederatedIdentityCredentialAutoGenerated + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject instance to deserialize from. + internal FederatedIdentityCredentialAutoGenerated(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __resourceAutoGenerated = new Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.ResourceAutoGenerated(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.FederatedIdentityCredentialProperties.FromJson(__jsonProperties) : Property;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredentialAutoGenerated. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredentialAutoGenerated. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredentialAutoGenerated FromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject json ? new FederatedIdentityCredentialAutoGenerated(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __resourceAutoGenerated?.ToJson(container, serializationMode); + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/FederatedIdentityCredentialsListResultAutoGenerated.PowerShell.cs b/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/FederatedIdentityCredentialsListResultAutoGenerated.PowerShell.cs new file mode 100644 index 000000000000..185b44d8919d --- /dev/null +++ b/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/FederatedIdentityCredentialsListResultAutoGenerated.PowerShell.cs @@ -0,0 +1,177 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.PowerShell; + + /// Values returned by the List operation for federated identity credentials. + [System.ComponentModel.TypeConverter(typeof(FederatedIdentityCredentialsListResultAutoGeneratedTypeConverter))] + public partial class FederatedIdentityCredentialsListResultAutoGenerated + { + + /// + /// 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.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredentialsListResultAutoGenerated DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new FederatedIdentityCredentialsListResultAutoGenerated(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.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredentialsListResultAutoGenerated DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new FederatedIdentityCredentialsListResultAutoGenerated(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal FederatedIdentityCredentialsListResultAutoGenerated(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredentialsListResultAutoGeneratedInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredentialAutoGenerated[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredentialsListResultAutoGeneratedInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.FederatedIdentityCredentialAutoGeneratedTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredentialsListResultAutoGeneratedInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredentialsListResultAutoGeneratedInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal FederatedIdentityCredentialsListResultAutoGenerated(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredentialsListResultAutoGeneratedInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredentialAutoGenerated[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredentialsListResultAutoGeneratedInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.FederatedIdentityCredentialAutoGeneratedTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredentialsListResultAutoGeneratedInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredentialsListResultAutoGeneratedInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Creates a new instance of , deserializing the content + /// from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredentialsListResultAutoGenerated FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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.ManagedServiceIdentity.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(); + } + } + /// Values returned by the List operation for federated identity credentials. + [System.ComponentModel.TypeConverter(typeof(FederatedIdentityCredentialsListResultAutoGeneratedTypeConverter))] + public partial interface IFederatedIdentityCredentialsListResultAutoGenerated + + { + + } +} \ No newline at end of file diff --git a/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/FederatedIdentityCredentialsListResultAutoGenerated.TypeConverter.cs b/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/FederatedIdentityCredentialsListResultAutoGenerated.TypeConverter.cs new file mode 100644 index 000000000000..1a63d674ba8f --- /dev/null +++ b/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/FederatedIdentityCredentialsListResultAutoGenerated.TypeConverter.cs @@ -0,0 +1,153 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class FederatedIdentityCredentialsListResultAutoGeneratedTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a + /// type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable + /// conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable + /// conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredentialsListResultAutoGenerated ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredentialsListResultAutoGenerated).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return FederatedIdentityCredentialsListResultAutoGenerated.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return FederatedIdentityCredentialsListResultAutoGenerated.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return FederatedIdentityCredentialsListResultAutoGenerated.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/FederatedIdentityCredentialsListResultAutoGenerated.cs b/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/FederatedIdentityCredentialsListResultAutoGenerated.cs new file mode 100644 index 000000000000..b34cfee7947f --- /dev/null +++ b/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/FederatedIdentityCredentialsListResultAutoGenerated.cs @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Extensions; + + /// Values returned by the List operation for federated identity credentials. + public partial class FederatedIdentityCredentialsListResultAutoGenerated : + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredentialsListResultAutoGenerated, + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredentialsListResultAutoGeneratedInternal + { + + /// Backing field for property. + private string _nextLink; + + /// The url to get the next page of results, if any. + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Owned)] + public string NextLink { get => this._nextLink; set => this._nextLink = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredentialAutoGenerated[] _value; + + /// + /// The collection of federated identity credentials returned by the listing operation. + /// + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredentialAutoGenerated[] Value { get => this._value; set => this._value = value; } + + /// + /// Creates an new instance. + /// + public FederatedIdentityCredentialsListResultAutoGenerated() + { + + } + } + /// Values returned by the List operation for federated identity credentials. + public partial interface IFederatedIdentityCredentialsListResultAutoGenerated : + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.IJsonSerializable + { + /// The url to get the next page of results, if any. + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The url to get the next page of results, if any.", + SerializedName = @"nextLink", + PossibleTypes = new [] { typeof(string) })] + string NextLink { get; set; } + /// + /// The collection of federated identity credentials returned by the listing operation. + /// + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The collection of federated identity credentials returned by the listing operation.", + SerializedName = @"value", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredentialAutoGenerated) })] + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredentialAutoGenerated[] Value { get; set; } + + } + /// Values returned by the List operation for federated identity credentials. + internal partial interface IFederatedIdentityCredentialsListResultAutoGeneratedInternal + + { + /// The url to get the next page of results, if any. + string NextLink { get; set; } + /// + /// The collection of federated identity credentials returned by the listing operation. + /// + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredentialAutoGenerated[] Value { get; set; } + + } +} \ No newline at end of file diff --git a/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/FederatedIdentityCredentialsListResultAutoGenerated.json.cs b/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/FederatedIdentityCredentialsListResultAutoGenerated.json.cs new file mode 100644 index 000000000000..8d7fcdab12de --- /dev/null +++ b/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/FederatedIdentityCredentialsListResultAutoGenerated.json.cs @@ -0,0 +1,121 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Extensions; + + /// Values returned by the List operation for federated identity credentials. + public partial class FederatedIdentityCredentialsListResultAutoGenerated + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject instance to deserialize from. + internal FederatedIdentityCredentialsListResultAutoGenerated(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredentialAutoGenerated) (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.FederatedIdentityCredentialAutoGenerated.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.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredentialsListResultAutoGenerated. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredentialsListResultAutoGenerated. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredentialsListResultAutoGenerated FromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject json ? new FederatedIdentityCredentialsListResultAutoGenerated(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (null != this._value) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.XNodeArray(); + foreach( var __x in this._value ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("value",__w); + } + AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/IdentityUpdate.PowerShell.cs b/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/IdentityAutoGenerated.PowerShell.cs similarity index 57% rename from src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/IdentityUpdate.PowerShell.cs rename to src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/IdentityAutoGenerated.PowerShell.cs index ecdcbe215fd2..dcb2641e833c 100644 --- a/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/IdentityUpdate.PowerShell.cs +++ b/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/IdentityAutoGenerated.PowerShell.cs @@ -8,8 +8,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20 using Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.PowerShell; /// Describes an identity resource. - [System.ComponentModel.TypeConverter(typeof(IdentityUpdateTypeConverter))] - public partial class IdentityUpdate + [System.ComponentModel.TypeConverter(typeof(IdentityAutoGeneratedTypeConverter))] + public partial class IdentityAutoGenerated { /// @@ -63,46 +63,46 @@ public partial class IdentityUpdate 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.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityUpdate DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityAutoGenerated DeserializeFromDictionary(global::System.Collections.IDictionary content) { - return new IdentityUpdate(content); + return new IdentityAutoGenerated(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.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityUpdate DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityAutoGenerated DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { - return new IdentityUpdate(content); + return new IdentityAutoGenerated(content); } /// - /// Creates a new instance of , deserializing the content from a json string. + /// Creates a new instance of , deserializing the content from a json string. /// /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityUpdate FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode.Parse(jsonText)); + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityAutoGenerated FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. - internal IdentityUpdate(global::System.Collections.IDictionary content) + internal IdentityAutoGenerated(global::System.Collections.IDictionary content) { bool returnNow = false; BeforeDeserializeDictionary(content, ref returnNow); @@ -113,49 +113,49 @@ internal IdentityUpdate(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Property")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityUpdateInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IUserAssignedIdentityProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityUpdateInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.UserAssignedIdentityPropertiesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityAutoGeneratedInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IUserAssignedIdentityProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityAutoGeneratedInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.UserAssignedIdentityPropertiesTypeConverter.ConvertFrom); } - if (content.Contains("Location")) + if (content.Contains("Id")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityUpdateInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityUpdateInternal)this).Location, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal)this).Id, global::System.Convert.ToString); } - if (content.Contains("Tag")) + if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityUpdateInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityUpdateTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityUpdateInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IdentityUpdateTagsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal)this).Name, global::System.Convert.ToString); } - if (content.Contains("Id")) + if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal)this).Type, global::System.Convert.ToString); } - if (content.Contains("Name")) + if (content.Contains("Tag")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.ITrackedResourceAutoGeneratedInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.ITrackedResourceAutoGeneratedInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.TrackedResourceTagsTypeConverter.ConvertFrom); } - if (content.Contains("Type")) + if (content.Contains("Location")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.ITrackedResourceAutoGeneratedInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.ITrackedResourceAutoGeneratedInternal)this).Location, global::System.Convert.ToString); } if (content.Contains("TenantId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityUpdateInternal)this).TenantId = (string) content.GetValueForProperty("TenantId",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityUpdateInternal)this).TenantId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityAutoGeneratedInternal)this).TenantId = (string) content.GetValueForProperty("TenantId",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityAutoGeneratedInternal)this).TenantId, global::System.Convert.ToString); } if (content.Contains("PrincipalId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityUpdateInternal)this).PrincipalId = (string) content.GetValueForProperty("PrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityUpdateInternal)this).PrincipalId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityAutoGeneratedInternal)this).PrincipalId = (string) content.GetValueForProperty("PrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityAutoGeneratedInternal)this).PrincipalId, global::System.Convert.ToString); } if (content.Contains("ClientId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityUpdateInternal)this).ClientId = (string) content.GetValueForProperty("ClientId",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityUpdateInternal)this).ClientId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityAutoGeneratedInternal)this).ClientId = (string) content.GetValueForProperty("ClientId",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityAutoGeneratedInternal)this).ClientId, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. - internal IdentityUpdate(global::System.Management.Automation.PSObject content) + internal IdentityAutoGenerated(global::System.Management.Automation.PSObject content) { bool returnNow = false; BeforeDeserializePSObject(content, ref returnNow); @@ -166,39 +166,39 @@ internal IdentityUpdate(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("Property")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityUpdateInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IUserAssignedIdentityProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityUpdateInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.UserAssignedIdentityPropertiesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityAutoGeneratedInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IUserAssignedIdentityProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityAutoGeneratedInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.UserAssignedIdentityPropertiesTypeConverter.ConvertFrom); } - if (content.Contains("Location")) + if (content.Contains("Id")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityUpdateInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityUpdateInternal)this).Location, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal)this).Id, global::System.Convert.ToString); } - if (content.Contains("Tag")) + if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityUpdateInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityUpdateTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityUpdateInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IdentityUpdateTagsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal)this).Name, global::System.Convert.ToString); } - if (content.Contains("Id")) + if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal)this).Type, global::System.Convert.ToString); } - if (content.Contains("Name")) + if (content.Contains("Tag")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.ITrackedResourceAutoGeneratedInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.ITrackedResourceAutoGeneratedInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.TrackedResourceTagsTypeConverter.ConvertFrom); } - if (content.Contains("Type")) + if (content.Contains("Location")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.ITrackedResourceAutoGeneratedInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.ITrackedResourceAutoGeneratedInternal)this).Location, global::System.Convert.ToString); } if (content.Contains("TenantId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityUpdateInternal)this).TenantId = (string) content.GetValueForProperty("TenantId",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityUpdateInternal)this).TenantId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityAutoGeneratedInternal)this).TenantId = (string) content.GetValueForProperty("TenantId",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityAutoGeneratedInternal)this).TenantId, global::System.Convert.ToString); } if (content.Contains("PrincipalId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityUpdateInternal)this).PrincipalId = (string) content.GetValueForProperty("PrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityUpdateInternal)this).PrincipalId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityAutoGeneratedInternal)this).PrincipalId = (string) content.GetValueForProperty("PrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityAutoGeneratedInternal)this).PrincipalId, global::System.Convert.ToString); } if (content.Contains("ClientId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityUpdateInternal)this).ClientId = (string) content.GetValueForProperty("ClientId",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityUpdateInternal)this).ClientId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityAutoGeneratedInternal)this).ClientId = (string) content.GetValueForProperty("ClientId",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityAutoGeneratedInternal)this).ClientId, global::System.Convert.ToString); } AfterDeserializePSObject(content); } @@ -221,8 +221,8 @@ public override string ToString() } } /// Describes an identity resource. - [System.ComponentModel.TypeConverter(typeof(IdentityUpdateTypeConverter))] - public partial interface IIdentityUpdate + [System.ComponentModel.TypeConverter(typeof(IdentityAutoGeneratedTypeConverter))] + public partial interface IIdentityAutoGenerated { diff --git a/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/IdentityAutoGenerated.TypeConverter.cs b/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/IdentityAutoGenerated.TypeConverter.cs new file mode 100644 index 000000000000..3dfc05a74829 --- /dev/null +++ b/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/IdentityAutoGenerated.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class IdentityAutoGeneratedTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityAutoGenerated ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityAutoGenerated).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return IdentityAutoGenerated.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return IdentityAutoGenerated.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return IdentityAutoGenerated.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/Identity.cs b/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/IdentityAutoGenerated.cs similarity index 70% rename from src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/Identity.cs rename to src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/IdentityAutoGenerated.cs index 06408f11d006..5e3e56050c2b 100644 --- a/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/Identity.cs +++ b/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/IdentityAutoGenerated.cs @@ -8,16 +8,16 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20 using static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Extensions; /// Describes an identity resource. - public partial class Identity : - Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentity, - Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityInternal, + public partial class IdentityAutoGenerated : + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityAutoGenerated, + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityAutoGeneratedInternal, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.IValidates { /// - /// Backing field for Inherited model /// - private Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.ITrackedResource __trackedResource = new Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.TrackedResource(); + private Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.ITrackedResourceAutoGenerated __trackedResourceAutoGenerated = new Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.TrackedResourceAutoGenerated(); /// /// The id of the app associated with the identity. This is a random generated UUID by MSI. @@ -29,36 +29,36 @@ public partial class Identity : /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} /// [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Inherited)] - public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal)__trackedResource).Id; } + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal)__trackedResourceAutoGenerated).Id; } /// The geo-location where the resource lives [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Inherited)] - public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.ITrackedResourceInternal)__trackedResource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.ITrackedResourceInternal)__trackedResource).Location = value ; } + public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.ITrackedResourceAutoGeneratedInternal)__trackedResourceAutoGenerated).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.ITrackedResourceAutoGeneratedInternal)__trackedResourceAutoGenerated).Location = value ; } /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal)__trackedResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal)__trackedResource).Id = value; } + string Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal)__trackedResourceAutoGenerated).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal)__trackedResourceAutoGenerated).Id = value; } /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal)__trackedResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal)__trackedResource).Name = value; } + string Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal)__trackedResourceAutoGenerated).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal)__trackedResourceAutoGenerated).Name = value; } /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal)__trackedResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal)__trackedResource).Type = value; } + string Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal)__trackedResourceAutoGenerated).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal)__trackedResourceAutoGenerated).Type = value; } /// Internal Acessors for ClientId - string Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityInternal.ClientId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IUserAssignedIdentityPropertiesInternal)Property).ClientId; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IUserAssignedIdentityPropertiesInternal)Property).ClientId = value; } + string Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityAutoGeneratedInternal.ClientId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IUserAssignedIdentityPropertiesInternal)Property).ClientId; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IUserAssignedIdentityPropertiesInternal)Property).ClientId = value; } /// Internal Acessors for PrincipalId - string Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityInternal.PrincipalId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IUserAssignedIdentityPropertiesInternal)Property).PrincipalId; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IUserAssignedIdentityPropertiesInternal)Property).PrincipalId = value; } + string Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityAutoGeneratedInternal.PrincipalId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IUserAssignedIdentityPropertiesInternal)Property).PrincipalId; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IUserAssignedIdentityPropertiesInternal)Property).PrincipalId = value; } /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IUserAssignedIdentityProperties Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.UserAssignedIdentityProperties()); set { {_property = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IUserAssignedIdentityProperties Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityAutoGeneratedInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.UserAssignedIdentityProperties()); set { {_property = value;} } } /// Internal Acessors for TenantId - string Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityInternal.TenantId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IUserAssignedIdentityPropertiesInternal)Property).TenantId; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IUserAssignedIdentityPropertiesInternal)Property).TenantId = value; } + string Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityAutoGeneratedInternal.TenantId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IUserAssignedIdentityPropertiesInternal)Property).TenantId; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IUserAssignedIdentityPropertiesInternal)Property).TenantId = value; } /// The name of the resource [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Inherited)] - public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal)__trackedResource).Name; } + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal)__trackedResourceAutoGenerated).Name; } /// The id of the service principal object associated with the created identity. [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Inlined)] @@ -77,7 +77,7 @@ public partial class Identity : /// Resource tags. [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.ITrackedResourceTags Tag { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.ITrackedResourceInternal)__trackedResource).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.ITrackedResourceInternal)__trackedResource).Tag = value ?? null /* model class */; } + public Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.ITrackedResourceTags Tag { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.ITrackedResourceAutoGeneratedInternal)__trackedResourceAutoGenerated).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.ITrackedResourceAutoGeneratedInternal)__trackedResourceAutoGenerated).Tag = value ?? null /* model class */; } /// The id of the tenant which the identity belongs to. [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Inlined)] @@ -87,10 +87,10 @@ public partial class Identity : /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" /// [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Inherited)] - public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal)__trackedResource).Type; } + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal)__trackedResourceAutoGenerated).Type; } - /// Creates an new instance. - public Identity() + /// Creates an new instance. + public IdentityAutoGenerated() { } @@ -103,14 +103,14 @@ public Identity() /// public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.IEventListener eventListener) { - await eventListener.AssertNotNull(nameof(__trackedResource), __trackedResource); - await eventListener.AssertObjectIsValid(nameof(__trackedResource), __trackedResource); + await eventListener.AssertNotNull(nameof(__trackedResourceAutoGenerated), __trackedResourceAutoGenerated); + await eventListener.AssertObjectIsValid(nameof(__trackedResourceAutoGenerated), __trackedResourceAutoGenerated); } } /// Describes an identity resource. - public partial interface IIdentity : + public partial interface IIdentityAutoGenerated : Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.ITrackedResource + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.ITrackedResourceAutoGenerated { /// /// The id of the app associated with the identity. This is a random generated UUID by MSI. @@ -141,8 +141,8 @@ public partial interface IIdentity : } /// Describes an identity resource. - internal partial interface IIdentityInternal : - Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.ITrackedResourceInternal + internal partial interface IIdentityAutoGeneratedInternal : + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.ITrackedResourceAutoGeneratedInternal { /// /// The id of the app associated with the identity. This is a random generated UUID by MSI. diff --git a/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/IdentityAutoGenerated.json.cs b/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/IdentityAutoGenerated.json.cs new file mode 100644 index 000000000000..8ebe543d6c4b --- /dev/null +++ b/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/IdentityAutoGenerated.json.cs @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Extensions; + + /// Describes an identity resource. + public partial class IdentityAutoGenerated + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityAutoGenerated. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityAutoGenerated. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityAutoGenerated FromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject json ? new IdentityAutoGenerated(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject instance to deserialize from. + internal IdentityAutoGenerated(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __trackedResourceAutoGenerated = new Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.TrackedResourceAutoGenerated(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.UserAssignedIdentityProperties.FromJson(__jsonProperties) : Property;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __trackedResourceAutoGenerated?.ToJson(container, serializationMode); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/Identity.PowerShell.cs b/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/IdentityUpdateAutoGenerated.PowerShell.cs similarity index 57% rename from src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/Identity.PowerShell.cs rename to src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/IdentityUpdateAutoGenerated.PowerShell.cs index 2d5458024dcb..4f70e75e4f31 100644 --- a/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/Identity.PowerShell.cs +++ b/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/IdentityUpdateAutoGenerated.PowerShell.cs @@ -8,8 +8,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20 using Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.PowerShell; /// Describes an identity resource. - [System.ComponentModel.TypeConverter(typeof(IdentityTypeConverter))] - public partial class Identity + [System.ComponentModel.TypeConverter(typeof(IdentityUpdateAutoGeneratedTypeConverter))] + public partial class IdentityUpdateAutoGenerated { /// @@ -63,46 +63,46 @@ public partial class Identity 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.ManagedServiceIdentity.Models.Api20220131Preview.IIdentity DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityUpdateAutoGenerated DeserializeFromDictionary(global::System.Collections.IDictionary content) { - return new Identity(content); + return new IdentityUpdateAutoGenerated(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.ManagedServiceIdentity.Models.Api20220131Preview.IIdentity DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityUpdateAutoGenerated DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { - return new Identity(content); + return new IdentityUpdateAutoGenerated(content); } /// - /// Creates a new instance of , deserializing the content from a json string. + /// Creates a new instance of , deserializing the content from a json string. /// /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentity FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode.Parse(jsonText)); + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityUpdateAutoGenerated FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. - internal Identity(global::System.Collections.IDictionary content) + internal IdentityUpdateAutoGenerated(global::System.Collections.IDictionary content) { bool returnNow = false; BeforeDeserializeDictionary(content, ref returnNow); @@ -113,49 +113,49 @@ internal Identity(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Property")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IUserAssignedIdentityProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.UserAssignedIdentityPropertiesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityUpdateAutoGeneratedInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IUserAssignedIdentityProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityUpdateAutoGeneratedInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.UserAssignedIdentityPropertiesTypeConverter.ConvertFrom); } - if (content.Contains("Id")) + if (content.Contains("Location")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityUpdateAutoGeneratedInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityUpdateAutoGeneratedInternal)this).Location, global::System.Convert.ToString); } - if (content.Contains("Name")) + if (content.Contains("Tag")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityUpdateAutoGeneratedInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityUpdateTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityUpdateAutoGeneratedInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IdentityUpdateTagsTypeConverter.ConvertFrom); } - if (content.Contains("Type")) + if (content.Contains("Id")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal)this).Id, global::System.Convert.ToString); } - if (content.Contains("Tag")) + if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.TrackedResourceTagsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal)this).Name, global::System.Convert.ToString); } - if (content.Contains("Location")) + if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.ITrackedResourceInternal)this).Location, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal)this).Type, global::System.Convert.ToString); } if (content.Contains("TenantId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityInternal)this).TenantId = (string) content.GetValueForProperty("TenantId",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityInternal)this).TenantId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityUpdateAutoGeneratedInternal)this).TenantId = (string) content.GetValueForProperty("TenantId",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityUpdateAutoGeneratedInternal)this).TenantId, global::System.Convert.ToString); } if (content.Contains("PrincipalId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityInternal)this).PrincipalId = (string) content.GetValueForProperty("PrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityInternal)this).PrincipalId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityUpdateAutoGeneratedInternal)this).PrincipalId = (string) content.GetValueForProperty("PrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityUpdateAutoGeneratedInternal)this).PrincipalId, global::System.Convert.ToString); } if (content.Contains("ClientId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityInternal)this).ClientId = (string) content.GetValueForProperty("ClientId",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityInternal)this).ClientId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityUpdateAutoGeneratedInternal)this).ClientId = (string) content.GetValueForProperty("ClientId",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityUpdateAutoGeneratedInternal)this).ClientId, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. - internal Identity(global::System.Management.Automation.PSObject content) + internal IdentityUpdateAutoGenerated(global::System.Management.Automation.PSObject content) { bool returnNow = false; BeforeDeserializePSObject(content, ref returnNow); @@ -166,39 +166,39 @@ internal Identity(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("Property")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IUserAssignedIdentityProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.UserAssignedIdentityPropertiesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityUpdateAutoGeneratedInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IUserAssignedIdentityProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityUpdateAutoGeneratedInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.UserAssignedIdentityPropertiesTypeConverter.ConvertFrom); } - if (content.Contains("Id")) + if (content.Contains("Location")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityUpdateAutoGeneratedInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityUpdateAutoGeneratedInternal)this).Location, global::System.Convert.ToString); } - if (content.Contains("Name")) + if (content.Contains("Tag")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityUpdateAutoGeneratedInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityUpdateTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityUpdateAutoGeneratedInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IdentityUpdateTagsTypeConverter.ConvertFrom); } - if (content.Contains("Type")) + if (content.Contains("Id")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal)this).Id, global::System.Convert.ToString); } - if (content.Contains("Tag")) + if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.TrackedResourceTagsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal)this).Name, global::System.Convert.ToString); } - if (content.Contains("Location")) + if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.ITrackedResourceInternal)this).Location, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal)this).Type, global::System.Convert.ToString); } if (content.Contains("TenantId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityInternal)this).TenantId = (string) content.GetValueForProperty("TenantId",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityInternal)this).TenantId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityUpdateAutoGeneratedInternal)this).TenantId = (string) content.GetValueForProperty("TenantId",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityUpdateAutoGeneratedInternal)this).TenantId, global::System.Convert.ToString); } if (content.Contains("PrincipalId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityInternal)this).PrincipalId = (string) content.GetValueForProperty("PrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityInternal)this).PrincipalId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityUpdateAutoGeneratedInternal)this).PrincipalId = (string) content.GetValueForProperty("PrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityUpdateAutoGeneratedInternal)this).PrincipalId, global::System.Convert.ToString); } if (content.Contains("ClientId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityInternal)this).ClientId = (string) content.GetValueForProperty("ClientId",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityInternal)this).ClientId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityUpdateAutoGeneratedInternal)this).ClientId = (string) content.GetValueForProperty("ClientId",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityUpdateAutoGeneratedInternal)this).ClientId, global::System.Convert.ToString); } AfterDeserializePSObject(content); } @@ -221,8 +221,8 @@ public override string ToString() } } /// Describes an identity resource. - [System.ComponentModel.TypeConverter(typeof(IdentityTypeConverter))] - public partial interface IIdentity + [System.ComponentModel.TypeConverter(typeof(IdentityUpdateAutoGeneratedTypeConverter))] + public partial interface IIdentityUpdateAutoGenerated { diff --git a/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/IdentityUpdateAutoGenerated.TypeConverter.cs b/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/IdentityUpdateAutoGenerated.TypeConverter.cs new file mode 100644 index 000000000000..43693a45a4e0 --- /dev/null +++ b/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/IdentityUpdateAutoGenerated.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class IdentityUpdateAutoGeneratedTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityUpdateAutoGenerated ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityUpdateAutoGenerated).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return IdentityUpdateAutoGenerated.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return IdentityUpdateAutoGenerated.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return IdentityUpdateAutoGenerated.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/IdentityUpdate.cs b/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/IdentityUpdateAutoGenerated.cs similarity index 74% rename from src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/IdentityUpdate.cs rename to src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/IdentityUpdateAutoGenerated.cs index 142256411126..3fddec61bdbe 100644 --- a/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/IdentityUpdate.cs +++ b/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/IdentityUpdateAutoGenerated.cs @@ -8,16 +8,16 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20 using static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Extensions; /// Describes an identity resource. - public partial class IdentityUpdate : - Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityUpdate, - Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityUpdateInternal, + public partial class IdentityUpdateAutoGenerated : + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityUpdateAutoGenerated, + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityUpdateAutoGeneratedInternal, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.IValidates { /// - /// Backing field for Inherited model /// - private Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.Resource(); + private Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGenerated __resourceAutoGenerated = new Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.ResourceAutoGenerated(); /// /// The id of the app associated with the identity. This is a random generated UUID by MSI. @@ -29,7 +29,7 @@ public partial class IdentityUpdate : /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} /// [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Inherited)] - public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal)__resource).Id; } + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal)__resourceAutoGenerated).Id; } /// Backing field for property. private string _location; @@ -39,29 +39,29 @@ public partial class IdentityUpdate : public string Location { get => this._location; set => this._location = value; } /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal)__resource).Id = value; } + string Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal)__resourceAutoGenerated).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal)__resourceAutoGenerated).Id = value; } /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal)__resource).Name = value; } + string Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal)__resourceAutoGenerated).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal)__resourceAutoGenerated).Name = value; } /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal)__resource).Type = value; } + string Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal)__resourceAutoGenerated).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal)__resourceAutoGenerated).Type = value; } /// Internal Acessors for ClientId - string Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityUpdateInternal.ClientId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IUserAssignedIdentityPropertiesInternal)Property).ClientId; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IUserAssignedIdentityPropertiesInternal)Property).ClientId = value; } + string Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityUpdateAutoGeneratedInternal.ClientId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IUserAssignedIdentityPropertiesInternal)Property).ClientId; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IUserAssignedIdentityPropertiesInternal)Property).ClientId = value; } /// Internal Acessors for PrincipalId - string Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityUpdateInternal.PrincipalId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IUserAssignedIdentityPropertiesInternal)Property).PrincipalId; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IUserAssignedIdentityPropertiesInternal)Property).PrincipalId = value; } + string Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityUpdateAutoGeneratedInternal.PrincipalId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IUserAssignedIdentityPropertiesInternal)Property).PrincipalId; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IUserAssignedIdentityPropertiesInternal)Property).PrincipalId = value; } /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IUserAssignedIdentityProperties Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityUpdateInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.UserAssignedIdentityProperties()); set { {_property = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IUserAssignedIdentityProperties Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityUpdateAutoGeneratedInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.UserAssignedIdentityProperties()); set { {_property = value;} } } /// Internal Acessors for TenantId - string Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityUpdateInternal.TenantId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IUserAssignedIdentityPropertiesInternal)Property).TenantId; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IUserAssignedIdentityPropertiesInternal)Property).TenantId = value; } + string Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityUpdateAutoGeneratedInternal.TenantId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IUserAssignedIdentityPropertiesInternal)Property).TenantId; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IUserAssignedIdentityPropertiesInternal)Property).TenantId = value; } /// The name of the resource [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Inherited)] - public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal)__resource).Name; } + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal)__resourceAutoGenerated).Name; } /// The id of the service principal object associated with the created identity. [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Inlined)] @@ -89,10 +89,10 @@ public partial class IdentityUpdate : /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" /// [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Inherited)] - public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal)__resource).Type; } + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal)__resourceAutoGenerated).Type; } - /// Creates an new instance. - public IdentityUpdate() + /// Creates an new instance. + public IdentityUpdateAutoGenerated() { } @@ -105,14 +105,14 @@ public IdentityUpdate() /// public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.IEventListener eventListener) { - await eventListener.AssertNotNull(nameof(__resource), __resource); - await eventListener.AssertObjectIsValid(nameof(__resource), __resource); + await eventListener.AssertNotNull(nameof(__resourceAutoGenerated), __resourceAutoGenerated); + await eventListener.AssertObjectIsValid(nameof(__resourceAutoGenerated), __resourceAutoGenerated); } } /// Describes an identity resource. - public partial interface IIdentityUpdate : + public partial interface IIdentityUpdateAutoGenerated : Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResource + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGenerated { /// /// The id of the app associated with the identity. This is a random generated UUID by MSI. @@ -159,8 +159,8 @@ public partial interface IIdentityUpdate : } /// Describes an identity resource. - internal partial interface IIdentityUpdateInternal : - Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal + internal partial interface IIdentityUpdateAutoGeneratedInternal : + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal { /// /// The id of the app associated with the identity. This is a random generated UUID by MSI. diff --git a/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/IdentityUpdateAutoGenerated.json.cs b/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/IdentityUpdateAutoGenerated.json.cs new file mode 100644 index 000000000000..93d18b63b5f5 --- /dev/null +++ b/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/IdentityUpdateAutoGenerated.json.cs @@ -0,0 +1,117 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Extensions; + + /// Describes an identity resource. + public partial class IdentityUpdateAutoGenerated + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityUpdateAutoGenerated. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityUpdateAutoGenerated. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityUpdateAutoGenerated FromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject json ? new IdentityUpdateAutoGenerated(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject instance to deserialize from. + internal IdentityUpdateAutoGenerated(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __resourceAutoGenerated = new Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.ResourceAutoGenerated(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.UserAssignedIdentityProperties.FromJson(__jsonProperties) : Property;} + {_location = If( json?.PropertyT("location"), out var __jsonLocation) ? (string)__jsonLocation : (string)Location;} + {_tag = If( json?.PropertyT("tags"), out var __jsonTags) ? Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IdentityUpdateTags.FromJson(__jsonTags) : Tag;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __resourceAutoGenerated?.ToJson(container, serializationMode); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + } + AddIf( null != (((object)this._location)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonString(this._location.ToString()) : null, "location" ,container.Add ); + AddIf( null != this._tag ? (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode) this._tag.ToJson(null,serializationMode) : null, "tags" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/OperationListResultAutoGenerated.PowerShell.cs b/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/OperationListResultAutoGenerated.PowerShell.cs new file mode 100644 index 000000000000..46c5f46799bc --- /dev/null +++ b/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/OperationListResultAutoGenerated.PowerShell.cs @@ -0,0 +1,174 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.PowerShell; + + /// A list of operations supported by Microsoft.ManagedIdentity Resource Provider. + [System.ComponentModel.TypeConverter(typeof(OperationListResultAutoGeneratedTypeConverter))] + public partial class OperationListResultAutoGenerated + { + + /// + /// 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.ManagedServiceIdentity.Models.Api20220131Preview.IOperationListResultAutoGenerated DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new OperationListResultAutoGenerated(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.ManagedServiceIdentity.Models.Api20220131Preview.IOperationListResultAutoGenerated DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new OperationListResultAutoGenerated(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.ManagedServiceIdentity.Models.Api20220131Preview.IOperationListResultAutoGenerated FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal OperationListResultAutoGenerated(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IOperationListResultAutoGeneratedInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IOperation[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IOperationListResultAutoGeneratedInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.OperationTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IOperationListResultAutoGeneratedInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IOperationListResultAutoGeneratedInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal OperationListResultAutoGenerated(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IOperationListResultAutoGeneratedInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IOperation[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IOperationListResultAutoGeneratedInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.OperationTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IOperationListResultAutoGeneratedInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IOperationListResultAutoGeneratedInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// A list of operations supported by Microsoft.ManagedIdentity Resource Provider. + [System.ComponentModel.TypeConverter(typeof(OperationListResultAutoGeneratedTypeConverter))] + public partial interface IOperationListResultAutoGenerated + + { + + } +} \ No newline at end of file diff --git a/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/OperationListResultAutoGenerated.TypeConverter.cs b/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/OperationListResultAutoGenerated.TypeConverter.cs new file mode 100644 index 000000000000..ca64595aed29 --- /dev/null +++ b/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/OperationListResultAutoGenerated.TypeConverter.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class OperationListResultAutoGeneratedTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IOperationListResultAutoGenerated ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IOperationListResultAutoGenerated).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return OperationListResultAutoGenerated.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return OperationListResultAutoGenerated.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return OperationListResultAutoGenerated.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/OperationListResultAutoGenerated.cs b/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/OperationListResultAutoGenerated.cs new file mode 100644 index 000000000000..9fe6cb626fc3 --- /dev/null +++ b/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/OperationListResultAutoGenerated.cs @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Extensions; + + /// A list of operations supported by Microsoft.ManagedIdentity Resource Provider. + public partial class OperationListResultAutoGenerated : + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IOperationListResultAutoGenerated, + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IOperationListResultAutoGeneratedInternal + { + + /// Backing field for property. + private string _nextLink; + + /// The url to get the next page of results, if any. + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Owned)] + public string NextLink { get => this._nextLink; set => this._nextLink = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IOperation[] _value; + + /// A list of operations supported by Microsoft.ManagedIdentity Resource Provider. + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IOperation[] Value { get => this._value; set => this._value = value; } + + /// Creates an new instance. + public OperationListResultAutoGenerated() + { + + } + } + /// A list of operations supported by Microsoft.ManagedIdentity Resource Provider. + public partial interface IOperationListResultAutoGenerated : + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.IJsonSerializable + { + /// The url to get the next page of results, if any. + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The url to get the next page of results, if any.", + SerializedName = @"nextLink", + PossibleTypes = new [] { typeof(string) })] + string NextLink { get; set; } + /// A list of operations supported by Microsoft.ManagedIdentity Resource Provider. + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A list of operations supported by Microsoft.ManagedIdentity Resource Provider.", + SerializedName = @"value", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IOperation) })] + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IOperation[] Value { get; set; } + + } + /// A list of operations supported by Microsoft.ManagedIdentity Resource Provider. + internal partial interface IOperationListResultAutoGeneratedInternal + + { + /// The url to get the next page of results, if any. + string NextLink { get; set; } + /// A list of operations supported by Microsoft.ManagedIdentity Resource Provider. + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IOperation[] Value { get; set; } + + } +} \ No newline at end of file diff --git a/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/OperationListResultAutoGenerated.json.cs b/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/OperationListResultAutoGenerated.json.cs new file mode 100644 index 000000000000..01fc095ecbf6 --- /dev/null +++ b/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/OperationListResultAutoGenerated.json.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Extensions; + + /// A list of operations supported by Microsoft.ManagedIdentity Resource Provider. + public partial class OperationListResultAutoGenerated + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IOperationListResultAutoGenerated. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IOperationListResultAutoGenerated. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IOperationListResultAutoGenerated FromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject json ? new OperationListResultAutoGenerated(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject instance to deserialize from. + internal OperationListResultAutoGenerated(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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.ManagedServiceIdentity.Models.Api20220131Preview.IOperation) (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.Operation.FromJson(__u) )) ))() : null : Value;} + {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (null != this._value) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.XNodeArray(); + foreach( var __x in this._value ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("value",__w); + } + AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/SystemAssignedIdentity.PowerShell.cs b/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/SystemAssignedIdentityAutoGenerated.PowerShell.cs similarity index 55% rename from src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/SystemAssignedIdentity.PowerShell.cs rename to src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/SystemAssignedIdentityAutoGenerated.PowerShell.cs index 1bfd4bfc514e..e8ac3060aa90 100644 --- a/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/SystemAssignedIdentity.PowerShell.cs +++ b/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/SystemAssignedIdentityAutoGenerated.PowerShell.cs @@ -8,8 +8,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20 using Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.PowerShell; /// Describes a system assigned identity resource. - [System.ComponentModel.TypeConverter(typeof(SystemAssignedIdentityTypeConverter))] - public partial class SystemAssignedIdentity + [System.ComponentModel.TypeConverter(typeof(SystemAssignedIdentityAutoGeneratedTypeConverter))] + public partial class SystemAssignedIdentityAutoGenerated { /// @@ -63,46 +63,48 @@ public partial class SystemAssignedIdentity 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.ManagedServiceIdentity.Models.Api20220131Preview.ISystemAssignedIdentity DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ISystemAssignedIdentityAutoGenerated DeserializeFromDictionary(global::System.Collections.IDictionary content) { - return new SystemAssignedIdentity(content); + return new SystemAssignedIdentityAutoGenerated(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.ManagedServiceIdentity.Models.Api20220131Preview.ISystemAssignedIdentity DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ISystemAssignedIdentityAutoGenerated DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { - return new SystemAssignedIdentity(content); + return new SystemAssignedIdentityAutoGenerated(content); } /// - /// Creates a new instance of , deserializing the content from a json string. + /// Creates a new instance of , deserializing the content from a json string. /// /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ISystemAssignedIdentity FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode.Parse(jsonText)); + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ISystemAssignedIdentityAutoGenerated FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. - internal SystemAssignedIdentity(global::System.Collections.IDictionary content) + internal SystemAssignedIdentityAutoGenerated(global::System.Collections.IDictionary content) { bool returnNow = false; BeforeDeserializeDictionary(content, ref returnNow); @@ -113,53 +115,53 @@ internal SystemAssignedIdentity(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Property")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ISystemAssignedIdentityInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ISystemAssignedIdentityProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ISystemAssignedIdentityInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.SystemAssignedIdentityPropertiesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ISystemAssignedIdentityAutoGeneratedInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ISystemAssignedIdentityProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ISystemAssignedIdentityAutoGeneratedInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.SystemAssignedIdentityPropertiesTypeConverter.ConvertFrom); } if (content.Contains("Location")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ISystemAssignedIdentityInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ISystemAssignedIdentityInternal)this).Location, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ISystemAssignedIdentityAutoGeneratedInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ISystemAssignedIdentityAutoGeneratedInternal)this).Location, global::System.Convert.ToString); } if (content.Contains("Tag")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ISystemAssignedIdentityInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ISystemAssignedIdentityTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ISystemAssignedIdentityInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.SystemAssignedIdentityTagsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ISystemAssignedIdentityAutoGeneratedInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ISystemAssignedIdentityTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ISystemAssignedIdentityAutoGeneratedInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.SystemAssignedIdentityTagsTypeConverter.ConvertFrom); } if (content.Contains("Id")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal)this).Id, global::System.Convert.ToString); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal)this).Type, global::System.Convert.ToString); } if (content.Contains("TenantId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ISystemAssignedIdentityInternal)this).TenantId = (string) content.GetValueForProperty("TenantId",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ISystemAssignedIdentityInternal)this).TenantId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ISystemAssignedIdentityAutoGeneratedInternal)this).TenantId = (string) content.GetValueForProperty("TenantId",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ISystemAssignedIdentityAutoGeneratedInternal)this).TenantId, global::System.Convert.ToString); } if (content.Contains("PrincipalId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ISystemAssignedIdentityInternal)this).PrincipalId = (string) content.GetValueForProperty("PrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ISystemAssignedIdentityInternal)this).PrincipalId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ISystemAssignedIdentityAutoGeneratedInternal)this).PrincipalId = (string) content.GetValueForProperty("PrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ISystemAssignedIdentityAutoGeneratedInternal)this).PrincipalId, global::System.Convert.ToString); } if (content.Contains("ClientId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ISystemAssignedIdentityInternal)this).ClientId = (string) content.GetValueForProperty("ClientId",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ISystemAssignedIdentityInternal)this).ClientId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ISystemAssignedIdentityAutoGeneratedInternal)this).ClientId = (string) content.GetValueForProperty("ClientId",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ISystemAssignedIdentityAutoGeneratedInternal)this).ClientId, global::System.Convert.ToString); } if (content.Contains("ClientSecretUrl")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ISystemAssignedIdentityInternal)this).ClientSecretUrl = (string) content.GetValueForProperty("ClientSecretUrl",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ISystemAssignedIdentityInternal)this).ClientSecretUrl, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ISystemAssignedIdentityAutoGeneratedInternal)this).ClientSecretUrl = (string) content.GetValueForProperty("ClientSecretUrl",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ISystemAssignedIdentityAutoGeneratedInternal)this).ClientSecretUrl, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. - internal SystemAssignedIdentity(global::System.Management.Automation.PSObject content) + internal SystemAssignedIdentityAutoGenerated(global::System.Management.Automation.PSObject content) { bool returnNow = false; BeforeDeserializePSObject(content, ref returnNow); @@ -170,43 +172,43 @@ internal SystemAssignedIdentity(global::System.Management.Automation.PSObject co // actually deserialize if (content.Contains("Property")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ISystemAssignedIdentityInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ISystemAssignedIdentityProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ISystemAssignedIdentityInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.SystemAssignedIdentityPropertiesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ISystemAssignedIdentityAutoGeneratedInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ISystemAssignedIdentityProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ISystemAssignedIdentityAutoGeneratedInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.SystemAssignedIdentityPropertiesTypeConverter.ConvertFrom); } if (content.Contains("Location")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ISystemAssignedIdentityInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ISystemAssignedIdentityInternal)this).Location, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ISystemAssignedIdentityAutoGeneratedInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ISystemAssignedIdentityAutoGeneratedInternal)this).Location, global::System.Convert.ToString); } if (content.Contains("Tag")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ISystemAssignedIdentityInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ISystemAssignedIdentityTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ISystemAssignedIdentityInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.SystemAssignedIdentityTagsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ISystemAssignedIdentityAutoGeneratedInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ISystemAssignedIdentityTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ISystemAssignedIdentityAutoGeneratedInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.SystemAssignedIdentityTagsTypeConverter.ConvertFrom); } if (content.Contains("Id")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal)this).Id, global::System.Convert.ToString); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal)this).Type, global::System.Convert.ToString); } if (content.Contains("TenantId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ISystemAssignedIdentityInternal)this).TenantId = (string) content.GetValueForProperty("TenantId",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ISystemAssignedIdentityInternal)this).TenantId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ISystemAssignedIdentityAutoGeneratedInternal)this).TenantId = (string) content.GetValueForProperty("TenantId",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ISystemAssignedIdentityAutoGeneratedInternal)this).TenantId, global::System.Convert.ToString); } if (content.Contains("PrincipalId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ISystemAssignedIdentityInternal)this).PrincipalId = (string) content.GetValueForProperty("PrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ISystemAssignedIdentityInternal)this).PrincipalId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ISystemAssignedIdentityAutoGeneratedInternal)this).PrincipalId = (string) content.GetValueForProperty("PrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ISystemAssignedIdentityAutoGeneratedInternal)this).PrincipalId, global::System.Convert.ToString); } if (content.Contains("ClientId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ISystemAssignedIdentityInternal)this).ClientId = (string) content.GetValueForProperty("ClientId",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ISystemAssignedIdentityInternal)this).ClientId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ISystemAssignedIdentityAutoGeneratedInternal)this).ClientId = (string) content.GetValueForProperty("ClientId",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ISystemAssignedIdentityAutoGeneratedInternal)this).ClientId, global::System.Convert.ToString); } if (content.Contains("ClientSecretUrl")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ISystemAssignedIdentityInternal)this).ClientSecretUrl = (string) content.GetValueForProperty("ClientSecretUrl",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ISystemAssignedIdentityInternal)this).ClientSecretUrl, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ISystemAssignedIdentityAutoGeneratedInternal)this).ClientSecretUrl = (string) content.GetValueForProperty("ClientSecretUrl",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ISystemAssignedIdentityAutoGeneratedInternal)this).ClientSecretUrl, global::System.Convert.ToString); } AfterDeserializePSObject(content); } @@ -229,8 +231,8 @@ public override string ToString() } } /// Describes a system assigned identity resource. - [System.ComponentModel.TypeConverter(typeof(SystemAssignedIdentityTypeConverter))] - public partial interface ISystemAssignedIdentity + [System.ComponentModel.TypeConverter(typeof(SystemAssignedIdentityAutoGeneratedTypeConverter))] + public partial interface ISystemAssignedIdentityAutoGenerated { diff --git a/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/SystemAssignedIdentityAutoGenerated.TypeConverter.cs b/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/SystemAssignedIdentityAutoGenerated.TypeConverter.cs new file mode 100644 index 000000000000..bde94c64e6c5 --- /dev/null +++ b/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/SystemAssignedIdentityAutoGenerated.TypeConverter.cs @@ -0,0 +1,149 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class SystemAssignedIdentityAutoGeneratedTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise + /// false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ISystemAssignedIdentityAutoGenerated ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ISystemAssignedIdentityAutoGenerated).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return SystemAssignedIdentityAutoGenerated.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return SystemAssignedIdentityAutoGenerated.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return SystemAssignedIdentityAutoGenerated.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/SystemAssignedIdentity.cs b/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/SystemAssignedIdentityAutoGenerated.cs similarity index 75% rename from src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/SystemAssignedIdentity.cs rename to src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/SystemAssignedIdentityAutoGenerated.cs index dcc9f3dc58d6..72c52d8ba3bf 100644 --- a/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/SystemAssignedIdentity.cs +++ b/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/SystemAssignedIdentityAutoGenerated.cs @@ -8,16 +8,16 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20 using static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Extensions; /// Describes a system assigned identity resource. - public partial class SystemAssignedIdentity : - Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ISystemAssignedIdentity, - Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ISystemAssignedIdentityInternal, + public partial class SystemAssignedIdentityAutoGenerated : + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ISystemAssignedIdentityAutoGenerated, + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ISystemAssignedIdentityAutoGeneratedInternal, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.IValidates { /// - /// Backing field for Inherited model /// - private Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.Resource(); + private Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGenerated __resourceAutoGenerated = new Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.ResourceAutoGenerated(); /// /// The id of the app associated with the identity. This is a random generated UUID by MSI. @@ -35,7 +35,7 @@ public partial class SystemAssignedIdentity : /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} /// [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Inherited)] - public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal)__resource).Id; } + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal)__resourceAutoGenerated).Id; } /// Backing field for property. private string _location; @@ -45,32 +45,32 @@ public partial class SystemAssignedIdentity : public string Location { get => this._location; set => this._location = value; } /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal)__resource).Id = value; } + string Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal)__resourceAutoGenerated).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal)__resourceAutoGenerated).Id = value; } /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal)__resource).Name = value; } + string Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal)__resourceAutoGenerated).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal)__resourceAutoGenerated).Name = value; } /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal)__resource).Type = value; } + string Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal)__resourceAutoGenerated).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal)__resourceAutoGenerated).Type = value; } /// Internal Acessors for ClientId - string Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ISystemAssignedIdentityInternal.ClientId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ISystemAssignedIdentityPropertiesInternal)Property).ClientId; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ISystemAssignedIdentityPropertiesInternal)Property).ClientId = value; } + string Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ISystemAssignedIdentityAutoGeneratedInternal.ClientId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ISystemAssignedIdentityPropertiesInternal)Property).ClientId; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ISystemAssignedIdentityPropertiesInternal)Property).ClientId = value; } /// Internal Acessors for ClientSecretUrl - string Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ISystemAssignedIdentityInternal.ClientSecretUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ISystemAssignedIdentityPropertiesInternal)Property).ClientSecretUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ISystemAssignedIdentityPropertiesInternal)Property).ClientSecretUrl = value; } + string Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ISystemAssignedIdentityAutoGeneratedInternal.ClientSecretUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ISystemAssignedIdentityPropertiesInternal)Property).ClientSecretUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ISystemAssignedIdentityPropertiesInternal)Property).ClientSecretUrl = value; } /// Internal Acessors for PrincipalId - string Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ISystemAssignedIdentityInternal.PrincipalId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ISystemAssignedIdentityPropertiesInternal)Property).PrincipalId; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ISystemAssignedIdentityPropertiesInternal)Property).PrincipalId = value; } + string Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ISystemAssignedIdentityAutoGeneratedInternal.PrincipalId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ISystemAssignedIdentityPropertiesInternal)Property).PrincipalId; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ISystemAssignedIdentityPropertiesInternal)Property).PrincipalId = value; } /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ISystemAssignedIdentityProperties Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ISystemAssignedIdentityInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.SystemAssignedIdentityProperties()); set { {_property = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ISystemAssignedIdentityProperties Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ISystemAssignedIdentityAutoGeneratedInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.SystemAssignedIdentityProperties()); set { {_property = value;} } } /// Internal Acessors for TenantId - string Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ISystemAssignedIdentityInternal.TenantId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ISystemAssignedIdentityPropertiesInternal)Property).TenantId; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ISystemAssignedIdentityPropertiesInternal)Property).TenantId = value; } + string Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ISystemAssignedIdentityAutoGeneratedInternal.TenantId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ISystemAssignedIdentityPropertiesInternal)Property).TenantId; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ISystemAssignedIdentityPropertiesInternal)Property).TenantId = value; } /// The name of the resource [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Inherited)] - public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal)__resource).Name; } + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal)__resourceAutoGenerated).Name; } /// The id of the service principal object associated with the created identity. [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Inlined)] @@ -102,10 +102,10 @@ public partial class SystemAssignedIdentity : /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" /// [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Inherited)] - public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal)__resource).Type; } + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal)__resourceAutoGenerated).Type; } - /// Creates an new instance. - public SystemAssignedIdentity() + /// Creates an new instance. + public SystemAssignedIdentityAutoGenerated() { } @@ -118,14 +118,14 @@ public SystemAssignedIdentity() /// public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.IEventListener eventListener) { - await eventListener.AssertNotNull(nameof(__resource), __resource); - await eventListener.AssertObjectIsValid(nameof(__resource), __resource); + await eventListener.AssertNotNull(nameof(__resourceAutoGenerated), __resourceAutoGenerated); + await eventListener.AssertObjectIsValid(nameof(__resourceAutoGenerated), __resourceAutoGenerated); } } /// Describes a system assigned identity resource. - public partial interface ISystemAssignedIdentity : + public partial interface ISystemAssignedIdentityAutoGenerated : Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResource + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGenerated { /// /// The id of the app associated with the identity. This is a random generated UUID by MSI. @@ -182,8 +182,8 @@ public partial interface ISystemAssignedIdentity : } /// Describes a system assigned identity resource. - internal partial interface ISystemAssignedIdentityInternal : - Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceInternal + internal partial interface ISystemAssignedIdentityAutoGeneratedInternal : + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResourceAutoGeneratedInternal { /// /// The id of the app associated with the identity. This is a random generated UUID by MSI. diff --git a/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/SystemAssignedIdentityAutoGenerated.json.cs b/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/SystemAssignedIdentityAutoGenerated.json.cs new file mode 100644 index 000000000000..f2fd0e146362 --- /dev/null +++ b/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/SystemAssignedIdentityAutoGenerated.json.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Extensions; + + /// Describes a system assigned identity resource. + public partial class SystemAssignedIdentityAutoGenerated + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ISystemAssignedIdentityAutoGenerated. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ISystemAssignedIdentityAutoGenerated. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ISystemAssignedIdentityAutoGenerated FromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject json ? new SystemAssignedIdentityAutoGenerated(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject instance to deserialize from. + internal SystemAssignedIdentityAutoGenerated(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __resourceAutoGenerated = new Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.ResourceAutoGenerated(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.SystemAssignedIdentityProperties.FromJson(__jsonProperties) : Property;} + {_location = If( json?.PropertyT("location"), out var __jsonLocation) ? (string)__jsonLocation : (string)Location;} + {_tag = If( json?.PropertyT("tags"), out var __jsonTags) ? Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.SystemAssignedIdentityTags.FromJson(__jsonTags) : Tag;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __resourceAutoGenerated?.ToJson(container, serializationMode); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + } + AddIf( null != (((object)this._location)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonString(this._location.ToString()) : null, "location" ,container.Add ); + AddIf( null != this._tag ? (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode) this._tag.ToJson(null,serializationMode) : null, "tags" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/UserAssignedIdentitiesListResultAutoGenerated.PowerShell.cs b/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/UserAssignedIdentitiesListResultAutoGenerated.PowerShell.cs new file mode 100644 index 000000000000..ec30f8defbfe --- /dev/null +++ b/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/UserAssignedIdentitiesListResultAutoGenerated.PowerShell.cs @@ -0,0 +1,177 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.PowerShell; + + /// Values returned by the List operation. + [System.ComponentModel.TypeConverter(typeof(UserAssignedIdentitiesListResultAutoGeneratedTypeConverter))] + public partial class UserAssignedIdentitiesListResultAutoGenerated + { + + /// + /// 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.ManagedServiceIdentity.Models.Api20220131Preview.IUserAssignedIdentitiesListResultAutoGenerated DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new UserAssignedIdentitiesListResultAutoGenerated(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.ManagedServiceIdentity.Models.Api20220131Preview.IUserAssignedIdentitiesListResultAutoGenerated DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new UserAssignedIdentitiesListResultAutoGenerated(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.ManagedServiceIdentity.Models.Api20220131Preview.IUserAssignedIdentitiesListResultAutoGenerated FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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.ManagedServiceIdentity.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal UserAssignedIdentitiesListResultAutoGenerated(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IUserAssignedIdentitiesListResultAutoGeneratedInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityAutoGenerated[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IUserAssignedIdentitiesListResultAutoGeneratedInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IdentityAutoGeneratedTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IUserAssignedIdentitiesListResultAutoGeneratedInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IUserAssignedIdentitiesListResultAutoGeneratedInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal UserAssignedIdentitiesListResultAutoGenerated(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IUserAssignedIdentitiesListResultAutoGeneratedInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityAutoGenerated[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IUserAssignedIdentitiesListResultAutoGeneratedInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IdentityAutoGeneratedTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IUserAssignedIdentitiesListResultAutoGeneratedInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IUserAssignedIdentitiesListResultAutoGeneratedInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + } + /// Values returned by the List operation. + [System.ComponentModel.TypeConverter(typeof(UserAssignedIdentitiesListResultAutoGeneratedTypeConverter))] + public partial interface IUserAssignedIdentitiesListResultAutoGenerated + + { + + } +} \ No newline at end of file diff --git a/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/UserAssignedIdentitiesListResultAutoGenerated.TypeConverter.cs b/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/UserAssignedIdentitiesListResultAutoGenerated.TypeConverter.cs new file mode 100644 index 000000000000..8fc56cd39277 --- /dev/null +++ b/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/UserAssignedIdentitiesListResultAutoGenerated.TypeConverter.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class UserAssignedIdentitiesListResultAutoGeneratedTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, + /// otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IUserAssignedIdentitiesListResultAutoGenerated ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IUserAssignedIdentitiesListResultAutoGenerated).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return UserAssignedIdentitiesListResultAutoGenerated.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return UserAssignedIdentitiesListResultAutoGenerated.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return UserAssignedIdentitiesListResultAutoGenerated.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/UserAssignedIdentitiesListResultAutoGenerated.cs b/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/UserAssignedIdentitiesListResultAutoGenerated.cs new file mode 100644 index 000000000000..ada2620ccc87 --- /dev/null +++ b/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/UserAssignedIdentitiesListResultAutoGenerated.cs @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Extensions; + + /// Values returned by the List operation. + public partial class UserAssignedIdentitiesListResultAutoGenerated : + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IUserAssignedIdentitiesListResultAutoGenerated, + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IUserAssignedIdentitiesListResultAutoGeneratedInternal + { + + /// Backing field for property. + private string _nextLink; + + /// The url to get the next page of results, if any. + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Owned)] + public string NextLink { get => this._nextLink; set => this._nextLink = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityAutoGenerated[] _value; + + /// The collection of userAssignedIdentities returned by the listing operation. + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityAutoGenerated[] Value { get => this._value; set => this._value = value; } + + /// + /// Creates an new instance. + /// + public UserAssignedIdentitiesListResultAutoGenerated() + { + + } + } + /// Values returned by the List operation. + public partial interface IUserAssignedIdentitiesListResultAutoGenerated : + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.IJsonSerializable + { + /// The url to get the next page of results, if any. + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The url to get the next page of results, if any.", + SerializedName = @"nextLink", + PossibleTypes = new [] { typeof(string) })] + string NextLink { get; set; } + /// The collection of userAssignedIdentities returned by the listing operation. + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The collection of userAssignedIdentities returned by the listing operation.", + SerializedName = @"value", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityAutoGenerated) })] + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityAutoGenerated[] Value { get; set; } + + } + /// Values returned by the List operation. + internal partial interface IUserAssignedIdentitiesListResultAutoGeneratedInternal + + { + /// The url to get the next page of results, if any. + string NextLink { get; set; } + /// The collection of userAssignedIdentities returned by the listing operation. + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityAutoGenerated[] Value { get; set; } + + } +} \ No newline at end of file diff --git a/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/UserAssignedIdentitiesListResultAutoGenerated.json.cs b/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/UserAssignedIdentitiesListResultAutoGenerated.json.cs new file mode 100644 index 000000000000..880dfe7ac843 --- /dev/null +++ b/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/UserAssignedIdentitiesListResultAutoGenerated.json.cs @@ -0,0 +1,121 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Extensions; + + /// Values returned by the List operation. + public partial class UserAssignedIdentitiesListResultAutoGenerated + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IUserAssignedIdentitiesListResultAutoGenerated. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IUserAssignedIdentitiesListResultAutoGenerated. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IUserAssignedIdentitiesListResultAutoGenerated FromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject json ? new UserAssignedIdentitiesListResultAutoGenerated(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (null != this._value) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.XNodeArray(); + foreach( var __x in this._value ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("value",__w); + } + AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink" ,container.Add ); + AfterToJson(ref container); + return container; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject instance to deserialize from. + internal UserAssignedIdentitiesListResultAutoGenerated(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityAutoGenerated) (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IdentityAutoGenerated.FromJson(__u) )) ))() : null : Value;} + {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} + AfterFromJson(json); + } + } +} \ No newline at end of file diff --git a/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/CloudError.PowerShell.cs b/src/ManagedServiceIdentity/generated/api/Models/Api20230131/CloudError.PowerShell.cs similarity index 65% rename from src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/CloudError.PowerShell.cs rename to src/ManagedServiceIdentity/generated/api/Models/Api20230131/CloudError.PowerShell.cs index 27805fe62757..03389b0399fe 100644 --- a/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/CloudError.PowerShell.cs +++ b/src/ManagedServiceIdentity/generated/api/Models/Api20230131/CloudError.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.ManagedServiceIdentity.Models.Api20220131Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131 { using Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.PowerShell; @@ -63,7 +63,7 @@ public partial class CloudError 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,29 +78,29 @@ internal CloudError(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Error")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorBody) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.CloudErrorBodyTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ICloudErrorInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ICloudErrorBody) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ICloudErrorInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.CloudErrorBodyTypeConverter.ConvertFrom); } if (content.Contains("Code")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorInternal)this).Code, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ICloudErrorInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ICloudErrorInternal)this).Code, global::System.Convert.ToString); } if (content.Contains("Message")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorInternal)this).Message, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ICloudErrorInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ICloudErrorInternal)this).Message, global::System.Convert.ToString); } if (content.Contains("Target")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorInternal)this).Target, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ICloudErrorInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ICloudErrorInternal)this).Target, global::System.Convert.ToString); } if (content.Contains("Detail")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorBody[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.CloudErrorBodyTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ICloudErrorInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ICloudErrorBody[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ICloudErrorInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.CloudErrorBodyTypeConverter.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. @@ -115,51 +115,49 @@ internal CloudError(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("Error")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorBody) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.CloudErrorBodyTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ICloudErrorInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ICloudErrorBody) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ICloudErrorInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.CloudErrorBodyTypeConverter.ConvertFrom); } if (content.Contains("Code")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorInternal)this).Code, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ICloudErrorInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ICloudErrorInternal)this).Code, global::System.Convert.ToString); } if (content.Contains("Message")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorInternal)this).Message, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ICloudErrorInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ICloudErrorInternal)this).Message, global::System.Convert.ToString); } if (content.Contains("Target")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorInternal)this).Target, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ICloudErrorInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ICloudErrorInternal)this).Target, global::System.Convert.ToString); } if (content.Contains("Detail")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorBody[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.CloudErrorBodyTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ICloudErrorInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ICloudErrorBody[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ICloudErrorInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.CloudErrorBodyTypeConverter.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.ManagedServiceIdentity.Models.Api20220131Preview.ICloudError DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ICloudError DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new CloudError(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.ManagedServiceIdentity.Models.Api20220131Preview.ICloudError DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ICloudError DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new CloudError(content); } @@ -169,7 +167,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.A /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudError FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ICloudError FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/CloudError.TypeConverter.cs b/src/ManagedServiceIdentity/generated/api/Models/Api20230131/CloudError.TypeConverter.cs similarity index 97% rename from src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/CloudError.TypeConverter.cs rename to src/ManagedServiceIdentity/generated/api/Models/Api20230131/CloudError.TypeConverter.cs index f5a7164ef231..adbb5786e5e1 100644 --- a/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/CloudError.TypeConverter.cs +++ b/src/ManagedServiceIdentity/generated/api/Models/Api20230131/CloudError.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.ManagedServiceIdentity.Models.Api20220131Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131 { using Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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.ManagedServiceIdentity.Models.Api20220131Preview.ICloudError ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ICloudError ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudError).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ICloudError).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/CloudError.cs b/src/ManagedServiceIdentity/generated/api/Models/Api20230131/CloudError.cs similarity index 72% rename from src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/CloudError.cs rename to src/ManagedServiceIdentity/generated/api/Models/Api20230131/CloudError.cs index 214c94b7e15f..9467dbc0b68d 100644 --- a/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/CloudError.cs +++ b/src/ManagedServiceIdentity/generated/api/Models/Api20230131/CloudError.cs @@ -3,45 +3,45 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131 { using static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Extensions; /// An error response from the ManagedServiceIdentity service. public partial class CloudError : - Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudError, - Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorInternal + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ICloudError, + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ICloudErrorInternal { /// An identifier for the error. [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Inlined)] - public string Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorBodyInternal)Error).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorBodyInternal)Error).Code = value ?? null; } + public string Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ICloudErrorBodyInternal)Error).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ICloudErrorBodyInternal)Error).Code = value ?? null; } /// A list of additional details about the error. [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorBody[] Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorBodyInternal)Error).Detail; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorBodyInternal)Error).Detail = value ?? null /* arrayOf */; } + public Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ICloudErrorBody[] Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ICloudErrorBodyInternal)Error).Detail; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ICloudErrorBodyInternal)Error).Detail = value ?? null /* arrayOf */; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorBody _error; + private Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ICloudErrorBody _error; /// A list of additional details about the error. [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorBody Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.CloudErrorBody()); set => this._error = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ICloudErrorBody Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.CloudErrorBody()); set => this._error = value; } /// /// A message describing the error, intended to be suitable for display in a user interface. /// [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Inlined)] - public string Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorBodyInternal)Error).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorBodyInternal)Error).Message = value ?? null; } + public string Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ICloudErrorBodyInternal)Error).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ICloudErrorBodyInternal)Error).Message = value ?? null; } /// Internal Acessors for Error - Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorBody Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorInternal.Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.CloudErrorBody()); set { {_error = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ICloudErrorBody Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ICloudErrorInternal.Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.CloudErrorBody()); set { {_error = value;} } } /// /// The target of the particular error. For example, the name of the property in error. /// [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Inlined)] - public string Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorBodyInternal)Error).Target; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorBodyInternal)Error).Target = value ?? null; } + public string Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ICloudErrorBodyInternal)Error).Target; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ICloudErrorBodyInternal)Error).Target = value ?? null; } /// Creates an new instance. public CloudError() @@ -67,8 +67,8 @@ public partial interface ICloudError : ReadOnly = false, Description = @"A list of additional details about the error.", SerializedName = @"details", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorBody) })] - Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorBody[] Detail { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ICloudErrorBody) })] + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ICloudErrorBody[] Detail { get; set; } /// /// A message describing the error, intended to be suitable for display in a user interface. /// @@ -98,9 +98,9 @@ internal partial interface ICloudErrorInternal /// An identifier for the error. string Code { get; set; } /// A list of additional details about the error. - Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorBody[] Detail { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ICloudErrorBody[] Detail { get; set; } /// A list of additional details about the error. - Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorBody Error { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ICloudErrorBody Error { get; set; } /// /// A message describing the error, intended to be suitable for display in a user interface. /// diff --git a/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/CloudError.json.cs b/src/ManagedServiceIdentity/generated/api/Models/Api20230131/CloudError.json.cs similarity index 94% rename from src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/CloudError.json.cs rename to src/ManagedServiceIdentity/generated/api/Models/Api20230131/CloudError.json.cs index f192c80718c9..5dd84ded6bb9 100644 --- a/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/CloudError.json.cs +++ b/src/ManagedServiceIdentity/generated/api/Models/Api20230131/CloudError.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.ManagedServiceIdentity.Models.Api20220131Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131 { using static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Extensions; @@ -65,18 +65,18 @@ internal CloudError(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Ru { return; } - {_error = If( json?.PropertyT("error"), out var __jsonError) ? Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.CloudErrorBody.FromJson(__jsonError) : Error;} + {_error = If( json?.PropertyT("error"), out var __jsonError) ? Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.CloudErrorBody.FromJson(__jsonError) : Error;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudError. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ICloudError. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudError. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ICloudError. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudError FromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ICloudError FromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject json ? new CloudError(json) : null; } diff --git a/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/CloudErrorBody.PowerShell.cs b/src/ManagedServiceIdentity/generated/api/Models/Api20230131/CloudErrorBody.PowerShell.cs similarity index 69% rename from src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/CloudErrorBody.PowerShell.cs rename to src/ManagedServiceIdentity/generated/api/Models/Api20230131/CloudErrorBody.PowerShell.cs index 417f6385d70c..d4ab782c5c02 100644 --- a/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/CloudErrorBody.PowerShell.cs +++ b/src/ManagedServiceIdentity/generated/api/Models/Api20230131/CloudErrorBody.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.ManagedServiceIdentity.Models.Api20220131Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131 { using Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.PowerShell; @@ -63,7 +63,7 @@ public partial class CloudErrorBody 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 CloudErrorBody(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Code")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorBodyInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorBodyInternal)this).Code, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ICloudErrorBodyInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ICloudErrorBodyInternal)this).Code, global::System.Convert.ToString); } if (content.Contains("Message")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorBodyInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorBodyInternal)this).Message, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ICloudErrorBodyInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ICloudErrorBodyInternal)this).Message, global::System.Convert.ToString); } if (content.Contains("Target")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorBodyInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorBodyInternal)this).Target, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ICloudErrorBodyInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ICloudErrorBodyInternal)this).Target, global::System.Convert.ToString); } if (content.Contains("Detail")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorBodyInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorBody[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorBodyInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.CloudErrorBodyTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ICloudErrorBodyInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ICloudErrorBody[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ICloudErrorBodyInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.CloudErrorBodyTypeConverter.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. @@ -111,47 +111,47 @@ internal CloudErrorBody(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("Code")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorBodyInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorBodyInternal)this).Code, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ICloudErrorBodyInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ICloudErrorBodyInternal)this).Code, global::System.Convert.ToString); } if (content.Contains("Message")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorBodyInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorBodyInternal)this).Message, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ICloudErrorBodyInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ICloudErrorBodyInternal)this).Message, global::System.Convert.ToString); } if (content.Contains("Target")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorBodyInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorBodyInternal)this).Target, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ICloudErrorBodyInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ICloudErrorBodyInternal)this).Target, global::System.Convert.ToString); } if (content.Contains("Detail")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorBodyInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorBody[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorBodyInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.CloudErrorBodyTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ICloudErrorBodyInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ICloudErrorBody[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ICloudErrorBodyInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.CloudErrorBodyTypeConverter.ConvertFrom)); } AfterDeserializePSObject(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorBody DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ICloudErrorBody DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new CloudErrorBody(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.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorBody DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ICloudErrorBody DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new CloudErrorBody(content); } @@ -161,7 +161,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.A /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorBody FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ICloudErrorBody FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/CloudErrorBody.TypeConverter.cs b/src/ManagedServiceIdentity/generated/api/Models/Api20230131/CloudErrorBody.TypeConverter.cs similarity index 97% rename from src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/CloudErrorBody.TypeConverter.cs rename to src/ManagedServiceIdentity/generated/api/Models/Api20230131/CloudErrorBody.TypeConverter.cs index ee496b30e0c1..8947e00a660e 100644 --- a/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/CloudErrorBody.TypeConverter.cs +++ b/src/ManagedServiceIdentity/generated/api/Models/Api20230131/CloudErrorBody.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.ManagedServiceIdentity.Models.Api20220131Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131 { using Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorBody ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ICloudErrorBody ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorBody).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ICloudErrorBody).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/CloudErrorBody.cs b/src/ManagedServiceIdentity/generated/api/Models/Api20230131/CloudErrorBody.cs similarity index 91% rename from src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/CloudErrorBody.cs rename to src/ManagedServiceIdentity/generated/api/Models/Api20230131/CloudErrorBody.cs index f8ecd8586adb..47ebdf0d6e46 100644 --- a/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/CloudErrorBody.cs +++ b/src/ManagedServiceIdentity/generated/api/Models/Api20230131/CloudErrorBody.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.ManagedServiceIdentity.Models.Api20220131Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131 { using static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Extensions; /// An error response from the ManagedServiceIdentity service. public partial class CloudErrorBody : - Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorBody, - Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorBodyInternal + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ICloudErrorBody, + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ICloudErrorBodyInternal { /// Backing field for property. @@ -21,11 +21,11 @@ public partial class CloudErrorBody : public string Code { get => this._code; set => this._code = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorBody[] _detail; + private Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ICloudErrorBody[] _detail; /// A list of additional details about the error. [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorBody[] Detail { get => this._detail; set => this._detail = value; } + public Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ICloudErrorBody[] Detail { get => this._detail; set => this._detail = value; } /// Backing field for property. private string _message; @@ -69,8 +69,8 @@ public partial interface ICloudErrorBody : ReadOnly = false, Description = @"A list of additional details about the error.", SerializedName = @"details", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorBody) })] - Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorBody[] Detail { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ICloudErrorBody) })] + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ICloudErrorBody[] Detail { get; set; } /// /// A message describing the error, intended to be suitable for display in a user interface. /// @@ -100,7 +100,7 @@ internal partial interface ICloudErrorBodyInternal /// An identifier for the error. string Code { get; set; } /// A list of additional details about the error. - Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorBody[] Detail { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ICloudErrorBody[] Detail { get; set; } /// /// A message describing the error, intended to be suitable for display in a user interface. /// diff --git a/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/CloudErrorBody.json.cs b/src/ManagedServiceIdentity/generated/api/Models/Api20230131/CloudErrorBody.json.cs similarity index 92% rename from src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/CloudErrorBody.json.cs rename to src/ManagedServiceIdentity/generated/api/Models/Api20230131/CloudErrorBody.json.cs index 4e20311e423b..c7c60b5b723a 100644 --- a/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/CloudErrorBody.json.cs +++ b/src/ManagedServiceIdentity/generated/api/Models/Api20230131/CloudErrorBody.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.ManagedServiceIdentity.Models.Api20220131Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131 { using static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Extensions; @@ -68,18 +68,18 @@ internal CloudErrorBody(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentit {_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.ManagedServiceIdentity.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.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorBody) (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.CloudErrorBody.FromJson(__u) )) ))() : null : Detail;} + {_detail = If( json?.PropertyT("details"), out var __jsonDetails) ? If( __jsonDetails as Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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.ManagedServiceIdentity.Models.Api20230131.ICloudErrorBody) (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.CloudErrorBody.FromJson(__u) )) ))() : null : Detail;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorBody. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ICloudErrorBody. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorBody. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ICloudErrorBody. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorBody FromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ICloudErrorBody FromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject json ? new CloudErrorBody(json) : null; } diff --git a/src/ManagedServiceIdentity/generated/api/Models/Api20230131/FederatedIdentityCredential.PowerShell.cs b/src/ManagedServiceIdentity/generated/api/Models/Api20230131/FederatedIdentityCredential.PowerShell.cs new file mode 100644 index 000000000000..95d8e2f3c8aa --- /dev/null +++ b/src/ManagedServiceIdentity/generated/api/Models/Api20230131/FederatedIdentityCredential.PowerShell.cs @@ -0,0 +1,270 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131 +{ + using Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.PowerShell; + + /// Describes a federated identity credential. + [System.ComponentModel.TypeConverter(typeof(FederatedIdentityCredentialTypeConverter))] + public partial class FederatedIdentityCredential + { + + /// + /// 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.ManagedServiceIdentity.Models.Api20230131.IFederatedIdentityCredential DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new FederatedIdentityCredential(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.ManagedServiceIdentity.Models.Api20230131.IFederatedIdentityCredential DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new FederatedIdentityCredential(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal FederatedIdentityCredential(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.ManagedServiceIdentity.Models.Api20230131.IFederatedIdentityCredentialInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredentialProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IFederatedIdentityCredentialInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.FederatedIdentityCredentialPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Issuer")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IFederatedIdentityCredentialInternal)this).Issuer = (string) content.GetValueForProperty("Issuer",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IFederatedIdentityCredentialInternal)this).Issuer, global::System.Convert.ToString); + } + if (content.Contains("Subject")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IFederatedIdentityCredentialInternal)this).Subject = (string) content.GetValueForProperty("Subject",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IFederatedIdentityCredentialInternal)this).Subject, global::System.Convert.ToString); + } + if (content.Contains("Audience")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IFederatedIdentityCredentialInternal)this).Audience = (string[]) content.GetValueForProperty("Audience",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IFederatedIdentityCredentialInternal)this).Audience, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal FederatedIdentityCredential(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.ManagedServiceIdentity.Models.Api20230131.IFederatedIdentityCredentialInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredentialProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IFederatedIdentityCredentialInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.FederatedIdentityCredentialPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Issuer")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IFederatedIdentityCredentialInternal)this).Issuer = (string) content.GetValueForProperty("Issuer",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IFederatedIdentityCredentialInternal)this).Issuer, global::System.Convert.ToString); + } + if (content.Contains("Subject")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IFederatedIdentityCredentialInternal)this).Subject = (string) content.GetValueForProperty("Subject",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IFederatedIdentityCredentialInternal)this).Subject, global::System.Convert.ToString); + } + if (content.Contains("Audience")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IFederatedIdentityCredentialInternal)this).Audience = (string[]) content.GetValueForProperty("Audience",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IFederatedIdentityCredentialInternal)this).Audience, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + AfterDeserializePSObject(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IFederatedIdentityCredential FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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.ManagedServiceIdentity.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(); + } + } + /// Describes a federated identity credential. + [System.ComponentModel.TypeConverter(typeof(FederatedIdentityCredentialTypeConverter))] + public partial interface IFederatedIdentityCredential + + { + + } +} \ No newline at end of file diff --git a/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/FederatedIdentityCredential.TypeConverter.cs b/src/ManagedServiceIdentity/generated/api/Models/Api20230131/FederatedIdentityCredential.TypeConverter.cs similarity index 97% rename from src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/FederatedIdentityCredential.TypeConverter.cs rename to src/ManagedServiceIdentity/generated/api/Models/Api20230131/FederatedIdentityCredential.TypeConverter.cs index 2f6048195327..727c96401414 100644 --- a/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/FederatedIdentityCredential.TypeConverter.cs +++ b/src/ManagedServiceIdentity/generated/api/Models/Api20230131/FederatedIdentityCredential.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.ManagedServiceIdentity.Models.Api20220131Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131 { using Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredential ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IFederatedIdentityCredential ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredential).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IFederatedIdentityCredential).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/ManagedServiceIdentity/generated/api/Models/Api20230131/FederatedIdentityCredential.cs b/src/ManagedServiceIdentity/generated/api/Models/Api20230131/FederatedIdentityCredential.cs new file mode 100644 index 000000000000..7282cc51eb47 --- /dev/null +++ b/src/ManagedServiceIdentity/generated/api/Models/Api20230131/FederatedIdentityCredential.cs @@ -0,0 +1,184 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Extensions; + + /// Describes a federated identity credential. + public partial class FederatedIdentityCredential : + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IFederatedIdentityCredential, + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IFederatedIdentityCredentialInternal, + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.Resource(); + + /// The list of audiences that can appear in the issued token. + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Inlined)] + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.FormatTable(Index = 3)] + public string[] Audience { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredentialPropertiesInternal)Property).Audience; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredentialPropertiesInternal)Property).Audience = value ?? null /* arrayOf */; } + + /// + /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + /// + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Inherited)] + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.DoNotFormat] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)__resource).Id; } + + /// The URL of the issuer to be trusted. + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Inlined)] + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.FormatTable(Index = 1)] + public string Issuer { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredentialPropertiesInternal)Property).Issuer; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredentialPropertiesInternal)Property).Issuer = value ?? null; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredentialProperties Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IFederatedIdentityCredentialInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.FederatedIdentityCredentialProperties()); set { {_property = value;} } } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)__resource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)__resource).Name = value; } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.ISystemData Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)__resource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)__resource).SystemData = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)__resource).Type = value; } + + /// The name of the resource + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Inherited)] + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.FormatTable(Index = 0)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)__resource).Name; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredentialProperties _property; + + /// The properties associated with the federated identity credential. + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Owned)] + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.DoNotFormat] + internal Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredentialProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.FederatedIdentityCredentialProperties()); set => this._property = value; } + + /// Gets the resource group name + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Owned)] + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.DoNotFormat] + 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); } + + /// The identifier of the external identity. + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Inlined)] + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.FormatTable(Index = 2)] + public string Subject { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredentialPropertiesInternal)Property).Subject; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredentialPropertiesInternal)Property).Subject = value ?? null; } + + /// + /// Azure Resource Manager metadata containing createdBy and modifiedBy information. + /// + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Inherited)] + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.DoNotFormat] + public Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)__resource).SystemData; } + + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Inherited)] + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.DoNotFormat] + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)__resource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)__resource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Inherited)] + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.DoNotFormat] + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)__resource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)__resource).SystemDataCreatedBy = value ?? null; } + + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Inherited)] + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.DoNotFormat] + public Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)__resource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)__resource).SystemDataCreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Support.CreatedByType)""); } + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Inherited)] + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.DoNotFormat] + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Inherited)] + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.DoNotFormat] + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedBy = value ?? null; } + + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Inherited)] + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.DoNotFormat] + public Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Support.CreatedByType)""); } + + /// + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + /// + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Inherited)] + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.DoNotFormat] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)__resource).Type; } + + /// Creates an new instance. + public FederatedIdentityCredential() + { + + } + + /// 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.ManagedServiceIdentity.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__resource), __resource); + await eventListener.AssertObjectIsValid(nameof(__resource), __resource); + } + } + /// Describes a federated identity credential. + public partial interface IFederatedIdentityCredential : + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResource + { + /// The list of audiences that can appear in the issued token. + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The list of audiences that can appear in the issued token.", + SerializedName = @"audiences", + PossibleTypes = new [] { typeof(string) })] + string[] Audience { get; set; } + /// The URL of the issuer to be trusted. + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The URL of the issuer to be trusted.", + SerializedName = @"issuer", + PossibleTypes = new [] { typeof(string) })] + string Issuer { get; set; } + /// The identifier of the external identity. + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The identifier of the external identity.", + SerializedName = @"subject", + PossibleTypes = new [] { typeof(string) })] + string Subject { get; set; } + + } + /// Describes a federated identity credential. + internal partial interface IFederatedIdentityCredentialInternal : + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal + { + /// The list of audiences that can appear in the issued token. + string[] Audience { get; set; } + /// The URL of the issuer to be trusted. + string Issuer { get; set; } + /// The properties associated with the federated identity credential. + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredentialProperties Property { get; set; } + /// The identifier of the external identity. + string Subject { get; set; } + + } +} \ No newline at end of file diff --git a/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/FederatedIdentityCredential.json.cs b/src/ManagedServiceIdentity/generated/api/Models/Api20230131/FederatedIdentityCredential.json.cs similarity index 94% rename from src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/FederatedIdentityCredential.json.cs rename to src/ManagedServiceIdentity/generated/api/Models/Api20230131/FederatedIdentityCredential.json.cs index adf2345f8e7e..ee015347f28f 100644 --- a/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/FederatedIdentityCredential.json.cs +++ b/src/ManagedServiceIdentity/generated/api/Models/Api20230131/FederatedIdentityCredential.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.ManagedServiceIdentity.Models.Api20220131Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131 { using static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Extensions; @@ -65,19 +65,19 @@ internal FederatedIdentityCredential(Microsoft.Azure.PowerShell.Cmdlets.ManagedS { return; } - __resource = new Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.Resource(json); + __resource = new Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.Resource(json); {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.FederatedIdentityCredentialProperties.FromJson(__jsonProperties) : Property;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredential. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IFederatedIdentityCredential. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredential. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IFederatedIdentityCredential. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredential FromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IFederatedIdentityCredential FromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject json ? new FederatedIdentityCredential(json) : null; } diff --git a/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/FederatedIdentityCredentialsListResult.PowerShell.cs b/src/ManagedServiceIdentity/generated/api/Models/Api20230131/FederatedIdentityCredentialsListResult.PowerShell.cs similarity index 72% rename from src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/FederatedIdentityCredentialsListResult.PowerShell.cs rename to src/ManagedServiceIdentity/generated/api/Models/Api20230131/FederatedIdentityCredentialsListResult.PowerShell.cs index 76b129828469..e4090417444f 100644 --- a/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/FederatedIdentityCredentialsListResult.PowerShell.cs +++ b/src/ManagedServiceIdentity/generated/api/Models/Api20230131/FederatedIdentityCredentialsListResult.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.ManagedServiceIdentity.Models.Api20220131Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131 { using Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.PowerShell; @@ -63,35 +63,35 @@ public partial class FederatedIdentityCredentialsListResult 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.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredentialsListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IFederatedIdentityCredentialsListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new FederatedIdentityCredentialsListResult(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.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredentialsListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IFederatedIdentityCredentialsListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new FederatedIdentityCredentialsListResult(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -106,17 +106,17 @@ internal FederatedIdentityCredentialsListResult(global::System.Collections.IDict // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredentialsListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredential[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredentialsListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.FederatedIdentityCredentialTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IFederatedIdentityCredentialsListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IFederatedIdentityCredential[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IFederatedIdentityCredentialsListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.FederatedIdentityCredentialTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredentialsListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredentialsListResultInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IFederatedIdentityCredentialsListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IFederatedIdentityCredentialsListResultInternal)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. @@ -131,11 +131,11 @@ internal FederatedIdentityCredentialsListResult(global::System.Management.Automa // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredentialsListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredential[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredentialsListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.FederatedIdentityCredentialTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IFederatedIdentityCredentialsListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IFederatedIdentityCredential[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IFederatedIdentityCredentialsListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.FederatedIdentityCredentialTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredentialsListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredentialsListResultInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IFederatedIdentityCredentialsListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IFederatedIdentityCredentialsListResultInternal)this).NextLink, global::System.Convert.ToString); } AfterDeserializePSObject(content); } @@ -148,7 +148,7 @@ internal FederatedIdentityCredentialsListResult(global::System.Management.Automa /// /// an instance of the model class. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredentialsListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IFederatedIdentityCredentialsListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/FederatedIdentityCredentialsListResult.TypeConverter.cs b/src/ManagedServiceIdentity/generated/api/Models/Api20230131/FederatedIdentityCredentialsListResult.TypeConverter.cs similarity index 96% rename from src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/FederatedIdentityCredentialsListResult.TypeConverter.cs rename to src/ManagedServiceIdentity/generated/api/Models/Api20230131/FederatedIdentityCredentialsListResult.TypeConverter.cs index 914e056851ed..0338df21d23a 100644 --- a/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/FederatedIdentityCredentialsListResult.TypeConverter.cs +++ b/src/ManagedServiceIdentity/generated/api/Models/Api20230131/FederatedIdentityCredentialsListResult.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.ManagedServiceIdentity.Models.Api20220131Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131 { using Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredentialsListResult ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IFederatedIdentityCredentialsListResult ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredentialsListResult).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IFederatedIdentityCredentialsListResult).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/FederatedIdentityCredentialsListResult.cs b/src/ManagedServiceIdentity/generated/api/Models/Api20230131/FederatedIdentityCredentialsListResult.cs similarity index 85% rename from src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/FederatedIdentityCredentialsListResult.cs rename to src/ManagedServiceIdentity/generated/api/Models/Api20230131/FederatedIdentityCredentialsListResult.cs index 9328b62b59a1..a86f3c42cb81 100644 --- a/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/FederatedIdentityCredentialsListResult.cs +++ b/src/ManagedServiceIdentity/generated/api/Models/Api20230131/FederatedIdentityCredentialsListResult.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.ManagedServiceIdentity.Models.Api20220131Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131 { using static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Extensions; /// Values returned by the List operation for federated identity credentials. public partial class FederatedIdentityCredentialsListResult : - Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredentialsListResult, - Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredentialsListResultInternal + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IFederatedIdentityCredentialsListResult, + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IFederatedIdentityCredentialsListResultInternal { /// Backing field for property. @@ -21,13 +21,13 @@ public partial class FederatedIdentityCredentialsListResult : public string NextLink { get => this._nextLink; set => this._nextLink = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredential[] _value; + private Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IFederatedIdentityCredential[] _value; /// /// The collection of federated identity credentials returned by the listing operation. /// [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredential[] Value { get => this._value; set => this._value = value; } + public Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IFederatedIdentityCredential[] Value { get => this._value; set => this._value = value; } /// Creates an new instance. public FederatedIdentityCredentialsListResult() @@ -55,8 +55,8 @@ public partial interface IFederatedIdentityCredentialsListResult : ReadOnly = false, Description = @"The collection of federated identity credentials returned by the listing operation.", SerializedName = @"value", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredential) })] - Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredential[] Value { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IFederatedIdentityCredential) })] + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IFederatedIdentityCredential[] Value { get; set; } } /// Values returned by the List operation for federated identity credentials. @@ -68,7 +68,7 @@ internal partial interface IFederatedIdentityCredentialsListResultInternal /// /// The collection of federated identity credentials returned by the listing operation. /// - Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredential[] Value { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IFederatedIdentityCredential[] Value { get; set; } } } \ No newline at end of file diff --git a/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/FederatedIdentityCredentialsListResult.json.cs b/src/ManagedServiceIdentity/generated/api/Models/Api20230131/FederatedIdentityCredentialsListResult.json.cs similarity index 90% rename from src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/FederatedIdentityCredentialsListResult.json.cs rename to src/ManagedServiceIdentity/generated/api/Models/Api20230131/FederatedIdentityCredentialsListResult.json.cs index 4a324b050bd1..e8ff50eb92da 100644 --- a/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/FederatedIdentityCredentialsListResult.json.cs +++ b/src/ManagedServiceIdentity/generated/api/Models/Api20230131/FederatedIdentityCredentialsListResult.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.ManagedServiceIdentity.Models.Api20220131Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131 { using static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Extensions; @@ -65,19 +65,19 @@ internal FederatedIdentityCredentialsListResult(Microsoft.Azure.PowerShell.Cmdle { return; } - {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredential) (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.FederatedIdentityCredential.FromJson(__u) )) ))() : null : Value;} + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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.ManagedServiceIdentity.Models.Api20230131.IFederatedIdentityCredential) (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.FederatedIdentityCredential.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.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredentialsListResult. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IFederatedIdentityCredentialsListResult. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredentialsListResult. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IFederatedIdentityCredentialsListResult. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredentialsListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IFederatedIdentityCredentialsListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject json ? new FederatedIdentityCredentialsListResult(json) : null; } diff --git a/src/ManagedServiceIdentity/generated/api/Models/Api20230131/Identity.PowerShell.cs b/src/ManagedServiceIdentity/generated/api/Models/Api20230131/Identity.PowerShell.cs new file mode 100644 index 000000000000..643276526691 --- /dev/null +++ b/src/ManagedServiceIdentity/generated/api/Models/Api20230131/Identity.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.ManagedServiceIdentity.Models.Api20230131 +{ + using Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.PowerShell; + + /// Describes an identity resource. + [System.ComponentModel.TypeConverter(typeof(IdentityTypeConverter))] + public partial class Identity + { + + /// + /// 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.ManagedServiceIdentity.Models.Api20230131.IIdentity DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new Identity(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.ManagedServiceIdentity.Models.Api20230131.IIdentity DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new Identity(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.ManagedServiceIdentity.Models.Api20230131.IIdentity FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal Identity(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.ManagedServiceIdentity.Models.Api20230131.IIdentityInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IUserAssignedIdentityProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IIdentityInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.UserAssignedIdentityPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.TrackedResourceTagsTypeConverter.ConvertFrom); + } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.ITrackedResourceInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("TenantId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IIdentityInternal)this).TenantId = (string) content.GetValueForProperty("TenantId",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IIdentityInternal)this).TenantId, global::System.Convert.ToString); + } + if (content.Contains("PrincipalId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IIdentityInternal)this).PrincipalId = (string) content.GetValueForProperty("PrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IIdentityInternal)this).PrincipalId, global::System.Convert.ToString); + } + if (content.Contains("ClientId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IIdentityInternal)this).ClientId = (string) content.GetValueForProperty("ClientId",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IIdentityInternal)this).ClientId, 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 Identity(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.ManagedServiceIdentity.Models.Api20230131.IIdentityInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IUserAssignedIdentityProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IIdentityInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.UserAssignedIdentityPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.TrackedResourceTagsTypeConverter.ConvertFrom); + } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.ITrackedResourceInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("TenantId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IIdentityInternal)this).TenantId = (string) content.GetValueForProperty("TenantId",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IIdentityInternal)this).TenantId, global::System.Convert.ToString); + } + if (content.Contains("PrincipalId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IIdentityInternal)this).PrincipalId = (string) content.GetValueForProperty("PrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IIdentityInternal)this).PrincipalId, global::System.Convert.ToString); + } + if (content.Contains("ClientId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IIdentityInternal)this).ClientId = (string) content.GetValueForProperty("ClientId",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IIdentityInternal)this).ClientId, 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.ManagedServiceIdentity.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(); + } + } + /// Describes an identity resource. + [System.ComponentModel.TypeConverter(typeof(IdentityTypeConverter))] + public partial interface IIdentity + + { + + } +} \ No newline at end of file diff --git a/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/Identity.TypeConverter.cs b/src/ManagedServiceIdentity/generated/api/Models/Api20230131/Identity.TypeConverter.cs similarity index 97% rename from src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/Identity.TypeConverter.cs rename to src/ManagedServiceIdentity/generated/api/Models/Api20230131/Identity.TypeConverter.cs index b122904d8f30..6435898989f3 100644 --- a/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/Identity.TypeConverter.cs +++ b/src/ManagedServiceIdentity/generated/api/Models/Api20230131/Identity.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.ManagedServiceIdentity.Models.Api20220131Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131 { using Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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.ManagedServiceIdentity.Models.Api20220131Preview.IIdentity ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IIdentity ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentity).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IIdentity).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/ManagedServiceIdentity/generated/api/Models/Api20230131/Identity.cs b/src/ManagedServiceIdentity/generated/api/Models/Api20230131/Identity.cs new file mode 100644 index 000000000000..61ddec154738 --- /dev/null +++ b/src/ManagedServiceIdentity/generated/api/Models/Api20230131/Identity.cs @@ -0,0 +1,192 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Extensions; + + /// Describes an identity resource. + public partial class Identity : + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IIdentity, + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IIdentityInternal, + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.ITrackedResource __trackedResource = new Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.TrackedResource(); + + /// + /// The id of the app associated with the identity. This is a random generated UUID by MSI. + /// + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Inlined)] + public string ClientId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IUserAssignedIdentityPropertiesInternal)Property).ClientId; } + + /// + /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + /// + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)__trackedResource).Id; } + + /// The geo-location where the resource lives + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Inherited)] + public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.ITrackedResourceInternal)__trackedResource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.ITrackedResourceInternal)__trackedResource).Location = value ; } + + /// Internal Acessors for ClientId + string Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IIdentityInternal.ClientId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IUserAssignedIdentityPropertiesInternal)Property).ClientId; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IUserAssignedIdentityPropertiesInternal)Property).ClientId = value; } + + /// Internal Acessors for PrincipalId + string Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IIdentityInternal.PrincipalId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IUserAssignedIdentityPropertiesInternal)Property).PrincipalId; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IUserAssignedIdentityPropertiesInternal)Property).PrincipalId = value; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IUserAssignedIdentityProperties Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IIdentityInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.UserAssignedIdentityProperties()); set { {_property = value;} } } + + /// Internal Acessors for TenantId + string Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IIdentityInternal.TenantId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IUserAssignedIdentityPropertiesInternal)Property).TenantId; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IUserAssignedIdentityPropertiesInternal)Property).TenantId = value; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)__trackedResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)__trackedResource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)__trackedResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)__trackedResource).Name = value; } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.ISystemData Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)__trackedResource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)__trackedResource).SystemData = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)__trackedResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)__trackedResource).Type = value; } + + /// The name of the resource + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)__trackedResource).Name; } + + /// The id of the service principal object associated with the created identity. + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Inlined)] + public string PrincipalId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IUserAssignedIdentityPropertiesInternal)Property).PrincipalId; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IUserAssignedIdentityProperties _property; + + /// The properties associated with the identity. + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IUserAssignedIdentityProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.UserAssignedIdentityProperties()); } + + /// Gets the resource group name + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)__trackedResource).SystemData; } + + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)__trackedResource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)__trackedResource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Inherited)] + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)__trackedResource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)__trackedResource).SystemDataCreatedBy = value ?? null; } + + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)__trackedResource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)__trackedResource).SystemDataCreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Support.CreatedByType)""); } + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)__trackedResource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)__trackedResource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)__trackedResource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)__trackedResource).SystemDataLastModifiedBy = value ?? null; } + + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)__trackedResource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)__trackedResource).SystemDataLastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Support.CreatedByType)""); } + + /// Resource tags. + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.ITrackedResourceTags Tag { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.ITrackedResourceInternal)__trackedResource).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.ITrackedResourceInternal)__trackedResource).Tag = value ?? null /* model class */; } + + /// The id of the tenant which the identity belongs to. + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Inlined)] + public string TenantId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IUserAssignedIdentityPropertiesInternal)Property).TenantId; } + + /// + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + /// + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)__trackedResource).Type; } + + /// Creates an new instance. + public Identity() + { + + } + + /// 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.ManagedServiceIdentity.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__trackedResource), __trackedResource); + await eventListener.AssertObjectIsValid(nameof(__trackedResource), __trackedResource); + } + } + /// Describes an identity resource. + public partial interface IIdentity : + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.ITrackedResource + { + /// + /// The id of the app associated with the identity. This is a random generated UUID by MSI. + /// + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The id of the app associated with the identity. This is a random generated UUID by MSI.", + SerializedName = @"clientId", + PossibleTypes = new [] { typeof(string) })] + string ClientId { get; } + /// The id of the service principal object associated with the created identity. + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The id of the service principal object associated with the created identity.", + SerializedName = @"principalId", + PossibleTypes = new [] { typeof(string) })] + string PrincipalId { get; } + /// The id of the tenant which the identity belongs to. + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The id of the tenant which the identity belongs to.", + SerializedName = @"tenantId", + PossibleTypes = new [] { typeof(string) })] + string TenantId { get; } + + } + /// Describes an identity resource. + internal partial interface IIdentityInternal : + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.ITrackedResourceInternal + { + /// + /// The id of the app associated with the identity. This is a random generated UUID by MSI. + /// + string ClientId { get; set; } + /// The id of the service principal object associated with the created identity. + string PrincipalId { get; set; } + /// The properties associated with the identity. + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IUserAssignedIdentityProperties Property { get; set; } + /// The id of the tenant which the identity belongs to. + string TenantId { get; set; } + + } +} \ No newline at end of file diff --git a/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/Identity.json.cs b/src/ManagedServiceIdentity/generated/api/Models/Api20230131/Identity.json.cs similarity index 95% rename from src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/Identity.json.cs rename to src/ManagedServiceIdentity/generated/api/Models/Api20230131/Identity.json.cs index b403423b9268..d440ce651400 100644 --- a/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/Identity.json.cs +++ b/src/ManagedServiceIdentity/generated/api/Models/Api20230131/Identity.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.ManagedServiceIdentity.Models.Api20220131Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131 { using static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class Identity partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentity. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IIdentity. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentity. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IIdentity. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentity FromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IIdentity FromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject json ? new Identity(json) : null; } @@ -77,7 +77,7 @@ internal Identity(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runt { return; } - __trackedResource = new Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.TrackedResource(json); + __trackedResource = new Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.TrackedResource(json); {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.UserAssignedIdentityProperties.FromJson(__jsonProperties) : Property;} AfterFromJson(json); } diff --git a/src/ManagedServiceIdentity/generated/api/Models/Api20230131/IdentityUpdate.PowerShell.cs b/src/ManagedServiceIdentity/generated/api/Models/Api20230131/IdentityUpdate.PowerShell.cs new file mode 100644 index 000000000000..019100b7c02d --- /dev/null +++ b/src/ManagedServiceIdentity/generated/api/Models/Api20230131/IdentityUpdate.PowerShell.cs @@ -0,0 +1,286 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131 +{ + using Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.PowerShell; + + /// Describes an identity resource. + [System.ComponentModel.TypeConverter(typeof(IdentityUpdateTypeConverter))] + public partial class IdentityUpdate + { + + /// + /// 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.ManagedServiceIdentity.Models.Api20230131.IIdentityUpdate DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new IdentityUpdate(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.ManagedServiceIdentity.Models.Api20230131.IIdentityUpdate DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new IdentityUpdate(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.ManagedServiceIdentity.Models.Api20230131.IIdentityUpdate FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal IdentityUpdate(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.ManagedServiceIdentity.Models.Api20230131.IIdentityUpdateInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IUserAssignedIdentityProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IIdentityUpdateInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.UserAssignedIdentityPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IIdentityUpdateInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IIdentityUpdateInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IIdentityUpdateInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityUpdateTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IIdentityUpdateInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IdentityUpdateTagsTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("TenantId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IIdentityUpdateInternal)this).TenantId = (string) content.GetValueForProperty("TenantId",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IIdentityUpdateInternal)this).TenantId, global::System.Convert.ToString); + } + if (content.Contains("PrincipalId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IIdentityUpdateInternal)this).PrincipalId = (string) content.GetValueForProperty("PrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IIdentityUpdateInternal)this).PrincipalId, global::System.Convert.ToString); + } + if (content.Contains("ClientId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IIdentityUpdateInternal)this).ClientId = (string) content.GetValueForProperty("ClientId",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IIdentityUpdateInternal)this).ClientId, 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 IdentityUpdate(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.ManagedServiceIdentity.Models.Api20230131.IIdentityUpdateInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IUserAssignedIdentityProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IIdentityUpdateInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.UserAssignedIdentityPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IIdentityUpdateInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IIdentityUpdateInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IIdentityUpdateInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityUpdateTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IIdentityUpdateInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IdentityUpdateTagsTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("TenantId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IIdentityUpdateInternal)this).TenantId = (string) content.GetValueForProperty("TenantId",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IIdentityUpdateInternal)this).TenantId, global::System.Convert.ToString); + } + if (content.Contains("PrincipalId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IIdentityUpdateInternal)this).PrincipalId = (string) content.GetValueForProperty("PrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IIdentityUpdateInternal)this).PrincipalId, global::System.Convert.ToString); + } + if (content.Contains("ClientId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IIdentityUpdateInternal)this).ClientId = (string) content.GetValueForProperty("ClientId",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IIdentityUpdateInternal)this).ClientId, 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.ManagedServiceIdentity.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(); + } + } + /// Describes an identity resource. + [System.ComponentModel.TypeConverter(typeof(IdentityUpdateTypeConverter))] + public partial interface IIdentityUpdate + + { + + } +} \ No newline at end of file diff --git a/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/IdentityUpdate.TypeConverter.cs b/src/ManagedServiceIdentity/generated/api/Models/Api20230131/IdentityUpdate.TypeConverter.cs similarity index 97% rename from src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/IdentityUpdate.TypeConverter.cs rename to src/ManagedServiceIdentity/generated/api/Models/Api20230131/IdentityUpdate.TypeConverter.cs index c603f0fa8d99..2691dc2bf8f0 100644 --- a/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/IdentityUpdate.TypeConverter.cs +++ b/src/ManagedServiceIdentity/generated/api/Models/Api20230131/IdentityUpdate.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.ManagedServiceIdentity.Models.Api20220131Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131 { using Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityUpdate ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IIdentityUpdate ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityUpdate).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IIdentityUpdate).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/ManagedServiceIdentity/generated/api/Models/Api20230131/IdentityUpdate.cs b/src/ManagedServiceIdentity/generated/api/Models/Api20230131/IdentityUpdate.cs new file mode 100644 index 000000000000..2cee64cf7362 --- /dev/null +++ b/src/ManagedServiceIdentity/generated/api/Models/Api20230131/IdentityUpdate.cs @@ -0,0 +1,214 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Extensions; + + /// Describes an identity resource. + public partial class IdentityUpdate : + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IIdentityUpdate, + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IIdentityUpdateInternal, + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.Resource(); + + /// + /// The id of the app associated with the identity. This is a random generated UUID by MSI. + /// + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Inlined)] + public string ClientId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IUserAssignedIdentityPropertiesInternal)Property).ClientId; } + + /// + /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + /// + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)__resource).Id; } + + /// Backing field for property. + private string _location; + + /// The geo-location where the resource lives + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Owned)] + public string Location { get => this._location; set => this._location = value; } + + /// Internal Acessors for ClientId + string Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IIdentityUpdateInternal.ClientId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IUserAssignedIdentityPropertiesInternal)Property).ClientId; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IUserAssignedIdentityPropertiesInternal)Property).ClientId = value; } + + /// Internal Acessors for PrincipalId + string Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IIdentityUpdateInternal.PrincipalId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IUserAssignedIdentityPropertiesInternal)Property).PrincipalId; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IUserAssignedIdentityPropertiesInternal)Property).PrincipalId = value; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IUserAssignedIdentityProperties Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IIdentityUpdateInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.UserAssignedIdentityProperties()); set { {_property = value;} } } + + /// Internal Acessors for TenantId + string Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IIdentityUpdateInternal.TenantId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IUserAssignedIdentityPropertiesInternal)Property).TenantId; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IUserAssignedIdentityPropertiesInternal)Property).TenantId = value; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)__resource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)__resource).Name = value; } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.ISystemData Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)__resource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)__resource).SystemData = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)__resource).Type = value; } + + /// The name of the resource + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)__resource).Name; } + + /// The id of the service principal object associated with the created identity. + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Inlined)] + public string PrincipalId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IUserAssignedIdentityPropertiesInternal)Property).PrincipalId; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IUserAssignedIdentityProperties _property; + + /// The properties associated with the identity. + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IUserAssignedIdentityProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.UserAssignedIdentityProperties()); } + + /// + /// Azure Resource Manager metadata containing createdBy and modifiedBy information. + /// + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)__resource).SystemData; } + + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)__resource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)__resource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Inherited)] + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)__resource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)__resource).SystemDataCreatedBy = value ?? null; } + + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)__resource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)__resource).SystemDataCreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Support.CreatedByType)""); } + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedBy = value ?? null; } + + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Support.CreatedByType)""); } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityUpdateTags _tag; + + /// Resource tags + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityUpdateTags Tag { get => (this._tag = this._tag ?? new Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IdentityUpdateTags()); set => this._tag = value; } + + /// The id of the tenant which the identity belongs to. + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Inlined)] + public string TenantId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IUserAssignedIdentityPropertiesInternal)Property).TenantId; } + + /// + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + /// + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)__resource).Type; } + + /// Creates an new instance. + public IdentityUpdate() + { + + } + + /// 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.ManagedServiceIdentity.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__resource), __resource); + await eventListener.AssertObjectIsValid(nameof(__resource), __resource); + } + } + /// Describes an identity resource. + public partial interface IIdentityUpdate : + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResource + { + /// + /// The id of the app associated with the identity. This is a random generated UUID by MSI. + /// + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The id of the app associated with the identity. This is a random generated UUID by MSI.", + SerializedName = @"clientId", + PossibleTypes = new [] { typeof(string) })] + string ClientId { get; } + /// The geo-location where the resource lives + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The geo-location where the resource lives", + SerializedName = @"location", + PossibleTypes = new [] { typeof(string) })] + string Location { get; set; } + /// The id of the service principal object associated with the created identity. + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The id of the service principal object associated with the created identity.", + SerializedName = @"principalId", + PossibleTypes = new [] { typeof(string) })] + string PrincipalId { get; } + /// Resource tags + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resource tags", + SerializedName = @"tags", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityUpdateTags) })] + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityUpdateTags Tag { get; set; } + /// The id of the tenant which the identity belongs to. + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The id of the tenant which the identity belongs to.", + SerializedName = @"tenantId", + PossibleTypes = new [] { typeof(string) })] + string TenantId { get; } + + } + /// Describes an identity resource. + internal partial interface IIdentityUpdateInternal : + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal + { + /// + /// The id of the app associated with the identity. This is a random generated UUID by MSI. + /// + string ClientId { get; set; } + /// The geo-location where the resource lives + string Location { get; set; } + /// The id of the service principal object associated with the created identity. + string PrincipalId { get; set; } + /// The properties associated with the identity. + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IUserAssignedIdentityProperties Property { get; set; } + /// Resource tags + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityUpdateTags Tag { get; set; } + /// The id of the tenant which the identity belongs to. + string TenantId { get; set; } + + } +} \ No newline at end of file diff --git a/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/IdentityUpdate.json.cs b/src/ManagedServiceIdentity/generated/api/Models/Api20230131/IdentityUpdate.json.cs similarity index 95% rename from src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/IdentityUpdate.json.cs rename to src/ManagedServiceIdentity/generated/api/Models/Api20230131/IdentityUpdate.json.cs index 0a42ab9eda27..1abe6b8fa16a 100644 --- a/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/IdentityUpdate.json.cs +++ b/src/ManagedServiceIdentity/generated/api/Models/Api20230131/IdentityUpdate.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.ManagedServiceIdentity.Models.Api20220131Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131 { using static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class IdentityUpdate partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityUpdate. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IIdentityUpdate. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityUpdate. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IIdentityUpdate. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityUpdate FromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IIdentityUpdate FromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject json ? new IdentityUpdate(json) : null; } @@ -77,7 +77,7 @@ internal IdentityUpdate(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentit { return; } - __resource = new Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.Resource(json); + __resource = new Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.Resource(json); {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.UserAssignedIdentityProperties.FromJson(__jsonProperties) : Property;} {_location = If( json?.PropertyT("location"), out var __jsonLocation) ? (string)__jsonLocation : (string)Location;} {_tag = If( json?.PropertyT("tags"), out var __jsonTags) ? Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IdentityUpdateTags.FromJson(__jsonTags) : Tag;} diff --git a/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/OperationListResult.PowerShell.cs b/src/ManagedServiceIdentity/generated/api/Models/Api20230131/OperationListResult.PowerShell.cs similarity index 75% rename from src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/OperationListResult.PowerShell.cs rename to src/ManagedServiceIdentity/generated/api/Models/Api20230131/OperationListResult.PowerShell.cs index b149cdbbadeb..e1697208444e 100644 --- a/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/OperationListResult.PowerShell.cs +++ b/src/ManagedServiceIdentity/generated/api/Models/Api20230131/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.ManagedServiceIdentity.Models.Api20220131Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131 { using Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.PowerShell; @@ -63,29 +63,29 @@ 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 . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IOperationListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.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 . /// - public static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IOperationListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IOperationListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new OperationListResult(content); } @@ -95,10 +95,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.A /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IOperationListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IOperationListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -113,17 +113,17 @@ internal OperationListResult(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IOperationListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IOperation[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IOperationListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.OperationTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IOperationListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IOperation[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IOperationListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.OperationTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IOperationListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IOperationListResultInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IOperationListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.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. @@ -138,11 +138,11 @@ internal OperationListResult(global::System.Management.Automation.PSObject conte // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IOperationListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IOperation[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IOperationListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.OperationTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IOperationListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IOperation[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IOperationListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.OperationTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IOperationListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IOperationListResultInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IOperationListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IOperationListResultInternal)this).NextLink, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/OperationListResult.TypeConverter.cs b/src/ManagedServiceIdentity/generated/api/Models/Api20230131/OperationListResult.TypeConverter.cs similarity index 97% rename from src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/OperationListResult.TypeConverter.cs rename to src/ManagedServiceIdentity/generated/api/Models/Api20230131/OperationListResult.TypeConverter.cs index fa7e523ab178..da3cfe9b128b 100644 --- a/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/OperationListResult.TypeConverter.cs +++ b/src/ManagedServiceIdentity/generated/api/Models/Api20230131/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.ManagedServiceIdentity.Models.Api20220131Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131 { using Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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.ManagedServiceIdentity.Models.Api20220131Preview.IOperationListResult ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IOperationListResult ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IOperationListResult).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IOperationListResult).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/OperationListResult.cs b/src/ManagedServiceIdentity/generated/api/Models/Api20230131/OperationListResult.cs similarity index 96% rename from src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/OperationListResult.cs rename to src/ManagedServiceIdentity/generated/api/Models/Api20230131/OperationListResult.cs index 68b7648c1260..596637ce13e1 100644 --- a/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/OperationListResult.cs +++ b/src/ManagedServiceIdentity/generated/api/Models/Api20230131/OperationListResult.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.ManagedServiceIdentity.Models.Api20220131Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131 { using static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Extensions; /// A list of operations supported by Microsoft.ManagedIdentity Resource Provider. public partial class OperationListResult : - Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IOperationListResult, - Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IOperationListResultInternal + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IOperationListResult, + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IOperationListResultInternal { /// Backing field for property. diff --git a/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/OperationListResult.json.cs b/src/ManagedServiceIdentity/generated/api/Models/Api20230131/OperationListResult.json.cs similarity index 96% rename from src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/OperationListResult.json.cs rename to src/ManagedServiceIdentity/generated/api/Models/Api20230131/OperationListResult.json.cs index 0aa5cd46a120..1e0310206d4e 100644 --- a/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/OperationListResult.json.cs +++ b/src/ManagedServiceIdentity/generated/api/Models/Api20230131/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.ManagedServiceIdentity.Models.Api20220131Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131 { using static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class OperationListResult partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IOperationListResult. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IOperationListResult. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IOperationListResult. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IOperationListResult. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IOperationListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IOperationListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject json ? new OperationListResult(json) : null; } diff --git a/src/ManagedServiceIdentity/generated/api/Models/Api20230131/SystemAssignedIdentity.PowerShell.cs b/src/ManagedServiceIdentity/generated/api/Models/Api20230131/SystemAssignedIdentity.PowerShell.cs new file mode 100644 index 000000000000..9702fb04a829 --- /dev/null +++ b/src/ManagedServiceIdentity/generated/api/Models/Api20230131/SystemAssignedIdentity.PowerShell.cs @@ -0,0 +1,294 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131 +{ + using Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.PowerShell; + + /// Describes a system assigned identity resource. + [System.ComponentModel.TypeConverter(typeof(SystemAssignedIdentityTypeConverter))] + public partial class SystemAssignedIdentity + { + + /// + /// 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.ManagedServiceIdentity.Models.Api20230131.ISystemAssignedIdentity DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new SystemAssignedIdentity(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.ManagedServiceIdentity.Models.Api20230131.ISystemAssignedIdentity DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new SystemAssignedIdentity(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.ManagedServiceIdentity.Models.Api20230131.ISystemAssignedIdentity FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal SystemAssignedIdentity(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.ManagedServiceIdentity.Models.Api20230131.ISystemAssignedIdentityInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ISystemAssignedIdentityProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ISystemAssignedIdentityInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.SystemAssignedIdentityPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ISystemAssignedIdentityInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ISystemAssignedIdentityInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ISystemAssignedIdentityInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ISystemAssignedIdentityTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ISystemAssignedIdentityInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.SystemAssignedIdentityTagsTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("TenantId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ISystemAssignedIdentityInternal)this).TenantId = (string) content.GetValueForProperty("TenantId",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ISystemAssignedIdentityInternal)this).TenantId, global::System.Convert.ToString); + } + if (content.Contains("PrincipalId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ISystemAssignedIdentityInternal)this).PrincipalId = (string) content.GetValueForProperty("PrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ISystemAssignedIdentityInternal)this).PrincipalId, global::System.Convert.ToString); + } + if (content.Contains("ClientId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ISystemAssignedIdentityInternal)this).ClientId = (string) content.GetValueForProperty("ClientId",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ISystemAssignedIdentityInternal)this).ClientId, global::System.Convert.ToString); + } + if (content.Contains("ClientSecretUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ISystemAssignedIdentityInternal)this).ClientSecretUrl = (string) content.GetValueForProperty("ClientSecretUrl",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ISystemAssignedIdentityInternal)this).ClientSecretUrl, 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 SystemAssignedIdentity(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.ManagedServiceIdentity.Models.Api20230131.ISystemAssignedIdentityInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ISystemAssignedIdentityProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ISystemAssignedIdentityInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.SystemAssignedIdentityPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ISystemAssignedIdentityInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ISystemAssignedIdentityInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ISystemAssignedIdentityInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ISystemAssignedIdentityTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ISystemAssignedIdentityInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.SystemAssignedIdentityTagsTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("TenantId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ISystemAssignedIdentityInternal)this).TenantId = (string) content.GetValueForProperty("TenantId",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ISystemAssignedIdentityInternal)this).TenantId, global::System.Convert.ToString); + } + if (content.Contains("PrincipalId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ISystemAssignedIdentityInternal)this).PrincipalId = (string) content.GetValueForProperty("PrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ISystemAssignedIdentityInternal)this).PrincipalId, global::System.Convert.ToString); + } + if (content.Contains("ClientId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ISystemAssignedIdentityInternal)this).ClientId = (string) content.GetValueForProperty("ClientId",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ISystemAssignedIdentityInternal)this).ClientId, global::System.Convert.ToString); + } + if (content.Contains("ClientSecretUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ISystemAssignedIdentityInternal)this).ClientSecretUrl = (string) content.GetValueForProperty("ClientSecretUrl",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ISystemAssignedIdentityInternal)this).ClientSecretUrl, 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.ManagedServiceIdentity.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(); + } + } + /// Describes a system assigned identity resource. + [System.ComponentModel.TypeConverter(typeof(SystemAssignedIdentityTypeConverter))] + public partial interface ISystemAssignedIdentity + + { + + } +} \ No newline at end of file diff --git a/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/SystemAssignedIdentity.TypeConverter.cs b/src/ManagedServiceIdentity/generated/api/Models/Api20230131/SystemAssignedIdentity.TypeConverter.cs similarity index 97% rename from src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/SystemAssignedIdentity.TypeConverter.cs rename to src/ManagedServiceIdentity/generated/api/Models/Api20230131/SystemAssignedIdentity.TypeConverter.cs index 83bfd7a20d00..8054bf254818 100644 --- a/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/SystemAssignedIdentity.TypeConverter.cs +++ b/src/ManagedServiceIdentity/generated/api/Models/Api20230131/SystemAssignedIdentity.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.ManagedServiceIdentity.Models.Api20220131Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131 { using Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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.ManagedServiceIdentity.Models.Api20220131Preview.ISystemAssignedIdentity ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ISystemAssignedIdentity ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ISystemAssignedIdentity).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ISystemAssignedIdentity).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/ManagedServiceIdentity/generated/api/Models/Api20230131/SystemAssignedIdentity.cs b/src/ManagedServiceIdentity/generated/api/Models/Api20230131/SystemAssignedIdentity.cs new file mode 100644 index 000000000000..b0e9d7140dd9 --- /dev/null +++ b/src/ManagedServiceIdentity/generated/api/Models/Api20230131/SystemAssignedIdentity.cs @@ -0,0 +1,241 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Extensions; + + /// Describes a system assigned identity resource. + public partial class SystemAssignedIdentity : + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ISystemAssignedIdentity, + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ISystemAssignedIdentityInternal, + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.Resource(); + + /// + /// The id of the app associated with the identity. This is a random generated UUID by MSI. + /// + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Inlined)] + public string ClientId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ISystemAssignedIdentityPropertiesInternal)Property).ClientId; } + + /// + /// The ManagedServiceIdentity DataPlane URL that can be queried to obtain the identity credentials. + /// + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Inlined)] + public string ClientSecretUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ISystemAssignedIdentityPropertiesInternal)Property).ClientSecretUrl; } + + /// + /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + /// + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)__resource).Id; } + + /// Backing field for property. + private string _location; + + /// The geo-location where the resource lives + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Owned)] + public string Location { get => this._location; set => this._location = value; } + + /// Internal Acessors for ClientId + string Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ISystemAssignedIdentityInternal.ClientId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ISystemAssignedIdentityPropertiesInternal)Property).ClientId; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ISystemAssignedIdentityPropertiesInternal)Property).ClientId = value; } + + /// Internal Acessors for ClientSecretUrl + string Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ISystemAssignedIdentityInternal.ClientSecretUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ISystemAssignedIdentityPropertiesInternal)Property).ClientSecretUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ISystemAssignedIdentityPropertiesInternal)Property).ClientSecretUrl = value; } + + /// Internal Acessors for PrincipalId + string Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ISystemAssignedIdentityInternal.PrincipalId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ISystemAssignedIdentityPropertiesInternal)Property).PrincipalId; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ISystemAssignedIdentityPropertiesInternal)Property).PrincipalId = value; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ISystemAssignedIdentityProperties Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ISystemAssignedIdentityInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.SystemAssignedIdentityProperties()); set { {_property = value;} } } + + /// Internal Acessors for TenantId + string Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ISystemAssignedIdentityInternal.TenantId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ISystemAssignedIdentityPropertiesInternal)Property).TenantId; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ISystemAssignedIdentityPropertiesInternal)Property).TenantId = value; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)__resource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)__resource).Name = value; } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.ISystemData Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)__resource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)__resource).SystemData = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)__resource).Type = value; } + + /// The name of the resource + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)__resource).Name; } + + /// The id of the service principal object associated with the created identity. + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Inlined)] + public string PrincipalId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ISystemAssignedIdentityPropertiesInternal)Property).PrincipalId; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ISystemAssignedIdentityProperties _property; + + /// The properties associated with the identity. + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ISystemAssignedIdentityProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.SystemAssignedIdentityProperties()); } + + /// Gets the resource group name + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)__resource).SystemData; } + + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)__resource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)__resource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Inherited)] + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)__resource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)__resource).SystemDataCreatedBy = value ?? null; } + + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)__resource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)__resource).SystemDataCreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Support.CreatedByType)""); } + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedBy = value ?? null; } + + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Support.CreatedByType)""); } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ISystemAssignedIdentityTags _tag; + + /// Resource tags + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ISystemAssignedIdentityTags Tag { get => (this._tag = this._tag ?? new Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.SystemAssignedIdentityTags()); set => this._tag = value; } + + /// The id of the tenant which the identity belongs to. + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Inlined)] + public string TenantId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ISystemAssignedIdentityPropertiesInternal)Property).TenantId; } + + /// + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + /// + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)__resource).Type; } + + /// Creates an new instance. + public SystemAssignedIdentity() + { + + } + + /// 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.ManagedServiceIdentity.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__resource), __resource); + await eventListener.AssertObjectIsValid(nameof(__resource), __resource); + } + } + /// Describes a system assigned identity resource. + public partial interface ISystemAssignedIdentity : + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResource + { + /// + /// The id of the app associated with the identity. This is a random generated UUID by MSI. + /// + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The id of the app associated with the identity. This is a random generated UUID by MSI.", + SerializedName = @"clientId", + PossibleTypes = new [] { typeof(string) })] + string ClientId { get; } + /// + /// The ManagedServiceIdentity DataPlane URL that can be queried to obtain the identity credentials. + /// + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @" The ManagedServiceIdentity DataPlane URL that can be queried to obtain the identity credentials.", + SerializedName = @"clientSecretUrl", + PossibleTypes = new [] { typeof(string) })] + string ClientSecretUrl { get; } + /// The geo-location where the resource lives + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The geo-location where the resource lives", + SerializedName = @"location", + PossibleTypes = new [] { typeof(string) })] + string Location { get; set; } + /// The id of the service principal object associated with the created identity. + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The id of the service principal object associated with the created identity.", + SerializedName = @"principalId", + PossibleTypes = new [] { typeof(string) })] + string PrincipalId { get; } + /// Resource tags + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resource tags", + SerializedName = @"tags", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ISystemAssignedIdentityTags) })] + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ISystemAssignedIdentityTags Tag { get; set; } + /// The id of the tenant which the identity belongs to. + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The id of the tenant which the identity belongs to.", + SerializedName = @"tenantId", + PossibleTypes = new [] { typeof(string) })] + string TenantId { get; } + + } + /// Describes a system assigned identity resource. + internal partial interface ISystemAssignedIdentityInternal : + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal + { + /// + /// The id of the app associated with the identity. This is a random generated UUID by MSI. + /// + string ClientId { get; set; } + /// + /// The ManagedServiceIdentity DataPlane URL that can be queried to obtain the identity credentials. + /// + string ClientSecretUrl { get; set; } + /// The geo-location where the resource lives + string Location { get; set; } + /// The id of the service principal object associated with the created identity. + string PrincipalId { get; set; } + /// The properties associated with the identity. + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ISystemAssignedIdentityProperties Property { get; set; } + /// Resource tags + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ISystemAssignedIdentityTags Tag { get; set; } + /// The id of the tenant which the identity belongs to. + string TenantId { get; set; } + + } +} \ No newline at end of file diff --git a/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/SystemAssignedIdentity.json.cs b/src/ManagedServiceIdentity/generated/api/Models/Api20230131/SystemAssignedIdentity.json.cs similarity index 95% rename from src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/SystemAssignedIdentity.json.cs rename to src/ManagedServiceIdentity/generated/api/Models/Api20230131/SystemAssignedIdentity.json.cs index 8566b1592aae..ab3f0ac880af 100644 --- a/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/SystemAssignedIdentity.json.cs +++ b/src/ManagedServiceIdentity/generated/api/Models/Api20230131/SystemAssignedIdentity.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.ManagedServiceIdentity.Models.Api20220131Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131 { using static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class SystemAssignedIdentity partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ISystemAssignedIdentity. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ISystemAssignedIdentity. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ISystemAssignedIdentity. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ISystemAssignedIdentity. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ISystemAssignedIdentity FromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ISystemAssignedIdentity FromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject json ? new SystemAssignedIdentity(json) : null; } @@ -77,7 +77,7 @@ internal SystemAssignedIdentity(Microsoft.Azure.PowerShell.Cmdlets.ManagedServic { return; } - __resource = new Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.Resource(json); + __resource = new Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.Resource(json); {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.SystemAssignedIdentityProperties.FromJson(__jsonProperties) : Property;} {_location = If( json?.PropertyT("location"), out var __jsonLocation) ? (string)__jsonLocation : (string)Location;} {_tag = If( json?.PropertyT("tags"), out var __jsonTags) ? Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.SystemAssignedIdentityTags.FromJson(__jsonTags) : Tag;} diff --git a/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/UserAssignedIdentitiesListResult.PowerShell.cs b/src/ManagedServiceIdentity/generated/api/Models/Api20230131/UserAssignedIdentitiesListResult.PowerShell.cs similarity index 73% rename from src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/UserAssignedIdentitiesListResult.PowerShell.cs rename to src/ManagedServiceIdentity/generated/api/Models/Api20230131/UserAssignedIdentitiesListResult.PowerShell.cs index 55108ac96315..7f2316a0dfb4 100644 --- a/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/UserAssignedIdentitiesListResult.PowerShell.cs +++ b/src/ManagedServiceIdentity/generated/api/Models/Api20230131/UserAssignedIdentitiesListResult.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.ManagedServiceIdentity.Models.Api20220131Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131 { using Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.PowerShell; @@ -63,29 +63,29 @@ public partial class UserAssignedIdentitiesListResult 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.ManagedServiceIdentity.Models.Api20220131Preview.IUserAssignedIdentitiesListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IUserAssignedIdentitiesListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new UserAssignedIdentitiesListResult(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.ManagedServiceIdentity.Models.Api20220131Preview.IUserAssignedIdentitiesListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IUserAssignedIdentitiesListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new UserAssignedIdentitiesListResult(content); } @@ -95,7 +95,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.A /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IUserAssignedIdentitiesListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IUserAssignedIdentitiesListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. @@ -115,7 +115,7 @@ public override string ToString() } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -130,17 +130,17 @@ internal UserAssignedIdentitiesListResult(global::System.Collections.IDictionary // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IUserAssignedIdentitiesListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentity[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IUserAssignedIdentitiesListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IdentityTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IUserAssignedIdentitiesListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IIdentity[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IUserAssignedIdentitiesListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IdentityTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IUserAssignedIdentitiesListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IUserAssignedIdentitiesListResultInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IUserAssignedIdentitiesListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IUserAssignedIdentitiesListResultInternal)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. @@ -155,11 +155,11 @@ internal UserAssignedIdentitiesListResult(global::System.Management.Automation.P // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IUserAssignedIdentitiesListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentity[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IUserAssignedIdentitiesListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IdentityTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IUserAssignedIdentitiesListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IIdentity[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IUserAssignedIdentitiesListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IdentityTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IUserAssignedIdentitiesListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IUserAssignedIdentitiesListResultInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IUserAssignedIdentitiesListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IUserAssignedIdentitiesListResultInternal)this).NextLink, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/UserAssignedIdentitiesListResult.TypeConverter.cs b/src/ManagedServiceIdentity/generated/api/Models/Api20230131/UserAssignedIdentitiesListResult.TypeConverter.cs similarity index 96% rename from src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/UserAssignedIdentitiesListResult.TypeConverter.cs rename to src/ManagedServiceIdentity/generated/api/Models/Api20230131/UserAssignedIdentitiesListResult.TypeConverter.cs index 6c7d0c055021..c89da3d474d7 100644 --- a/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/UserAssignedIdentitiesListResult.TypeConverter.cs +++ b/src/ManagedServiceIdentity/generated/api/Models/Api20230131/UserAssignedIdentitiesListResult.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.ManagedServiceIdentity.Models.Api20220131Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131 { using Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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.ManagedServiceIdentity.Models.Api20220131Preview.IUserAssignedIdentitiesListResult ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IUserAssignedIdentitiesListResult ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IUserAssignedIdentitiesListResult).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IUserAssignedIdentitiesListResult).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/UserAssignedIdentitiesListResult.cs b/src/ManagedServiceIdentity/generated/api/Models/Api20230131/UserAssignedIdentitiesListResult.cs similarity index 86% rename from src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/UserAssignedIdentitiesListResult.cs rename to src/ManagedServiceIdentity/generated/api/Models/Api20230131/UserAssignedIdentitiesListResult.cs index 608c1830f486..8bedfddebcf7 100644 --- a/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/UserAssignedIdentitiesListResult.cs +++ b/src/ManagedServiceIdentity/generated/api/Models/Api20230131/UserAssignedIdentitiesListResult.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.ManagedServiceIdentity.Models.Api20220131Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131 { using static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Extensions; /// Values returned by the List operation. public partial class UserAssignedIdentitiesListResult : - Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IUserAssignedIdentitiesListResult, - Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IUserAssignedIdentitiesListResultInternal + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IUserAssignedIdentitiesListResult, + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IUserAssignedIdentitiesListResultInternal { /// Backing field for property. @@ -21,11 +21,11 @@ public partial class UserAssignedIdentitiesListResult : public string NextLink { get => this._nextLink; set => this._nextLink = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentity[] _value; + private Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IIdentity[] _value; /// The collection of userAssignedIdentities returned by the listing operation. [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentity[] Value { get => this._value; set => this._value = value; } + public Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IIdentity[] Value { get => this._value; set => this._value = value; } /// Creates an new instance. public UserAssignedIdentitiesListResult() @@ -51,8 +51,8 @@ public partial interface IUserAssignedIdentitiesListResult : ReadOnly = false, Description = @"The collection of userAssignedIdentities returned by the listing operation.", SerializedName = @"value", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentity) })] - Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentity[] Value { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IIdentity) })] + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IIdentity[] Value { get; set; } } /// Values returned by the List operation. @@ -62,7 +62,7 @@ internal partial interface IUserAssignedIdentitiesListResultInternal /// The url to get the next page of results, if any. string NextLink { get; set; } /// The collection of userAssignedIdentities returned by the listing operation. - Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentity[] Value { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IIdentity[] Value { get; set; } } } \ No newline at end of file diff --git a/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/UserAssignedIdentitiesListResult.json.cs b/src/ManagedServiceIdentity/generated/api/Models/Api20230131/UserAssignedIdentitiesListResult.json.cs similarity index 91% rename from src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/UserAssignedIdentitiesListResult.json.cs rename to src/ManagedServiceIdentity/generated/api/Models/Api20230131/UserAssignedIdentitiesListResult.json.cs index c08b8c3ad44c..072200f40b2a 100644 --- a/src/ManagedServiceIdentity/generated/api/Models/Api20220131Preview/UserAssignedIdentitiesListResult.json.cs +++ b/src/ManagedServiceIdentity/generated/api/Models/Api20230131/UserAssignedIdentitiesListResult.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.ManagedServiceIdentity.Models.Api20220131Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131 { using static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class UserAssignedIdentitiesListResult partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IUserAssignedIdentitiesListResult. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IUserAssignedIdentitiesListResult. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IUserAssignedIdentitiesListResult. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IUserAssignedIdentitiesListResult. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IUserAssignedIdentitiesListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IUserAssignedIdentitiesListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject json ? new UserAssignedIdentitiesListResult(json) : null; } @@ -110,7 +110,7 @@ internal UserAssignedIdentitiesListResult(Microsoft.Azure.PowerShell.Cmdlets.Man { return; } - {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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.ManagedServiceIdentity.Models.Api20220131Preview.IIdentity) (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.Identity.FromJson(__u) )) ))() : null : Value;} + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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.ManagedServiceIdentity.Models.Api20230131.IIdentity) (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.Identity.FromJson(__u) )) ))() : null : Value;} {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} AfterFromJson(json); } diff --git a/src/ManagedServiceIdentity/generated/api/Models/Api40/ProxyResourceAutoGenerated.PowerShell.cs b/src/ManagedServiceIdentity/generated/api/Models/Api40/ProxyResourceAutoGenerated.PowerShell.cs new file mode 100644 index 000000000000..41cf2d3259ff --- /dev/null +++ b/src/ManagedServiceIdentity/generated/api/Models/Api40/ProxyResourceAutoGenerated.PowerShell.cs @@ -0,0 +1,240 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40 +{ + using Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.PowerShell; + + /// + /// The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location + /// + [System.ComponentModel.TypeConverter(typeof(ProxyResourceAutoGeneratedTypeConverter))] + public partial class ProxyResourceAutoGenerated + { + + /// + /// 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.ManagedServiceIdentity.Models.Api40.IProxyResourceAutoGenerated DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ProxyResourceAutoGenerated(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.ManagedServiceIdentity.Models.Api40.IProxyResourceAutoGenerated DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ProxyResourceAutoGenerated(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.ManagedServiceIdentity.Models.Api40.IProxyResourceAutoGenerated FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ProxyResourceAutoGenerated(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).Type, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ProxyResourceAutoGenerated(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).Type, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location + [System.ComponentModel.TypeConverter(typeof(ProxyResourceAutoGeneratedTypeConverter))] + public partial interface IProxyResourceAutoGenerated + + { + + } +} \ No newline at end of file diff --git a/src/ManagedServiceIdentity/generated/api/Models/Api40/ProxyResourceAutoGenerated.TypeConverter.cs b/src/ManagedServiceIdentity/generated/api/Models/Api40/ProxyResourceAutoGenerated.TypeConverter.cs new file mode 100644 index 000000000000..558d3181555a --- /dev/null +++ b/src/ManagedServiceIdentity/generated/api/Models/Api40/ProxyResourceAutoGenerated.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40 +{ + using Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ProxyResourceAutoGeneratedTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IProxyResourceAutoGenerated ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IProxyResourceAutoGenerated).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ProxyResourceAutoGenerated.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ProxyResourceAutoGenerated.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ProxyResourceAutoGenerated.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/ManagedServiceIdentity/generated/api/Models/Api40/ProxyResourceAutoGenerated.cs b/src/ManagedServiceIdentity/generated/api/Models/Api40/ProxyResourceAutoGenerated.cs new file mode 100644 index 000000000000..b284b8ae4839 --- /dev/null +++ b/src/ManagedServiceIdentity/generated/api/Models/Api40/ProxyResourceAutoGenerated.cs @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Extensions; + + /// + /// The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location + /// + public partial class ProxyResourceAutoGenerated : + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IProxyResourceAutoGenerated, + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IProxyResourceAutoGeneratedInternal, + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.Resource(); + + /// + /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + /// + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)__resource).Id; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)__resource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)__resource).Name = value; } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.ISystemData Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)__resource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)__resource).SystemData = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)__resource).Type = value; } + + /// The name of the resource + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)__resource).Name; } + + /// + /// Azure Resource Manager metadata containing createdBy and modifiedBy information. + /// + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)__resource).SystemData; } + + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)__resource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)__resource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Inherited)] + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)__resource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)__resource).SystemDataCreatedBy = value ?? null; } + + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)__resource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)__resource).SystemDataCreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Support.CreatedByType)""); } + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedBy = value ?? null; } + + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Support.CreatedByType)""); } + + /// + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + /// + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)__resource).Type; } + + /// Creates an new instance. + public ProxyResourceAutoGenerated() + { + + } + + /// 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.ManagedServiceIdentity.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 IProxyResourceAutoGenerated : + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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 IProxyResourceAutoGeneratedInternal : + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal + { + + } +} \ No newline at end of file diff --git a/src/ManagedServiceIdentity/generated/api/Models/Api40/ProxyResourceAutoGenerated.json.cs b/src/ManagedServiceIdentity/generated/api/Models/Api40/ProxyResourceAutoGenerated.json.cs new file mode 100644 index 000000000000..fe20397afa8a --- /dev/null +++ b/src/ManagedServiceIdentity/generated/api/Models/Api40/ProxyResourceAutoGenerated.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Extensions; + + /// + /// The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location + /// + public partial class ProxyResourceAutoGenerated + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IProxyResourceAutoGenerated. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IProxyResourceAutoGenerated. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IProxyResourceAutoGenerated FromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject json ? new ProxyResourceAutoGenerated(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject instance to deserialize from. + internal ProxyResourceAutoGenerated(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __resource = new Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.Resource(json); + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __resource?.ToJson(container, serializationMode); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/ManagedServiceIdentity/generated/api/Models/Api40/Resource.PowerShell.cs b/src/ManagedServiceIdentity/generated/api/Models/Api40/Resource.PowerShell.cs new file mode 100644 index 000000000000..89207ef88c53 --- /dev/null +++ b/src/ManagedServiceIdentity/generated/api/Models/Api40/Resource.PowerShell.cs @@ -0,0 +1,238 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40 +{ + using Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.PowerShell; + + /// + /// Common fields that are returned in the response for all Azure Resource Manager resources + /// + [System.ComponentModel.TypeConverter(typeof(ResourceTypeConverter))] + public partial class Resource + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResource DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new Resource(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new Resource(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal Resource(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal Resource(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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)); + } + 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.ManagedServiceIdentity.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Common fields that are returned in the response for all Azure Resource Manager resources + [System.ComponentModel.TypeConverter(typeof(ResourceTypeConverter))] + public partial interface IResource + + { + + } +} \ No newline at end of file diff --git a/src/ManagedServiceIdentity/generated/api/Models/Api10/Resource.TypeConverter.cs b/src/ManagedServiceIdentity/generated/api/Models/Api40/Resource.TypeConverter.cs similarity index 98% rename from src/ManagedServiceIdentity/generated/api/Models/Api10/Resource.TypeConverter.cs rename to src/ManagedServiceIdentity/generated/api/Models/Api40/Resource.TypeConverter.cs index fe9936e26287..c0a679c1850d 100644 --- a/src/ManagedServiceIdentity/generated/api/Models/Api10/Resource.TypeConverter.cs +++ b/src/ManagedServiceIdentity/generated/api/Models/Api40/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.ManagedServiceIdentity.Models.Api10 +namespace Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40 { using Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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.ManagedServiceIdentity.Models.Api10.IResource ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResource ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResource).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResource).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/ManagedServiceIdentity/generated/api/Models/Api40/Resource.cs b/src/ManagedServiceIdentity/generated/api/Models/Api40/Resource.cs new file mode 100644 index 000000000000..dc4c499a4268 --- /dev/null +++ b/src/ManagedServiceIdentity/generated/api/Models/Api40/Resource.cs @@ -0,0 +1,208 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Extensions; + + /// + /// Common fields that are returned in the response for all Azure Resource Manager resources + /// + public partial class Resource : + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResource, + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal + { + + /// Backing field for property. + private string _id; + + /// + /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + /// + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Owned)] + public string Id { get => this._id; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal.Id { get => this._id; set { {_id = value;} } } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal.Name { get => this._name; set { {_name = value;} } } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.ISystemData Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal.SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.SystemData()); set { {_systemData = value;} } } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal.Type { get => this._type; set { {_type = value;} } } + + /// Backing field for property. + private string _name; + + /// The name of the resource + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Owned)] + public string Name { get => this._name; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.ISystemData _systemData; + + /// + /// Azure Resource Manager metadata containing createdBy and modifiedBy information. + /// + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.ISystemData SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.SystemData()); } + + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Inlined)] + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.ISystemDataInternal)SystemData).CreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.ISystemDataInternal)SystemData).CreatedAt = value ?? default(global::System.DateTime); } + + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Inlined)] + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.ISystemDataInternal)SystemData).CreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.ISystemDataInternal)SystemData).CreatedBy = value ?? null; } + + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.ISystemDataInternal)SystemData).CreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.ISystemDataInternal)SystemData).CreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Support.CreatedByType)""); } + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Inlined)] + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.ISystemDataInternal)SystemData).LastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.ISystemDataInternal)SystemData).LastModifiedAt = value ?? default(global::System.DateTime); } + + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Inlined)] + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.ISystemDataInternal)SystemData).LastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.ISystemDataInternal)SystemData).LastModifiedBy = value ?? null; } + + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.ISystemDataInternal)SystemData).LastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.ISystemDataInternal)SystemData).LastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Support.CreatedByType)""); } + + /// Backing field for property. + private string _type; + + /// + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + /// + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Owned)] + public string Type { get => this._type; } + + /// Creates an new instance. + public Resource() + { + + } + } + /// Common fields that are returned in the response for all Azure Resource Manager resources + public partial interface IResource : + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.IJsonSerializable + { + /// + /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + /// + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Fully qualified resource ID for the resource. E.g. ""/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}""", + SerializedName = @"id", + PossibleTypes = new [] { typeof(string) })] + string Id { get; } + /// The name of the resource + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The name of the resource", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + string Name { get; } + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The timestamp of resource creation (UTC).", + SerializedName = @"createdAt", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? SystemDataCreatedAt { get; set; } + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The identity that created the resource.", + SerializedName = @"createdBy", + PossibleTypes = new [] { typeof(string) })] + string SystemDataCreatedBy { get; set; } + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The type of identity that created the resource.", + SerializedName = @"createdByType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Support.CreatedByType) })] + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Support.CreatedByType? SystemDataCreatedByType { get; set; } + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The timestamp of resource last modification (UTC)", + SerializedName = @"lastModifiedAt", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? SystemDataLastModifiedAt { get; set; } + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The identity that last modified the resource.", + SerializedName = @"lastModifiedBy", + PossibleTypes = new [] { typeof(string) })] + string SystemDataLastModifiedBy { get; set; } + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The type of identity that last modified the resource.", + SerializedName = @"lastModifiedByType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Support.CreatedByType) })] + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Support.CreatedByType? SystemDataLastModifiedByType { get; set; } + /// + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + /// + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The type of the resource. E.g. ""Microsoft.Compute/virtualMachines"" or ""Microsoft.Storage/storageAccounts""", + SerializedName = @"type", + PossibleTypes = new [] { typeof(string) })] + string Type { get; } + + } + /// Common fields that are returned in the response for all Azure Resource Manager resources + internal partial interface IResourceInternal + + { + /// + /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + /// + string Id { get; set; } + /// The name of the resource + string Name { get; set; } + /// + /// Azure Resource Manager metadata containing createdBy and modifiedBy information. + /// + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.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.ManagedServiceIdentity.Support.CreatedByType? SystemDataCreatedByType { get; set; } + /// The timestamp of resource last modification (UTC) + global::System.DateTime? SystemDataLastModifiedAt { get; set; } + /// The identity that last modified the resource. + string SystemDataLastModifiedBy { get; set; } + /// The type of identity that last modified the resource. + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Support.CreatedByType? SystemDataLastModifiedByType { get; set; } + /// + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + /// + string Type { get; set; } + + } +} \ No newline at end of file diff --git a/src/ManagedServiceIdentity/generated/api/Models/Api10/Resource.json.cs b/src/ManagedServiceIdentity/generated/api/Models/Api40/Resource.json.cs similarity index 91% rename from src/ManagedServiceIdentity/generated/api/Models/Api10/Resource.json.cs rename to src/ManagedServiceIdentity/generated/api/Models/Api40/Resource.json.cs index 427e2e43c0c7..27db703842fd 100644 --- a/src/ManagedServiceIdentity/generated/api/Models/Api10/Resource.json.cs +++ b/src/ManagedServiceIdentity/generated/api/Models/Api40/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.ManagedServiceIdentity.Models.Api10 +namespace Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40 { using static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Extensions; @@ -56,13 +56,13 @@ public partial class Resource partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResource. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResource. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResource. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResource. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.IResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject json ? new Resource(json) : null; } @@ -79,6 +79,7 @@ internal Resource(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runt { return; } + {_systemData = If( json?.PropertyT("systemData"), out var __jsonSystemData) ? Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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;} @@ -105,6 +106,10 @@ public Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.Js return container; } if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._systemData ? (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode) this._systemData.ToJson(null,serializationMode) : null, "systemData" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.SerializationMode.IncludeReadOnly)) { AddIf( null != (((object)this._id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonString(this._id.ToString()) : null, "id" ,container.Add ); } diff --git a/src/ManagedServiceIdentity/generated/api/Models/Api40/SystemData.PowerShell.cs b/src/ManagedServiceIdentity/generated/api/Models/Api40/SystemData.PowerShell.cs new file mode 100644 index 000000000000..22ab1a72b829 --- /dev/null +++ b/src/ManagedServiceIdentity/generated/api/Models/Api40/SystemData.PowerShell.cs @@ -0,0 +1,204 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40 +{ + using Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.PowerShell; + + /// Metadata pertaining to creation and last modification of the resource. + [System.ComponentModel.TypeConverter(typeof(SystemDataTypeConverter))] + public partial class SystemData + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.ISystemData DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new SystemData(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.ISystemData DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new SystemData(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.ISystemData FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal SystemData(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("CreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.ISystemDataInternal)this).CreatedBy = (string) content.GetValueForProperty("CreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.ISystemDataInternal)this).CreatedBy, global::System.Convert.ToString); + } + if (content.Contains("CreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.ISystemDataInternal)this).CreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Support.CreatedByType?) content.GetValueForProperty("CreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.ISystemDataInternal)this).CreatedByType, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Support.CreatedByType.CreateFrom); + } + if (content.Contains("CreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.ISystemDataInternal)this).CreatedAt = (global::System.DateTime?) content.GetValueForProperty("CreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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)); + } + if (content.Contains("LastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.ISystemDataInternal)this).LastModifiedBy = (string) content.GetValueForProperty("LastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.ISystemDataInternal)this).LastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("LastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.ISystemDataInternal)this).LastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Support.CreatedByType?) content.GetValueForProperty("LastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.ISystemDataInternal)this).LastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Support.CreatedByType.CreateFrom); + } + if (content.Contains("LastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.ISystemDataInternal)this).LastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("LastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal SystemData(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("CreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.ISystemDataInternal)this).CreatedBy = (string) content.GetValueForProperty("CreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.ISystemDataInternal)this).CreatedBy, global::System.Convert.ToString); + } + if (content.Contains("CreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.ISystemDataInternal)this).CreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Support.CreatedByType?) content.GetValueForProperty("CreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.ISystemDataInternal)this).CreatedByType, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Support.CreatedByType.CreateFrom); + } + if (content.Contains("CreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.ISystemDataInternal)this).CreatedAt = (global::System.DateTime?) content.GetValueForProperty("CreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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)); + } + if (content.Contains("LastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.ISystemDataInternal)this).LastModifiedBy = (string) content.GetValueForProperty("LastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.ISystemDataInternal)this).LastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("LastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.ISystemDataInternal)this).LastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Support.CreatedByType?) content.GetValueForProperty("LastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.ISystemDataInternal)this).LastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Support.CreatedByType.CreateFrom); + } + if (content.Contains("LastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.ISystemDataInternal)this).LastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("LastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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)); + } + 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.ManagedServiceIdentity.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Metadata pertaining to creation and last modification of the resource. + [System.ComponentModel.TypeConverter(typeof(SystemDataTypeConverter))] + public partial interface ISystemData + + { + + } +} \ No newline at end of file diff --git a/src/ManagedServiceIdentity/generated/api/Models/Api40/SystemData.TypeConverter.cs b/src/ManagedServiceIdentity/generated/api/Models/Api40/SystemData.TypeConverter.cs new file mode 100644 index 000000000000..1250e19fa2a3 --- /dev/null +++ b/src/ManagedServiceIdentity/generated/api/Models/Api40/SystemData.TypeConverter.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40 +{ + using Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class SystemDataTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.ISystemData ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.ISystemData).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return SystemData.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return SystemData.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return SystemData.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/ManagedServiceIdentity/generated/api/Models/Api40/SystemData.cs b/src/ManagedServiceIdentity/generated/api/Models/Api40/SystemData.cs new file mode 100644 index 000000000000..0256f3ea605b --- /dev/null +++ b/src/ManagedServiceIdentity/generated/api/Models/Api40/SystemData.cs @@ -0,0 +1,136 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Extensions; + + /// Metadata pertaining to creation and last modification of the resource. + public partial class SystemData : + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.ISystemData, + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.ISystemDataInternal + { + + /// Backing field for property. + private global::System.DateTime? _createdAt; + + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Owned)] + public global::System.DateTime? CreatedAt { get => this._createdAt; set => this._createdAt = value; } + + /// Backing field for property. + private string _createdBy; + + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Owned)] + public string CreatedBy { get => this._createdBy; set => this._createdBy = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Support.CreatedByType? _createdByType; + + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Support.CreatedByType? CreatedByType { get => this._createdByType; set => this._createdByType = value; } + + /// Backing field for property. + private global::System.DateTime? _lastModifiedAt; + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Owned)] + public global::System.DateTime? LastModifiedAt { get => this._lastModifiedAt; set => this._lastModifiedAt = value; } + + /// Backing field for property. + private string _lastModifiedBy; + + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Owned)] + public string LastModifiedBy { get => this._lastModifiedBy; set => this._lastModifiedBy = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Support.CreatedByType? _lastModifiedByType; + + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Support.CreatedByType? LastModifiedByType { get => this._lastModifiedByType; set => this._lastModifiedByType = value; } + + /// Creates an new instance. + public SystemData() + { + + } + } + /// Metadata pertaining to creation and last modification of the resource. + public partial interface ISystemData : + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.IJsonSerializable + { + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The timestamp of resource creation (UTC).", + SerializedName = @"createdAt", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? CreatedAt { get; set; } + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The identity that created the resource.", + SerializedName = @"createdBy", + PossibleTypes = new [] { typeof(string) })] + string CreatedBy { get; set; } + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The type of identity that created the resource.", + SerializedName = @"createdByType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Support.CreatedByType) })] + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Support.CreatedByType? CreatedByType { get; set; } + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The timestamp of resource last modification (UTC)", + SerializedName = @"lastModifiedAt", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? LastModifiedAt { get; set; } + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The identity that last modified the resource.", + SerializedName = @"lastModifiedBy", + PossibleTypes = new [] { typeof(string) })] + string LastModifiedBy { get; set; } + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The type of identity that last modified the resource.", + SerializedName = @"lastModifiedByType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Support.CreatedByType) })] + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Support.CreatedByType? LastModifiedByType { get; set; } + + } + /// Metadata pertaining to creation and last modification of the resource. + internal partial interface ISystemDataInternal + + { + /// The timestamp of resource creation (UTC). + global::System.DateTime? CreatedAt { get; set; } + /// The identity that created the resource. + string CreatedBy { get; set; } + /// The type of identity that created the resource. + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Support.CreatedByType? CreatedByType { get; set; } + /// The timestamp of resource last modification (UTC) + global::System.DateTime? LastModifiedAt { get; set; } + /// The identity that last modified the resource. + string LastModifiedBy { get; set; } + /// The type of identity that last modified the resource. + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Support.CreatedByType? LastModifiedByType { get; set; } + + } +} \ No newline at end of file diff --git a/src/ManagedServiceIdentity/generated/api/Models/Api40/SystemData.json.cs b/src/ManagedServiceIdentity/generated/api/Models/Api40/SystemData.json.cs new file mode 100644 index 000000000000..1085b2827533 --- /dev/null +++ b/src/ManagedServiceIdentity/generated/api/Models/Api40/SystemData.json.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Extensions; + + /// Metadata pertaining to creation and last modification of the resource. + public partial class SystemData + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.ISystemData. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.ISystemData. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.ISystemData FromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject json ? new SystemData(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject instance to deserialize from. + internal SystemData(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_createdBy = If( json?.PropertyT("createdBy"), out var __jsonCreatedBy) ? (string)__jsonCreatedBy : (string)CreatedBy;} + {_createdByType = If( json?.PropertyT("createdByType"), out var __jsonCreatedByType) ? (string)__jsonCreatedByType : (string)CreatedByType;} + {_createdAt = If( json?.PropertyT("createdAt"), out var __jsonCreatedAt) ? global::System.DateTime.TryParse((string)__jsonCreatedAt, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonCreatedAtValue) ? __jsonCreatedAtValue : CreatedAt : CreatedAt;} + {_lastModifiedBy = If( json?.PropertyT("lastModifiedBy"), out var __jsonLastModifiedBy) ? (string)__jsonLastModifiedBy : (string)LastModifiedBy;} + {_lastModifiedByType = If( json?.PropertyT("lastModifiedByType"), out var __jsonLastModifiedByType) ? (string)__jsonLastModifiedByType : (string)LastModifiedByType;} + {_lastModifiedAt = If( json?.PropertyT("lastModifiedAt"), out var __jsonLastModifiedAt) ? global::System.DateTime.TryParse((string)__jsonLastModifiedAt, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonLastModifiedAtValue) ? __jsonLastModifiedAtValue : LastModifiedAt : LastModifiedAt;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._createdBy)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonString(this._createdBy.ToString()) : null, "createdBy" ,container.Add ); + AddIf( null != (((object)this._createdByType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonString(this._createdByType.ToString()) : null, "createdByType" ,container.Add ); + AddIf( null != this._createdAt ? (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonString(this._createdAt?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "createdAt" ,container.Add ); + AddIf( null != (((object)this._lastModifiedBy)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonString(this._lastModifiedBy.ToString()) : null, "lastModifiedBy" ,container.Add ); + AddIf( null != (((object)this._lastModifiedByType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonString(this._lastModifiedByType.ToString()) : null, "lastModifiedByType" ,container.Add ); + AddIf( null != this._lastModifiedAt ? (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonString(this._lastModifiedAt?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "lastModifiedAt" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/ManagedServiceIdentity/generated/api/Models/Api40/TrackedResource.PowerShell.cs b/src/ManagedServiceIdentity/generated/api/Models/Api40/TrackedResource.PowerShell.cs new file mode 100644 index 000000000000..6b131f45f991 --- /dev/null +++ b/src/ManagedServiceIdentity/generated/api/Models/Api40/TrackedResource.PowerShell.cs @@ -0,0 +1,254 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40 +{ + using Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.PowerShell; + + /// + /// The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' + /// + [System.ComponentModel.TypeConverter(typeof(TrackedResourceTypeConverter))] + public partial class TrackedResource + { + + /// + /// 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.ManagedServiceIdentity.Models.Api40.ITrackedResource DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new TrackedResource(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.ManagedServiceIdentity.Models.Api40.ITrackedResource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new TrackedResource(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.ManagedServiceIdentity.Models.Api40.ITrackedResource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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.ManagedServiceIdentity.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal TrackedResource(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.TrackedResourceTagsTypeConverter.ConvertFrom); + } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.ITrackedResourceInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).Type, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal TrackedResource(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.TrackedResourceTagsTypeConverter.ConvertFrom); + } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.ITrackedResourceInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)this).Type, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + } + /// The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' + [System.ComponentModel.TypeConverter(typeof(TrackedResourceTypeConverter))] + public partial interface ITrackedResource + + { + + } +} \ No newline at end of file diff --git a/src/ManagedServiceIdentity/generated/api/Models/Api10/TrackedResource.TypeConverter.cs b/src/ManagedServiceIdentity/generated/api/Models/Api40/TrackedResource.TypeConverter.cs similarity index 98% rename from src/ManagedServiceIdentity/generated/api/Models/Api10/TrackedResource.TypeConverter.cs rename to src/ManagedServiceIdentity/generated/api/Models/Api40/TrackedResource.TypeConverter.cs index c144ca708eb5..d0c82d72478f 100644 --- a/src/ManagedServiceIdentity/generated/api/Models/Api10/TrackedResource.TypeConverter.cs +++ b/src/ManagedServiceIdentity/generated/api/Models/Api40/TrackedResource.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10 +namespace Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40 { using Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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.ManagedServiceIdentity.Models.Api10.ITrackedResource ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.ITrackedResource ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.ITrackedResource).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.ITrackedResource).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/ManagedServiceIdentity/generated/api/Models/Api40/TrackedResource.cs b/src/ManagedServiceIdentity/generated/api/Models/Api40/TrackedResource.cs new file mode 100644 index 000000000000..131ce4b244c5 --- /dev/null +++ b/src/ManagedServiceIdentity/generated/api/Models/Api40/TrackedResource.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Extensions; + + /// + /// The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' + /// + public partial class TrackedResource : + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.ITrackedResource, + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.ITrackedResourceInternal, + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.Resource(); + + /// + /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + /// + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)__resource).Id; } + + /// Backing field for property. + private string _location; + + /// The geo-location where the resource lives + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Owned)] + public string Location { get => this._location; set => this._location = value; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)__resource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)__resource).Name = value; } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.ISystemData Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)__resource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)__resource).SystemData = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)__resource).Type = value; } + + /// The name of the resource + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)__resource).Name; } + + /// + /// Azure Resource Manager metadata containing createdBy and modifiedBy information. + /// + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)__resource).SystemData; } + + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)__resource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)__resource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Inherited)] + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)__resource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)__resource).SystemDataCreatedBy = value ?? null; } + + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)__resource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)__resource).SystemDataCreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Support.CreatedByType)""); } + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedBy = value ?? null; } + + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Support.CreatedByType)""); } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.ITrackedResourceTags _tag; + + /// Resource tags. + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.ITrackedResourceTags Tag { get => (this._tag = this._tag ?? new Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.TrackedResourceTags()); set => this._tag = value; } + + /// + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + /// + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Origin(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal)__resource).Type; } + + /// Creates an new instance. + public TrackedResource() + { + + } + + /// 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.ManagedServiceIdentity.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__resource), __resource); + await eventListener.AssertObjectIsValid(nameof(__resource), __resource); + } + } + /// The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' + public partial interface ITrackedResource : + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResource + { + /// The geo-location where the resource lives + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The geo-location where the resource lives", + SerializedName = @"location", + PossibleTypes = new [] { typeof(string) })] + string Location { get; set; } + /// Resource tags. + [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resource tags.", + SerializedName = @"tags", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.ITrackedResourceTags) })] + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.ITrackedResourceTags Tag { get; set; } + + } + /// The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' + internal partial interface ITrackedResourceInternal : + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.IResourceInternal + { + /// The geo-location where the resource lives + string Location { get; set; } + /// Resource tags. + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.ITrackedResourceTags Tag { get; set; } + + } +} \ No newline at end of file diff --git a/src/ManagedServiceIdentity/generated/api/Models/Api10/TrackedResource.json.cs b/src/ManagedServiceIdentity/generated/api/Models/Api40/TrackedResource.json.cs similarity index 97% rename from src/ManagedServiceIdentity/generated/api/Models/Api10/TrackedResource.json.cs rename to src/ManagedServiceIdentity/generated/api/Models/Api40/TrackedResource.json.cs index b34f37a9a5e0..80f5af1b44ca 100644 --- a/src/ManagedServiceIdentity/generated/api/Models/Api10/TrackedResource.json.cs +++ b/src/ManagedServiceIdentity/generated/api/Models/Api40/TrackedResource.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10 +namespace Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40 { using static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Extensions; @@ -56,13 +56,13 @@ public partial class TrackedResource partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.ITrackedResource. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.ITrackedResource. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.ITrackedResource. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.ITrackedResource. /// - public static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.ITrackedResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.ITrackedResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Json.JsonObject json ? new TrackedResource(json) : null; } @@ -105,7 +105,7 @@ internal TrackedResource(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdenti { return; } - __resource = new Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.Resource(json); + __resource = new Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api40.Resource(json); {_tag = If( json?.PropertyT("tags"), out var __jsonTags) ? Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api10.TrackedResourceTags.FromJson(__jsonTags) : Tag;} {_location = If( json?.PropertyT("location"), out var __jsonLocation) ? (string)__jsonLocation : (string)Location;} AfterFromJson(json); diff --git a/src/ManagedServiceIdentity/generated/api/Support/CreatedByType.Completer.cs b/src/ManagedServiceIdentity/generated/api/Support/CreatedByType.Completer.cs new file mode 100644 index 000000000000..b5acf3d8769f --- /dev/null +++ b/src/ManagedServiceIdentity/generated/api/Support/CreatedByType.Completer.cs @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Support +{ + + /// The type of identity that created the resource. + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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/src/ManagedServiceIdentity/generated/api/Support/CreatedByType.TypeConverter.cs b/src/ManagedServiceIdentity/generated/api/Support/CreatedByType.TypeConverter.cs new file mode 100644 index 000000000000..ad7daf274162 --- /dev/null +++ b/src/ManagedServiceIdentity/generated/api/Support/CreatedByType.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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/src/ManagedServiceIdentity/generated/api/Support/CreatedByType.cs b/src/ManagedServiceIdentity/generated/api/Support/CreatedByType.cs new file mode 100644 index 000000000000..f8c0f62b270c --- /dev/null +++ b/src/ManagedServiceIdentity/generated/api/Support/CreatedByType.cs @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Support +{ + + /// The type of identity that created the resource. + public partial struct CreatedByType : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Support.CreatedByType Application = @"Application"; + + public static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Support.CreatedByType Key = @"Key"; + + public static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Support.CreatedByType ManagedIdentity = @"ManagedIdentity"; + + public static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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.ManagedServiceIdentity.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.ManagedServiceIdentity.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.ManagedServiceIdentity.Support.CreatedByType e1, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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.ManagedServiceIdentity.Support.CreatedByType e1, Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Support.CreatedByType e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/src/ManagedServiceIdentity/generated/cmdlets/GetAzFederatedIdentityCredentials_Get.cs b/src/ManagedServiceIdentity/generated/cmdlets/GetAzFederatedIdentityCredentials_Get.cs index 53b54346df8d..acdf81fba7b7 100644 --- a/src/ManagedServiceIdentity/generated/cmdlets/GetAzFederatedIdentityCredentials_Get.cs +++ b/src/ManagedServiceIdentity/generated/cmdlets/GetAzFederatedIdentityCredentials_Get.cs @@ -13,8 +13,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Cmdlets /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{resourceName}/federatedIdentityCredentials/{federatedIdentityCredentialResourceName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzFederatedIdentityCredentials_Get")] - [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.PreviewMessage("This is a preview version of the Federated Identity Credentials feature.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredential))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IFederatedIdentityCredential))] [global::Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Description(@"Gets the federated identity credential.")] [global::Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Generated] public partial class GetAzFederatedIdentityCredentials_Get : global::System.Management.Automation.PSCmdlet, @@ -126,12 +125,12 @@ public partial class GetAzFederatedIdentityCredentials_Get : global::System.Mana /// Backing field for property. private string _resourceGroupName; - /// The name of the Resource Group to which the identity belongs. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Resource Group to which the identity belongs.")] + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Info( Required = true, ReadOnly = false, - Description = @"The name of the Resource Group to which the identity belongs.", + Description = @"The name of the resource group. The name is case insensitive.", SerializedName = @"resourceGroupName", PossibleTypes = new [] { typeof(string) })] [global::Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.ParameterCategory.Path)] @@ -160,24 +159,24 @@ public partial class GetAzFederatedIdentityCredentials_Get : global::System.Mana /// 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.ManagedServiceIdentity.Models.Api20220131Preview.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ICloudError /// 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.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredential + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IFederatedIdentityCredential /// 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) @@ -353,12 +352,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.ManagedServiceIdentity.Models.Api20220131Preview.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ICloudError /// 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 +374,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.ManagedServiceIdentity.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, IdentityName=IdentityName, Name=Name }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -393,12 +392,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredential + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IFederatedIdentityCredential /// 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,7 +409,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredential + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IFederatedIdentityCredential WriteObject((await response)); } } diff --git a/src/ManagedServiceIdentity/generated/cmdlets/GetAzFederatedIdentityCredentials_GetViaIdentity.cs b/src/ManagedServiceIdentity/generated/cmdlets/GetAzFederatedIdentityCredentials_GetViaIdentity.cs index 039015d37ac5..168b483573a2 100644 --- a/src/ManagedServiceIdentity/generated/cmdlets/GetAzFederatedIdentityCredentials_GetViaIdentity.cs +++ b/src/ManagedServiceIdentity/generated/cmdlets/GetAzFederatedIdentityCredentials_GetViaIdentity.cs @@ -13,8 +13,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Cmdlets /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{resourceName}/federatedIdentityCredentials/{federatedIdentityCredentialResourceName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzFederatedIdentityCredentials_GetViaIdentity")] - [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.PreviewMessage("This is a preview version of the Federated Identity Credentials feature.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredential))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IFederatedIdentityCredential))] [global::Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Description(@"Gets the federated identity credential.")] [global::Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Generated] public partial class GetAzFederatedIdentityCredentials_GetViaIdentity : global::System.Management.Automation.PSCmdlet, @@ -108,24 +107,24 @@ public partial class GetAzFederatedIdentityCredentials_GetViaIdentity : 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.ManagedServiceIdentity.Models.Api20220131Preview.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ICloudError /// 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.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredential + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IFederatedIdentityCredential /// 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) @@ -322,12 +321,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.ManagedServiceIdentity.Models.Api20220131Preview.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ICloudError /// 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 ) { @@ -344,7 +343,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.ManagedServiceIdentity.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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 } @@ -362,12 +361,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.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredential + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IFederatedIdentityCredential /// 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 ) { @@ -379,7 +378,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredential + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IFederatedIdentityCredential WriteObject((await response)); } } diff --git a/src/ManagedServiceIdentity/generated/cmdlets/GetAzFederatedIdentityCredentials_List.cs b/src/ManagedServiceIdentity/generated/cmdlets/GetAzFederatedIdentityCredentials_List.cs index 3f1d64e56b67..268b8e7e630e 100644 --- a/src/ManagedServiceIdentity/generated/cmdlets/GetAzFederatedIdentityCredentials_List.cs +++ b/src/ManagedServiceIdentity/generated/cmdlets/GetAzFederatedIdentityCredentials_List.cs @@ -15,8 +15,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Cmdlets /// [OpenAPI] List=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{resourceName}/federatedIdentityCredentials" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzFederatedIdentityCredentials_List")] - [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.PreviewMessage("This is a preview version of the Federated Identity Credentials feature.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredential))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IFederatedIdentityCredential))] [global::Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Description(@"Lists all the federated identity credentials under the specified user assigned identity.")] [global::Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Generated] public partial class GetAzFederatedIdentityCredentials_List : global::System.Management.Automation.PSCmdlet, @@ -120,12 +119,12 @@ public partial class GetAzFederatedIdentityCredentials_List : global::System.Man /// Backing field for property. private string _resourceGroupName; - /// The name of the Resource Group to which the identity belongs. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Resource Group to which the identity belongs.")] + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Info( Required = true, ReadOnly = false, - Description = @"The name of the Resource Group to which the identity belongs.", + Description = @"The name of the resource group. The name is case insensitive.", SerializedName = @"resourceGroupName", PossibleTypes = new [] { typeof(string) })] [global::Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.ParameterCategory.Path)] @@ -186,24 +185,24 @@ public partial class GetAzFederatedIdentityCredentials_List : 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.ManagedServiceIdentity.Models.Api20220131Preview.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ICloudError /// 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.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredentialsListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IFederatedIdentityCredentialsListResult /// 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) @@ -379,12 +378,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.ManagedServiceIdentity.Models.Api20220131Preview.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ICloudError /// 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 ) { @@ -401,7 +400,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.ManagedServiceIdentity.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, IdentityName=IdentityName, Top=this.InvocationInformation.BoundParameters.ContainsKey("Top") ? Top : default(int?), Skiptoken=this.InvocationInformation.BoundParameters.ContainsKey("Skiptoken") ? Skiptoken : null }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -419,12 +418,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.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredentialsListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IFederatedIdentityCredentialsListResult /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { diff --git a/src/ManagedServiceIdentity/generated/cmdlets/GetAzOperation_List.cs b/src/ManagedServiceIdentity/generated/cmdlets/GetAzOperation_List.cs index bfaf6cc9ed87..41ebaf1a42ca 100644 --- a/src/ManagedServiceIdentity/generated/cmdlets/GetAzOperation_List.cs +++ b/src/ManagedServiceIdentity/generated/cmdlets/GetAzOperation_List.cs @@ -106,24 +106,24 @@ public partial class GetAzOperation_List : global::System.Management.Automation. /// 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.ManagedServiceIdentity.Models.Api20220131Preview.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ICloudError /// 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.ManagedServiceIdentity.Models.Api20220131Preview.IOperationListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.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) @@ -296,12 +296,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.ManagedServiceIdentity.Models.Api20220131Preview.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ICloudError /// 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 ) { @@ -318,7 +318,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.ManagedServiceIdentity.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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 } @@ -336,12 +336,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.ManagedServiceIdentity.Models.Api20220131Preview.IOperationListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.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 ) { diff --git a/src/ManagedServiceIdentity/generated/cmdlets/GetAzOperation_List1.cs b/src/ManagedServiceIdentity/generated/cmdlets/GetAzOperation_List1.cs new file mode 100644 index 000000000000..9f1c65a6416d --- /dev/null +++ b/src/ManagedServiceIdentity/generated/cmdlets/GetAzOperation_List1.cs @@ -0,0 +1,377 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Extensions; + using System; + + /// Lists available operations for the Microsoft.ManagedIdentity provider + /// + /// [OpenAPI] List=>GET:"/providers/Microsoft.ManagedIdentity/operations" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzOperation_List1")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IOperation))] + [global::Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Description(@"Lists available operations for the Microsoft.ManagedIdentity provider")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Generated] + public partial class GetAzOperation_List1 : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A flag to tell whether it is the first onOK call. + private bool _isFirst = true; + + /// Link to retrieve next page. + private string _nextLink; + + /// 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.ManagedServiceIdentity.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.ManagedServiceIdentityClient Client => Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Module.Instance.ClientAPI; + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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.ManagedServiceIdentity.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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.ManagedServiceIdentity.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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.ManagedServiceIdentity.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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.ManagedServiceIdentity.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorAutoGenerated + /// 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.ManagedServiceIdentity.Models.Api20220131Preview.IOperationListResultAutoGenerated + /// 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.ManagedServiceIdentity.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzOperation_List1() + { + + } + + /// 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.ManagedServiceIdentity.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.ManagedServiceIdentity.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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.ManagedServiceIdentity.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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.ManagedServiceIdentity.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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.ManagedServiceIdentity.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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.ManagedServiceIdentity.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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.ManagedServiceIdentity.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.OperationsList1(onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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.ManagedServiceIdentity.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.IEventListener)this).Cancel(); + base.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.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorAutoGenerated + /// 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.ManagedServiceIdentity.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.ManagedServiceIdentity.Models.Api20220131Preview.IOperationListResultAutoGenerated + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // response should be returning an array of some kind. +Pageable + // pageable / value / nextLink + var result = await response; + WriteObject(result.Value,true); + _nextLink = result.NextLink; + if (_isFirst) + { + _isFirst = false; + while (_nextLink != null) + { + if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) + { + requestMessage = requestMessage.Clone(new global::System.Uri( _nextLink ),Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Method.Get ); + await ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Events.FollowingNextLink); if( ((Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.OperationsList1_Call(requestMessage, onOk, onDefault, this, Pipeline); + } + } + } + } + } + } +} \ No newline at end of file diff --git a/src/ManagedServiceIdentity/generated/cmdlets/GetAzSystemAssignedIdentity_Get.cs b/src/ManagedServiceIdentity/generated/cmdlets/GetAzSystemAssignedIdentity_Get.cs index c2fe308582a3..b72d624f6418 100644 --- a/src/ManagedServiceIdentity/generated/cmdlets/GetAzSystemAssignedIdentity_Get.cs +++ b/src/ManagedServiceIdentity/generated/cmdlets/GetAzSystemAssignedIdentity_Get.cs @@ -13,7 +13,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Cmdlets /// [OpenAPI] GetByScope=>GET:"/{scope}/providers/Microsoft.ManagedIdentity/identities/default" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzSystemAssignedIdentity_Get")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ISystemAssignedIdentity))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ISystemAssignedIdentity))] [global::Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Description(@"Gets the systemAssignedIdentity available under the specified RP scope.")] [global::Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Generated] public partial class GetAzSystemAssignedIdentity_Get : global::System.Management.Automation.PSCmdlet, @@ -115,24 +115,24 @@ public partial class GetAzSystemAssignedIdentity_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.ManagedServiceIdentity.Models.Api20220131Preview.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ICloudError /// 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.ManagedServiceIdentity.Models.Api20220131Preview.ISystemAssignedIdentity + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ISystemAssignedIdentity /// 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) @@ -305,12 +305,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.ManagedServiceIdentity.Models.Api20220131Preview.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ICloudError /// 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 ) { @@ -327,7 +327,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.ManagedServiceIdentity.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Scope=Scope }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -345,12 +345,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.ManagedServiceIdentity.Models.Api20220131Preview.ISystemAssignedIdentity + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ISystemAssignedIdentity /// 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 ) { @@ -362,7 +362,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ISystemAssignedIdentity + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ISystemAssignedIdentity WriteObject((await response)); } } diff --git a/src/ManagedServiceIdentity/generated/cmdlets/GetAzUserAssignedIdentityAssociatedResource_List.cs b/src/ManagedServiceIdentity/generated/cmdlets/GetAzUserAssignedIdentityAssociatedResource_List.cs index 058cca554027..acf409d8cbf8 100644 --- a/src/ManagedServiceIdentity/generated/cmdlets/GetAzUserAssignedIdentityAssociatedResource_List.cs +++ b/src/ManagedServiceIdentity/generated/cmdlets/GetAzUserAssignedIdentityAssociatedResource_List.cs @@ -226,12 +226,12 @@ public partial class GetAzUserAssignedIdentityAssociatedResource_List : 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.ManagedServiceIdentity.Models.Api20220131Preview.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorAutoGenerated /// 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 @@ -422,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.ManagedServiceIdentity.Models.Api20220131Preview.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ICloudErrorAutoGenerated /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -444,7 +444,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.ManagedServiceIdentity.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Name=Name, Filter=this.InvocationInformation.BoundParameters.ContainsKey("Filter") ? Filter : null, Orderby=this.InvocationInformation.BoundParameters.ContainsKey("Orderby") ? Orderby : null, Top=this.InvocationInformation.BoundParameters.ContainsKey("Top") ? Top : default(int?), Skip=this.InvocationInformation.BoundParameters.ContainsKey("Skip") ? Skip : default(int?), Skiptoken=this.InvocationInformation.BoundParameters.ContainsKey("Skiptoken") ? Skiptoken : null }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } diff --git a/src/ManagedServiceIdentity/generated/cmdlets/GetAzUserAssignedIdentity_Get.cs b/src/ManagedServiceIdentity/generated/cmdlets/GetAzUserAssignedIdentity_Get.cs index bee9dee57595..55d7755c4b09 100644 --- a/src/ManagedServiceIdentity/generated/cmdlets/GetAzUserAssignedIdentity_Get.cs +++ b/src/ManagedServiceIdentity/generated/cmdlets/GetAzUserAssignedIdentity_Get.cs @@ -13,7 +13,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Cmdlets /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{resourceName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzUserAssignedIdentity_Get")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentity))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IIdentity))] [global::Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Description(@"Gets the identity.")] [global::Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Generated] public partial class GetAzUserAssignedIdentity_Get : global::System.Management.Automation.PSCmdlet, @@ -145,24 +145,24 @@ public partial class GetAzUserAssignedIdentity_Get : global::System.Management.A /// 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.ManagedServiceIdentity.Models.Api20220131Preview.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ICloudError /// 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.ManagedServiceIdentity.Models.Api20220131Preview.IIdentity + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IIdentity /// 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) @@ -338,12 +338,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.ManagedServiceIdentity.Models.Api20220131Preview.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ICloudError /// 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 ) { @@ -360,7 +360,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.ManagedServiceIdentity.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Name=Name }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -378,12 +378,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.ManagedServiceIdentity.Models.Api20220131Preview.IIdentity + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IIdentity /// 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 ) { @@ -395,7 +395,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentity + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IIdentity WriteObject((await response)); } } diff --git a/src/ManagedServiceIdentity/generated/cmdlets/GetAzUserAssignedIdentity_GetViaIdentity.cs b/src/ManagedServiceIdentity/generated/cmdlets/GetAzUserAssignedIdentity_GetViaIdentity.cs index ab1247912573..da1fb7cc9ace 100644 --- a/src/ManagedServiceIdentity/generated/cmdlets/GetAzUserAssignedIdentity_GetViaIdentity.cs +++ b/src/ManagedServiceIdentity/generated/cmdlets/GetAzUserAssignedIdentity_GetViaIdentity.cs @@ -13,7 +13,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Cmdlets /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{resourceName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzUserAssignedIdentity_GetViaIdentity")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentity))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IIdentity))] [global::Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Description(@"Gets the identity.")] [global::Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Generated] public partial class GetAzUserAssignedIdentity_GetViaIdentity : global::System.Management.Automation.PSCmdlet, @@ -107,24 +107,24 @@ public partial class GetAzUserAssignedIdentity_GetViaIdentity : global::System.M /// 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.ManagedServiceIdentity.Models.Api20220131Preview.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ICloudError /// 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.ManagedServiceIdentity.Models.Api20220131Preview.IIdentity + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IIdentity /// 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) @@ -317,12 +317,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.ManagedServiceIdentity.Models.Api20220131Preview.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ICloudError /// 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 ) { @@ -339,7 +339,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.ManagedServiceIdentity.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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 } @@ -357,12 +357,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.ManagedServiceIdentity.Models.Api20220131Preview.IIdentity + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IIdentity /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -374,7 +374,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentity + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IIdentity WriteObject((await response)); } } diff --git a/src/ManagedServiceIdentity/generated/cmdlets/GetAzUserAssignedIdentity_List.cs b/src/ManagedServiceIdentity/generated/cmdlets/GetAzUserAssignedIdentity_List.cs index 5a556c740039..77a2a11a76fc 100644 --- a/src/ManagedServiceIdentity/generated/cmdlets/GetAzUserAssignedIdentity_List.cs +++ b/src/ManagedServiceIdentity/generated/cmdlets/GetAzUserAssignedIdentity_List.cs @@ -15,7 +15,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Cmdlets /// [OpenAPI] ListBySubscription=>GET:"/subscriptions/{subscriptionId}/providers/Microsoft.ManagedIdentity/userAssignedIdentities" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzUserAssignedIdentity_List")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentity))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IIdentity))] [global::Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Description(@"Lists all the userAssignedIdentities available under the specified subscription.")] [global::Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Generated] public partial class GetAzUserAssignedIdentity_List : global::System.Management.Automation.PSCmdlet, @@ -125,24 +125,24 @@ public partial class GetAzUserAssignedIdentity_List : 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.ManagedServiceIdentity.Models.Api20220131Preview.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ICloudError /// 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.ManagedServiceIdentity.Models.Api20220131Preview.IUserAssignedIdentitiesListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IUserAssignedIdentitiesListResult /// 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) @@ -318,12 +318,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.ManagedServiceIdentity.Models.Api20220131Preview.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ICloudError /// 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 ) { @@ -340,7 +340,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.ManagedServiceIdentity.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -358,12 +358,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.ManagedServiceIdentity.Models.Api20220131Preview.IUserAssignedIdentitiesListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IUserAssignedIdentitiesListResult /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { diff --git a/src/ManagedServiceIdentity/generated/cmdlets/GetAzUserAssignedIdentity_List1.cs b/src/ManagedServiceIdentity/generated/cmdlets/GetAzUserAssignedIdentity_List1.cs index 641e0f7d5920..531ced06c2fb 100644 --- a/src/ManagedServiceIdentity/generated/cmdlets/GetAzUserAssignedIdentity_List1.cs +++ b/src/ManagedServiceIdentity/generated/cmdlets/GetAzUserAssignedIdentity_List1.cs @@ -15,7 +15,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Cmdlets /// [OpenAPI] ListByResourceGroup=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzUserAssignedIdentity_List1")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentity))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IIdentity))] [global::Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Description(@"Lists all the userAssignedIdentities available under the specified ResourceGroup.")] [global::Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Generated] public partial class GetAzUserAssignedIdentity_List1 : global::System.Management.Automation.PSCmdlet, @@ -139,24 +139,24 @@ public partial class GetAzUserAssignedIdentity_List1 : 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.ManagedServiceIdentity.Models.Api20220131Preview.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ICloudError /// 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.ManagedServiceIdentity.Models.Api20220131Preview.IUserAssignedIdentitiesListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IUserAssignedIdentitiesListResult /// 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) @@ -332,12 +332,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.ManagedServiceIdentity.Models.Api20220131Preview.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ICloudError /// 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 ) { @@ -354,7 +354,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.ManagedServiceIdentity.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -372,12 +372,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.ManagedServiceIdentity.Models.Api20220131Preview.IUserAssignedIdentitiesListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IUserAssignedIdentitiesListResult /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { diff --git a/src/ManagedServiceIdentity/generated/cmdlets/NewAzFederatedIdentityCredentials_CreateExpanded.cs b/src/ManagedServiceIdentity/generated/cmdlets/NewAzFederatedIdentityCredentials_CreateExpanded.cs index 2812cc5f900e..d0887e57c5aa 100644 --- a/src/ManagedServiceIdentity/generated/cmdlets/NewAzFederatedIdentityCredentials_CreateExpanded.cs +++ b/src/ManagedServiceIdentity/generated/cmdlets/NewAzFederatedIdentityCredentials_CreateExpanded.cs @@ -15,8 +15,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Cmdlets /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{resourceName}/federatedIdentityCredentials/{federatedIdentityCredentialResourceName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzFederatedIdentityCredentials_CreateExpanded", SupportsShouldProcess = true)] - [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.PreviewMessage("This is a preview version of the Federated Identity Credentials feature.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredential))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IFederatedIdentityCredential))] [global::Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Description(@"Create or update a federated identity credential under the specified user assigned identity.")] [global::Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Generated] public partial class NewAzFederatedIdentityCredentials_CreateExpanded : global::System.Management.Automation.PSCmdlet, @@ -37,7 +36,7 @@ public partial class NewAzFederatedIdentityCredentials_CreateExpanded : global:: private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); /// Describes a federated identity credential. - private Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredential _parametersBody = new Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.FederatedIdentityCredential(); + private Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IFederatedIdentityCredential _parametersBody = new Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.FederatedIdentityCredential(); /// The list of audiences that can appear in the issued token. [global::System.Management.Automation.AllowEmptyCollection] @@ -158,12 +157,12 @@ public partial class NewAzFederatedIdentityCredentials_CreateExpanded : global:: /// Backing field for property. private string _resourceGroupName; - /// The name of the Resource Group to which the identity belongs. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Resource Group to which the identity belongs.")] + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Info( Required = true, ReadOnly = false, - Description = @"The name of the Resource Group to which the identity belongs.", + Description = @"The name of the resource group. The name is case insensitive.", SerializedName = @"resourceGroupName", PossibleTypes = new [] { typeof(string) })] [global::Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.ParameterCategory.Path)] @@ -203,36 +202,36 @@ public partial class NewAzFederatedIdentityCredentials_CreateExpanded : 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.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredential + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IFederatedIdentityCredential /// 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.ManagedServiceIdentity.Models.Api20220131Preview.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ICloudError /// 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.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredential + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IFederatedIdentityCredential /// 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) @@ -406,12 +405,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.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredential + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IFederatedIdentityCredential /// 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 ) { @@ -423,7 +422,7 @@ protected override void StopProcessing() return ; } // onCreated - response for 201 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredential + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IFederatedIdentityCredential WriteObject((await response)); } } @@ -432,12 +431,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.ManagedServiceIdentity.Models.Api20220131Preview.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ICloudError /// 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 ) { @@ -454,7 +453,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.ManagedServiceIdentity.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, IdentityName=IdentityName, Name=Name, body=_parametersBody }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -472,12 +471,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.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredential + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IFederatedIdentityCredential /// 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 ) { @@ -489,7 +488,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredential + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IFederatedIdentityCredential WriteObject((await response)); } } diff --git a/src/ManagedServiceIdentity/generated/cmdlets/NewAzUserAssignedIdentity_CreateExpanded.cs b/src/ManagedServiceIdentity/generated/cmdlets/NewAzUserAssignedIdentity_CreateExpanded.cs index 07605989df3f..caf78ef6a947 100644 --- a/src/ManagedServiceIdentity/generated/cmdlets/NewAzUserAssignedIdentity_CreateExpanded.cs +++ b/src/ManagedServiceIdentity/generated/cmdlets/NewAzUserAssignedIdentity_CreateExpanded.cs @@ -13,7 +13,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Cmdlets /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{resourceName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzUserAssignedIdentity_CreateExpanded", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentity))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IIdentity))] [global::Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Description(@"Create or update an identity in the specified subscription and resource group.")] [global::Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Generated] public partial class NewAzUserAssignedIdentity_CreateExpanded : global::System.Management.Automation.PSCmdlet, @@ -34,7 +34,7 @@ public partial class NewAzUserAssignedIdentity_CreateExpanded : global::System.M private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); /// Describes an identity resource. - private Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentity _parametersBody = new Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.Identity(); + private Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IIdentity _parametersBody = new Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.Identity(); /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] @@ -171,36 +171,36 @@ public partial class NewAzUserAssignedIdentity_CreateExpanded : global::System.M /// 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.ManagedServiceIdentity.Models.Api20220131Preview.IIdentity + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IIdentity /// 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.ManagedServiceIdentity.Models.Api20220131Preview.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ICloudError /// 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.ManagedServiceIdentity.Models.Api20220131Preview.IIdentity + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IIdentity /// 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) @@ -374,12 +374,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.ManagedServiceIdentity.Models.Api20220131Preview.IIdentity + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IIdentity /// 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 ) { @@ -391,7 +391,7 @@ protected override void StopProcessing() return ; } // onCreated - response for 201 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentity + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IIdentity WriteObject((await response)); } } @@ -400,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.ManagedServiceIdentity.Models.Api20220131Preview.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ICloudError /// 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 ) { @@ -422,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.ManagedServiceIdentity.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Name=Name, body=_parametersBody }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -440,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.ManagedServiceIdentity.Models.Api20220131Preview.IIdentity + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IIdentity /// 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 ) { @@ -457,7 +457,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentity + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IIdentity WriteObject((await response)); } } diff --git a/src/ManagedServiceIdentity/generated/cmdlets/RemoveAzFederatedIdentityCredentials_Delete.cs b/src/ManagedServiceIdentity/generated/cmdlets/RemoveAzFederatedIdentityCredentials_Delete.cs index e10f4cc73084..d75c2b91b290 100644 --- a/src/ManagedServiceIdentity/generated/cmdlets/RemoveAzFederatedIdentityCredentials_Delete.cs +++ b/src/ManagedServiceIdentity/generated/cmdlets/RemoveAzFederatedIdentityCredentials_Delete.cs @@ -13,7 +13,6 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Cmdlets /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{resourceName}/federatedIdentityCredentials/{federatedIdentityCredentialResourceName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzFederatedIdentityCredentials_Delete", SupportsShouldProcess = true)] - [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.PreviewMessage("This is a preview version of the Federated Identity Credentials feature.")] [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Description(@"Deletes the federated identity credential.")] [global::Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Generated] @@ -133,12 +132,12 @@ public partial class RemoveAzFederatedIdentityCredentials_Delete : global::Syste /// Backing field for property. private string _resourceGroupName; - /// The name of the Resource Group to which the identity belongs. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Resource Group to which the identity belongs.")] + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Info( Required = true, ReadOnly = false, - Description = @"The name of the Resource Group to which the identity belongs.", + Description = @"The name of the resource group. The name is case insensitive.", SerializedName = @"resourceGroupName", PossibleTypes = new [] { typeof(string) })] [global::Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.ParameterCategory.Path)] @@ -167,12 +166,12 @@ public partial class RemoveAzFederatedIdentityCredentials_Delete : 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.ManagedServiceIdentity.Models.Api20220131Preview.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ICloudError /// 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 @@ -368,12 +367,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.ManagedServiceIdentity.Models.Api20220131Preview.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ICloudError /// 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,7 +389,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.ManagedServiceIdentity.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, IdentityName=IdentityName, Name=Name }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } diff --git a/src/ManagedServiceIdentity/generated/cmdlets/RemoveAzFederatedIdentityCredentials_DeleteViaIdentity.cs b/src/ManagedServiceIdentity/generated/cmdlets/RemoveAzFederatedIdentityCredentials_DeleteViaIdentity.cs index 7270f3df3e02..5aab4b6ab9ff 100644 --- a/src/ManagedServiceIdentity/generated/cmdlets/RemoveAzFederatedIdentityCredentials_DeleteViaIdentity.cs +++ b/src/ManagedServiceIdentity/generated/cmdlets/RemoveAzFederatedIdentityCredentials_DeleteViaIdentity.cs @@ -13,7 +13,6 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Cmdlets /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{resourceName}/federatedIdentityCredentials/{federatedIdentityCredentialResourceName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzFederatedIdentityCredentials_DeleteViaIdentity", SupportsShouldProcess = true)] - [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.PreviewMessage("This is a preview version of the Federated Identity Credentials feature.")] [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Description(@"Deletes the federated identity credential.")] [global::Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Generated] @@ -115,12 +114,12 @@ public partial class RemoveAzFederatedIdentityCredentials_DeleteViaIdentity : 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.ManagedServiceIdentity.Models.Api20220131Preview.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ICloudError /// 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 @@ -340,12 +339,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.ManagedServiceIdentity.Models.Api20220131Preview.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ICloudError /// 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 ) { @@ -362,7 +361,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.ManagedServiceIdentity.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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/src/ManagedServiceIdentity/generated/cmdlets/RemoveAzUserAssignedIdentity_Delete.cs b/src/ManagedServiceIdentity/generated/cmdlets/RemoveAzUserAssignedIdentity_Delete.cs index dd65e95f4111..efbd655b6354 100644 --- a/src/ManagedServiceIdentity/generated/cmdlets/RemoveAzUserAssignedIdentity_Delete.cs +++ b/src/ManagedServiceIdentity/generated/cmdlets/RemoveAzUserAssignedIdentity_Delete.cs @@ -152,12 +152,12 @@ public partial class RemoveAzUserAssignedIdentity_Delete : 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.ManagedServiceIdentity.Models.Api20220131Preview.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ICloudError /// 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 @@ -353,12 +353,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.ManagedServiceIdentity.Models.Api20220131Preview.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ICloudError /// 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 +375,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.ManagedServiceIdentity.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Name=Name }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } diff --git a/src/ManagedServiceIdentity/generated/cmdlets/RemoveAzUserAssignedIdentity_DeleteViaIdentity.cs b/src/ManagedServiceIdentity/generated/cmdlets/RemoveAzUserAssignedIdentity_DeleteViaIdentity.cs index fade28f56089..1cf68aacf2e4 100644 --- a/src/ManagedServiceIdentity/generated/cmdlets/RemoveAzUserAssignedIdentity_DeleteViaIdentity.cs +++ b/src/ManagedServiceIdentity/generated/cmdlets/RemoveAzUserAssignedIdentity_DeleteViaIdentity.cs @@ -114,12 +114,12 @@ public partial class RemoveAzUserAssignedIdentity_DeleteViaIdentity : 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.ManagedServiceIdentity.Models.Api20220131Preview.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ICloudError /// 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 @@ -335,12 +335,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.ManagedServiceIdentity.Models.Api20220131Preview.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ICloudError /// 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 ) { @@ -357,7 +357,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.ManagedServiceIdentity.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.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/src/ManagedServiceIdentity/generated/cmdlets/UpdateAzFederatedIdentityCredentials_UpdateExpanded.cs b/src/ManagedServiceIdentity/generated/cmdlets/UpdateAzFederatedIdentityCredentials_UpdateExpanded.cs index 797e9d47fa30..2734e0c0d5b1 100644 --- a/src/ManagedServiceIdentity/generated/cmdlets/UpdateAzFederatedIdentityCredentials_UpdateExpanded.cs +++ b/src/ManagedServiceIdentity/generated/cmdlets/UpdateAzFederatedIdentityCredentials_UpdateExpanded.cs @@ -15,8 +15,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Cmdlets /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{resourceName}/federatedIdentityCredentials/{federatedIdentityCredentialResourceName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzFederatedIdentityCredentials_UpdateExpanded", SupportsShouldProcess = true)] - [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.PreviewMessage("This is a preview version of the Federated Identity Credentials feature.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredential))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IFederatedIdentityCredential))] [global::Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Description(@"Create or update a federated identity credential under the specified user assigned identity.")] [global::Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Generated] public partial class UpdateAzFederatedIdentityCredentials_UpdateExpanded : global::System.Management.Automation.PSCmdlet, @@ -37,7 +36,7 @@ public partial class UpdateAzFederatedIdentityCredentials_UpdateExpanded : globa private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); /// Describes a federated identity credential. - private Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredential _parametersBody = new Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.FederatedIdentityCredential(); + private Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IFederatedIdentityCredential _parametersBody = new Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.FederatedIdentityCredential(); /// The list of audiences that can appear in the issued token. [global::System.Management.Automation.AllowEmptyCollection] @@ -158,12 +157,12 @@ public partial class UpdateAzFederatedIdentityCredentials_UpdateExpanded : globa /// Backing field for property. private string _resourceGroupName; - /// The name of the Resource Group to which the identity belongs. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Resource Group to which the identity belongs.")] + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.Info( Required = true, ReadOnly = false, - Description = @"The name of the Resource Group to which the identity belongs.", + Description = @"The name of the resource group. The name is case insensitive.", SerializedName = @"resourceGroupName", PossibleTypes = new [] { typeof(string) })] [global::Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.ParameterCategory.Path)] @@ -203,36 +202,36 @@ public partial class UpdateAzFederatedIdentityCredentials_UpdateExpanded : globa /// 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.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredential + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IFederatedIdentityCredential /// 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.ManagedServiceIdentity.Models.Api20220131Preview.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ICloudError /// 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.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredential + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IFederatedIdentityCredential /// 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) @@ -406,12 +405,12 @@ public UpdateAzFederatedIdentityCredentials_UpdateExpanded() /// 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.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredential + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IFederatedIdentityCredential /// 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 ) { @@ -423,7 +422,7 @@ public UpdateAzFederatedIdentityCredentials_UpdateExpanded() return ; } // onCreated - response for 201 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredential + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IFederatedIdentityCredential WriteObject((await response)); } } @@ -432,12 +431,12 @@ public UpdateAzFederatedIdentityCredentials_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.ManagedServiceIdentity.Models.Api20220131Preview.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ICloudError /// 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 ) { @@ -454,7 +453,7 @@ public UpdateAzFederatedIdentityCredentials_UpdateExpanded() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, IdentityName=IdentityName, Name=Name, body=_parametersBody }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -472,12 +471,12 @@ public UpdateAzFederatedIdentityCredentials_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.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredential + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IFederatedIdentityCredential /// 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 ) { @@ -489,7 +488,7 @@ public UpdateAzFederatedIdentityCredentials_UpdateExpanded() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredential + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IFederatedIdentityCredential WriteObject((await response)); } } diff --git a/src/ManagedServiceIdentity/generated/cmdlets/UpdateAzFederatedIdentityCredentials_UpdateViaIdentityExpanded.cs b/src/ManagedServiceIdentity/generated/cmdlets/UpdateAzFederatedIdentityCredentials_UpdateViaIdentityExpanded.cs index 18ccc683c085..de258b17e4a6 100644 --- a/src/ManagedServiceIdentity/generated/cmdlets/UpdateAzFederatedIdentityCredentials_UpdateViaIdentityExpanded.cs +++ b/src/ManagedServiceIdentity/generated/cmdlets/UpdateAzFederatedIdentityCredentials_UpdateViaIdentityExpanded.cs @@ -15,8 +15,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Cmdlets /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{resourceName}/federatedIdentityCredentials/{federatedIdentityCredentialResourceName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzFederatedIdentityCredentials_UpdateViaIdentityExpanded", SupportsShouldProcess = true)] - [Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.PreviewMessage("This is a preview version of the Federated Identity Credentials feature.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredential))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IFederatedIdentityCredential))] [global::Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Description(@"Create or update a federated identity credential under the specified user assigned identity.")] [global::Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Generated] public partial class UpdateAzFederatedIdentityCredentials_UpdateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, @@ -37,7 +36,7 @@ public partial class UpdateAzFederatedIdentityCredentials_UpdateViaIdentityExpan private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); /// Describes a federated identity credential. - private Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredential _parametersBody = new Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.FederatedIdentityCredential(); + private Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IFederatedIdentityCredential _parametersBody = new Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.FederatedIdentityCredential(); /// The list of audiences that can appear in the issued token. [global::System.Management.Automation.AllowEmptyCollection] @@ -151,36 +150,36 @@ public partial class UpdateAzFederatedIdentityCredentials_UpdateViaIdentityExpan /// 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.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredential + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IFederatedIdentityCredential /// 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.ManagedServiceIdentity.Models.Api20220131Preview.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ICloudError /// 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.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredential + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IFederatedIdentityCredential /// 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) @@ -379,12 +378,12 @@ public UpdateAzFederatedIdentityCredentials_UpdateViaIdentityExpanded() /// 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.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredential + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IFederatedIdentityCredential /// 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 ) { @@ -396,7 +395,7 @@ public UpdateAzFederatedIdentityCredentials_UpdateViaIdentityExpanded() return ; } // onCreated - response for 201 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredential + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IFederatedIdentityCredential WriteObject((await response)); } } @@ -405,12 +404,12 @@ public UpdateAzFederatedIdentityCredentials_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.ManagedServiceIdentity.Models.Api20220131Preview.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ICloudError /// 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 ) { @@ -427,7 +426,7 @@ public UpdateAzFederatedIdentityCredentials_UpdateViaIdentityExpanded() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_parametersBody }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -445,12 +444,12 @@ public UpdateAzFederatedIdentityCredentials_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.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredential + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IFederatedIdentityCredential /// 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 ) { @@ -462,7 +461,7 @@ public UpdateAzFederatedIdentityCredentials_UpdateViaIdentityExpanded() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredential + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IFederatedIdentityCredential WriteObject((await response)); } } diff --git a/src/ManagedServiceIdentity/generated/cmdlets/UpdateAzUserAssignedIdentity_UpdateExpanded.cs b/src/ManagedServiceIdentity/generated/cmdlets/UpdateAzUserAssignedIdentity_UpdateExpanded.cs index 267bde65d33a..e2732977758a 100644 --- a/src/ManagedServiceIdentity/generated/cmdlets/UpdateAzUserAssignedIdentity_UpdateExpanded.cs +++ b/src/ManagedServiceIdentity/generated/cmdlets/UpdateAzUserAssignedIdentity_UpdateExpanded.cs @@ -13,7 +13,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Cmdlets /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{resourceName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzUserAssignedIdentity_UpdateExpanded", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentity))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IIdentity))] [global::Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Description(@"Update an identity in the specified subscription and resource group.")] [global::Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Generated] public partial class UpdateAzUserAssignedIdentity_UpdateExpanded : global::System.Management.Automation.PSCmdlet, @@ -34,7 +34,7 @@ public partial class UpdateAzUserAssignedIdentity_UpdateExpanded : global::Syste private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); /// Describes an identity resource. - private Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityUpdate _parametersBody = new Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IdentityUpdate(); + private Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IIdentityUpdate _parametersBody = new Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IdentityUpdate(); /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] @@ -171,24 +171,24 @@ public partial class UpdateAzUserAssignedIdentity_UpdateExpanded : 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.ManagedServiceIdentity.Models.Api20220131Preview.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ICloudError /// 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.ManagedServiceIdentity.Models.Api20220131Preview.IIdentity + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IIdentity /// 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) @@ -364,12 +364,12 @@ public UpdateAzUserAssignedIdentity_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.ManagedServiceIdentity.Models.Api20220131Preview.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ICloudError /// 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,7 +386,7 @@ public UpdateAzUserAssignedIdentity_UpdateExpanded() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Name=Name, body=_parametersBody }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -404,12 +404,12 @@ public UpdateAzUserAssignedIdentity_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.ManagedServiceIdentity.Models.Api20220131Preview.IIdentity + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IIdentity /// 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 ) { @@ -421,7 +421,7 @@ public UpdateAzUserAssignedIdentity_UpdateExpanded() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentity + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IIdentity WriteObject((await response)); } } diff --git a/src/ManagedServiceIdentity/generated/cmdlets/UpdateAzUserAssignedIdentity_UpdateViaIdentityExpanded.cs b/src/ManagedServiceIdentity/generated/cmdlets/UpdateAzUserAssignedIdentity_UpdateViaIdentityExpanded.cs index 92025cf185e7..ccfd9fb4c004 100644 --- a/src/ManagedServiceIdentity/generated/cmdlets/UpdateAzUserAssignedIdentity_UpdateViaIdentityExpanded.cs +++ b/src/ManagedServiceIdentity/generated/cmdlets/UpdateAzUserAssignedIdentity_UpdateViaIdentityExpanded.cs @@ -13,7 +13,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Cmdlets /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{resourceName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzUserAssignedIdentity_UpdateViaIdentityExpanded", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentity))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IIdentity))] [global::Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Description(@"Update an identity in the specified subscription and resource group.")] [global::Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Generated] public partial class UpdateAzUserAssignedIdentity_UpdateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, @@ -34,7 +34,7 @@ public partial class UpdateAzUserAssignedIdentity_UpdateViaIdentityExpanded : gl private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); /// Describes an identity resource. - private Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentityUpdate _parametersBody = new Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IdentityUpdate(); + private Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IIdentityUpdate _parametersBody = new Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IdentityUpdate(); /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] @@ -133,24 +133,24 @@ public partial class UpdateAzUserAssignedIdentity_UpdateViaIdentityExpanded : 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.ManagedServiceIdentity.Models.Api20220131Preview.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ICloudError /// 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.ManagedServiceIdentity.Models.Api20220131Preview.IIdentity + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IIdentity /// 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) @@ -346,12 +346,12 @@ public UpdateAzUserAssignedIdentity_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.ManagedServiceIdentity.Models.Api20220131Preview.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ICloudError /// 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 +368,7 @@ public UpdateAzUserAssignedIdentity_UpdateViaIdentityExpanded() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_parametersBody }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -386,12 +386,12 @@ public UpdateAzUserAssignedIdentity_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.ManagedServiceIdentity.Models.Api20220131Preview.IIdentity + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IIdentity /// 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,7 +403,7 @@ public UpdateAzUserAssignedIdentity_UpdateViaIdentityExpanded() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentity + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IIdentity WriteObject((await response)); } } diff --git a/src/ManagedServiceIdentity/generated/runtime/BuildTime/Cmdlets/ExportPsd1.cs b/src/ManagedServiceIdentity/generated/runtime/BuildTime/Cmdlets/ExportPsd1.cs index a1496c48fd2d..b3d415d38296 100644 --- a/src/ManagedServiceIdentity/generated/runtime/BuildTime/Cmdlets/ExportPsd1.cs +++ b/src/ManagedServiceIdentity/generated/runtime/BuildTime/Cmdlets/ExportPsd1.cs @@ -51,7 +51,7 @@ protected override void ProcessRecord() throw new ArgumentException($"Custom folder '{CustomFolder}' does not exist"); } - string version = Convert.ToString(@"0.2.0"); + string version = Convert.ToString(@"0.3.0"); // Validate the module version should be semantic version // Following regex is official from https://semver.org/ Regex rx = new Regex(@"^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$", RegexOptions.Compiled); diff --git a/src/ManagedServiceIdentity/help/Get-AzFederatedIdentityCredentials.md b/src/ManagedServiceIdentity/help/Get-AzFederatedIdentityCredentials.md index 85654e5ee098..22404cda5603 100644 --- a/src/ManagedServiceIdentity/help/Get-AzFederatedIdentityCredentials.md +++ b/src/ManagedServiceIdentity/help/Get-AzFederatedIdentityCredentials.md @@ -142,7 +142,8 @@ Accept wildcard characters: False ``` ### -ResourceGroupName -The name of the Resource Group to which the identity belongs. +The name of the resource group. +The name is case insensitive. ```yaml Type: System.String @@ -211,7 +212,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredential +### Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IFederatedIdentityCredential ## NOTES diff --git a/src/ManagedServiceIdentity/help/Get-AzSystemAssignedIdentity.md b/src/ManagedServiceIdentity/help/Get-AzSystemAssignedIdentity.md index 26589e6903a0..b21c5e4835ea 100644 --- a/src/ManagedServiceIdentity/help/Get-AzSystemAssignedIdentity.md +++ b/src/ManagedServiceIdentity/help/Get-AzSystemAssignedIdentity.md @@ -74,7 +74,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.ISystemAssignedIdentity +### Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.ISystemAssignedIdentity ## NOTES diff --git a/src/ManagedServiceIdentity/help/Get-AzUserAssignedIdentity.md b/src/ManagedServiceIdentity/help/Get-AzUserAssignedIdentity.md index 2918bd410f98..44e2057cf73a 100644 --- a/src/ManagedServiceIdentity/help/Get-AzUserAssignedIdentity.md +++ b/src/ManagedServiceIdentity/help/Get-AzUserAssignedIdentity.md @@ -182,7 +182,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentity +### Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IIdentity ## NOTES diff --git a/src/ManagedServiceIdentity/help/New-AzFederatedIdentityCredentials.md b/src/ManagedServiceIdentity/help/New-AzFederatedIdentityCredentials.md index e6cf3946c27b..321fcaff0ed3 100644 --- a/src/ManagedServiceIdentity/help/New-AzFederatedIdentityCredentials.md +++ b/src/ManagedServiceIdentity/help/New-AzFederatedIdentityCredentials.md @@ -130,7 +130,8 @@ Accept wildcard characters: False ``` ### -ResourceGroupName -The name of the Resource Group to which the identity belongs. +The name of the resource group. +The name is case insensitive. ```yaml Type: System.String @@ -212,7 +213,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredential +### Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IFederatedIdentityCredential ## NOTES diff --git a/src/ManagedServiceIdentity/help/New-AzUserAssignedIdentity.md b/src/ManagedServiceIdentity/help/New-AzUserAssignedIdentity.md index b2bf63a38cb3..492fa70c2bf8 100644 --- a/src/ManagedServiceIdentity/help/New-AzUserAssignedIdentity.md +++ b/src/ManagedServiceIdentity/help/New-AzUserAssignedIdentity.md @@ -166,7 +166,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentity +### Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IIdentity ## NOTES diff --git a/src/ManagedServiceIdentity/help/Remove-AzFederatedIdentityCredentials.md b/src/ManagedServiceIdentity/help/Remove-AzFederatedIdentityCredentials.md index 958cd034351f..0cf4431c0a02 100644 --- a/src/ManagedServiceIdentity/help/Remove-AzFederatedIdentityCredentials.md +++ b/src/ManagedServiceIdentity/help/Remove-AzFederatedIdentityCredentials.md @@ -122,7 +122,8 @@ Accept wildcard characters: False ``` ### -ResourceGroupName -The name of the Resource Group to which the identity belongs. +The name of the resource group. +The name is case insensitive. ```yaml Type: System.String diff --git a/src/ManagedServiceIdentity/help/Update-AzFederatedIdentityCredentials.md b/src/ManagedServiceIdentity/help/Update-AzFederatedIdentityCredentials.md index 4214e65aae8b..6c24893474ca 100644 --- a/src/ManagedServiceIdentity/help/Update-AzFederatedIdentityCredentials.md +++ b/src/ManagedServiceIdentity/help/Update-AzFederatedIdentityCredentials.md @@ -152,7 +152,8 @@ Accept wildcard characters: False ``` ### -ResourceGroupName -The name of the Resource Group to which the identity belongs. +The name of the resource group. +The name is case insensitive. ```yaml Type: System.String @@ -236,7 +237,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IFederatedIdentityCredential +### Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IFederatedIdentityCredential ## NOTES diff --git a/src/ManagedServiceIdentity/help/Update-AzUserAssignedIdentity.md b/src/ManagedServiceIdentity/help/Update-AzUserAssignedIdentity.md index b56ee264c516..6015527a740b 100644 --- a/src/ManagedServiceIdentity/help/Update-AzUserAssignedIdentity.md +++ b/src/ManagedServiceIdentity/help/Update-AzUserAssignedIdentity.md @@ -204,7 +204,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20220131Preview.IIdentity +### Microsoft.Azure.PowerShell.Cmdlets.ManagedServiceIdentity.Models.Api20230131.IIdentity ## NOTES diff --git a/src/ManagedServiceIdentity/how-to.md b/src/ManagedServiceIdentity/how-to.md index ed26a16a19d9..2ca6f3ce34b9 100644 --- a/src/ManagedServiceIdentity/how-to.md +++ b/src/ManagedServiceIdentity/how-to.md @@ -14,7 +14,7 @@ To generate documentation, the process is now integrated into the `build-module. To test the cmdlets, we use [Pester](https://github.com/pester/Pester). Tests scripts (`.ps1`) should be added to the `test` folder. To execute the Pester tests, run the `test-module.ps1` script. This will run all tests in `playback` mode within the `test` folder. To read more about testing cmdlets, look at the [README.md](examples/README.md) in the `examples` folder. ## Packing `Az.ManagedServiceIdentity` -To pack `Az.ManagedServiceIdentity` for distribution, run the `pack-module.ps1` script. This will take the contents of multiple directories and certain root-folder files to create a `.nupkg`. The structure of the `.nupkg` is created so it can be loaded part of a [PSRepository](https://learn.microsoft.com/powershell/module/powershellget/register-psrepository). Additionally, this package is in a format for distribution to the [PSGallery](https://www.powershellgallery.com/). For signing an Azure module, please contact the [Azure PowerShell](https://github.com/Azure/azure-powershell) team. +To pack `Az.ManagedServiceIdentity` for distribution, run the `pack-module.ps1` script. This will take the contents of multiple directories and certain root-folder files to create a `.nupkg`. The structure of the `.nupkg` is created so it can be loaded part of a [PSRepository](https://docs.microsoft.com/powershell/module/powershellget/register-psrepository). Additionally, this package is in a format for distribution to the [PSGallery](https://www.powershellgallery.com/). For signing an Azure module, please contact the [Azure PowerShell](https://github.com/Azure/azure-powershell) team. ## Module Script Details There are multiple scripts created for performing different actions for developing `Az.ManagedServiceIdentity`. diff --git a/src/ManagedServiceIdentity/internal/Get-AzOperation.ps1 b/src/ManagedServiceIdentity/internal/Get-AzOperation.ps1 index a8abc6f34a9b..10c9a1ec324e 100644 --- a/src/ManagedServiceIdentity/internal/Get-AzOperation.ps1 +++ b/src/ManagedServiceIdentity/internal/Get-AzOperation.ps1 @@ -91,6 +91,7 @@ begin { $mapping = @{ List = 'Az.ManagedServiceIdentity.private\Get-AzOperation_List'; + List1 = 'Az.ManagedServiceIdentity.private\Get-AzOperation_List1'; } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) diff --git a/src/ManagedServiceIdentity/internal/ProxyCmdletDefinitions.ps1 b/src/ManagedServiceIdentity/internal/ProxyCmdletDefinitions.ps1 index a8abc6f34a9b..10c9a1ec324e 100644 --- a/src/ManagedServiceIdentity/internal/ProxyCmdletDefinitions.ps1 +++ b/src/ManagedServiceIdentity/internal/ProxyCmdletDefinitions.ps1 @@ -91,6 +91,7 @@ begin { $mapping = @{ List = 'Az.ManagedServiceIdentity.private\Get-AzOperation_List'; + List1 = 'Az.ManagedServiceIdentity.private\Get-AzOperation_List1'; } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) diff --git a/src/ManagedServiceIdentity/internal/README.md b/src/ManagedServiceIdentity/internal/README.md index 62595a021b7d..06d73f24c01f 100644 --- a/src/ManagedServiceIdentity/internal/README.md +++ b/src/ManagedServiceIdentity/internal/README.md @@ -8,7 +8,7 @@ This directory contains a module to handle *internal only* cmdlets. Cmdlets that - Packaged: yes ## Details -The `Az.ManagedServiceIdentity.internal.psm1` file is generated to this folder. This module file handles the hidden cmdlets. These cmdlets will not be exported by `Az.ManagedServiceIdentity`. Instead, this sub-module is imported by the `..\custom\Az.ManagedServiceIdentity.custom.psm1` module, allowing you to use hidden cmdlets in your custom, exposed cmdlets. To call these cmdlets in your custom scripts, simply use [module-qualified calls](https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_command_precedence?view=powershell-6#qualified-names). For example, `Az.ManagedServiceIdentity.internal\Get-Example` would call an internal cmdlet named `Get-Example`. +The `Az.ManagedServiceIdentity.internal.psm1` file is generated to this folder. This module file handles the hidden cmdlets. These cmdlets will not be exported by `Az.ManagedServiceIdentity`. Instead, this sub-module is imported by the `..\custom\Az.ManagedServiceIdentity.custom.psm1` module, allowing you to use hidden cmdlets in your custom, exposed cmdlets. To call these cmdlets in your custom scripts, simply use [module-qualified calls](https://docs.microsoft.com/powershell/module/microsoft.powershell.core/about/about_command_precedence?view=powershell-6#qualified-names). For example, `Az.ManagedServiceIdentity.internal\Get-Example` would call an internal cmdlet named `Get-Example`. ## Purpose This allows you to include REST specifications for services that you *do not wish to expose from your module*, but simply want to call within custom cmdlets. For example, if you want to make a custom cmdlet that uses `Storage` services, you could include a simplified `Storage` REST specification that has only the operations you need. When you run the generator and build this module, note the generated `Storage` cmdlets. Then, in your readme configuration, use [cmdlet hiding](https://github.com/Azure/autorest/blob/master/docs/powershell/options.md#cmdlet-hiding-exportation-suppression) on the `Storage` cmdlets and they will *only be exposed to the custom cmdlets* you want to write, and not be exported as part of `Az.ManagedServiceIdentity`. diff --git a/src/ManagedServiceIdentity/test/Get-AzFederatedIdentityCredentials.Recording.json b/src/ManagedServiceIdentity/test/Get-AzFederatedIdentityCredentials.Recording.json index 32b94b2c1344..fde23e0a572e 100644 --- a/src/ManagedServiceIdentity/test/Get-AzFederatedIdentityCredentials.Recording.json +++ b/src/ManagedServiceIdentity/test/Get-AzFederatedIdentityCredentials.Recording.json @@ -1,17 +1,17 @@ { - "Get-AzFederatedIdentityCredentials+[NoContext]+List+$GET+https://management.azure.com/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourceGroups/fic-rg-1znoxkhq/providers/Microsoft.ManagedIdentity/userAssignedIdentities/fic-identity-ws41z9/federatedIdentityCredentials?api-version=2022-01-31-preview+1": { + "Get-AzFederatedIdentityCredentials+[NoContext]+List+$GET+https://management.azure.com/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourceGroups/fic-rg-49ei1m3y/providers/Microsoft.ManagedIdentity/userAssignedIdentities/fic-identity-oqecha/federatedIdentityCredentials?api-version=2023-01-31+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourceGroups/fic-rg-1znoxkhq/providers/Microsoft.ManagedIdentity/userAssignedIdentities/fic-identity-ws41z9/federatedIdentityCredentials?api-version=2022-01-31-preview", + "RequestUri": "https://management.azure.com/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourceGroups/fic-rg-49ei1m3y/providers/Microsoft.ManagedIdentity/userAssignedIdentities/fic-identity-oqecha/federatedIdentityCredentials?api-version=2023-01-31", "Content": null, "isContentBase64": false, "Headers": { "x-ms-unique-id": [ "16" ], - "x-ms-client-request-id": [ "56601f7f-a1f1-41e4-974a-c6c263974c2c" ], + "x-ms-client-request-id": [ "50d6841a-f33d-4f5d-a0f1-44b0d45b9997" ], "CommandName": [ "Get-AzFederatedIdentityCredentials" ], "FullCommandName": [ "Get-AzFederatedIdentityCredentials_List" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ManagedServiceIdentity/0.2.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ManagedServiceIdentity/0.3.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -24,34 +24,34 @@ "Pragma": [ "no-cache" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], - "x-ms-request-id": [ "446d55ee-6bd5-4fe5-b22c-f707fbf0185d" ], - "x-ms-correlation-request-id": [ "446d55ee-6bd5-4fe5-b22c-f707fbf0185d" ], - "x-ms-routing-request-id": [ "NORTHEUROPE:20220906T145317Z:446d55ee-6bd5-4fe5-b22c-f707fbf0185d" ], + "x-ms-request-id": [ "3764cb2a-8bfa-42af-94f2-4556e6e79a43" ], + "x-ms-correlation-request-id": [ "3764cb2a-8bfa-42af-94f2-4556e6e79a43" ], + "x-ms-routing-request-id": [ "NORTHEUROPE:20230214T115910Z:3764cb2a-8bfa-42af-94f2-4556e6e79a43" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Tue, 06 Sep 2022 14:53:17 GMT" ] + "Date": [ "Tue, 14 Feb 2023 11:59:10 GMT" ] }, "ContentHeaders": { "Content-Length": [ "491" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"value\":[{\"id\":\"/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourcegroups/fic-rg-1znoxkhq/providers/Microsoft.ManagedIdentity/userAssignedIdentities/fic-identity-ws41z9/federatedIdentityCredentials/fic-27zqjk\",\"name\":\"fic-27zqjk\",\"type\":\"Microsoft.ManagedIdentity/userAssignedIdentities/federatedIdentityCredentials\",\"properties\":{\"issuer\":\"https://kubernetes-oauth.azure.mpxq2a\",\"subject\":\"system:serviceaccount:ns:svcaccount-5iaowt\",\"audiences\":[\"api://AzureADTokenExchange\"]}}]}", + "Content": "{\"value\":[{\"id\":\"/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourcegroups/fic-rg-49ei1m3y/providers/Microsoft.ManagedIdentity/userAssignedIdentities/fic-identity-oqecha/federatedIdentityCredentials/fic-mdkys2\",\"name\":\"fic-mdkys2\",\"type\":\"Microsoft.ManagedIdentity/userAssignedIdentities/federatedIdentityCredentials\",\"properties\":{\"issuer\":\"https://kubernetes-oauth.azure.pc6txw\",\"subject\":\"system:serviceaccount:ns:svcaccount-dq1fse\",\"audiences\":[\"api://AzureADTokenExchange\"]}}]}", "isContentBase64": false } }, - "Get-AzFederatedIdentityCredentials+[NoContext]+Get+$GET+https://management.azure.com/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourceGroups/fic-rg-1znoxkhq/providers/Microsoft.ManagedIdentity/userAssignedIdentities/fic-identity-ws41z9/federatedIdentityCredentials/fic-27zqjk?api-version=2022-01-31-preview+1": { + "Get-AzFederatedIdentityCredentials+[NoContext]+Get+$GET+https://management.azure.com/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourceGroups/fic-rg-49ei1m3y/providers/Microsoft.ManagedIdentity/userAssignedIdentities/fic-identity-oqecha/federatedIdentityCredentials/fic-mdkys2?api-version=2023-01-31+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourceGroups/fic-rg-1znoxkhq/providers/Microsoft.ManagedIdentity/userAssignedIdentities/fic-identity-ws41z9/federatedIdentityCredentials/fic-27zqjk?api-version=2022-01-31-preview", + "RequestUri": "https://management.azure.com/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourceGroups/fic-rg-49ei1m3y/providers/Microsoft.ManagedIdentity/userAssignedIdentities/fic-identity-oqecha/federatedIdentityCredentials/fic-mdkys2?api-version=2023-01-31", "Content": null, "isContentBase64": false, "Headers": { "x-ms-unique-id": [ "17" ], - "x-ms-client-request-id": [ "eb271540-4441-491a-a2d7-3b6bdc13a285" ], + "x-ms-client-request-id": [ "7babf4de-ff7f-45bd-950b-063f6e998d91" ], "CommandName": [ "Get-AzFederatedIdentityCredentials" ], "FullCommandName": [ "Get-AzFederatedIdentityCredentials_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ManagedServiceIdentity/0.2.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ManagedServiceIdentity/0.3.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -64,34 +64,34 @@ "Pragma": [ "no-cache" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], - "x-ms-request-id": [ "c0416b11-90cd-43b1-abd3-a2ab1329fc7b" ], - "x-ms-correlation-request-id": [ "c0416b11-90cd-43b1-abd3-a2ab1329fc7b" ], - "x-ms-routing-request-id": [ "NORTHEUROPE:20220906T145317Z:c0416b11-90cd-43b1-abd3-a2ab1329fc7b" ], + "x-ms-request-id": [ "0b1c5420-2956-43e6-80f1-95eebc20e208" ], + "x-ms-correlation-request-id": [ "0b1c5420-2956-43e6-80f1-95eebc20e208" ], + "x-ms-routing-request-id": [ "NORTHEUROPE:20230214T115910Z:0b1c5420-2956-43e6-80f1-95eebc20e208" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Tue, 06 Sep 2022 14:53:17 GMT" ] + "Date": [ "Tue, 14 Feb 2023 11:59:10 GMT" ] }, "ContentHeaders": { "Content-Length": [ "479" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourcegroups/fic-rg-1znoxkhq/providers/Microsoft.ManagedIdentity/userAssignedIdentities/fic-identity-ws41z9/federatedIdentityCredentials/fic-27zqjk\",\"name\":\"fic-27zqjk\",\"type\":\"Microsoft.ManagedIdentity/userAssignedIdentities/federatedIdentityCredentials\",\"properties\":{\"issuer\":\"https://kubernetes-oauth.azure.mpxq2a\",\"subject\":\"system:serviceaccount:ns:svcaccount-5iaowt\",\"audiences\":[\"api://AzureADTokenExchange\"]}}", + "Content": "{\"id\":\"/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourcegroups/fic-rg-49ei1m3y/providers/Microsoft.ManagedIdentity/userAssignedIdentities/fic-identity-oqecha/federatedIdentityCredentials/fic-mdkys2\",\"name\":\"fic-mdkys2\",\"type\":\"Microsoft.ManagedIdentity/userAssignedIdentities/federatedIdentityCredentials\",\"properties\":{\"issuer\":\"https://kubernetes-oauth.azure.pc6txw\",\"subject\":\"system:serviceaccount:ns:svcaccount-dq1fse\",\"audiences\":[\"api://AzureADTokenExchange\"]}}", "isContentBase64": false } }, - "Get-AzFederatedIdentityCredentials+[NoContext]+GetViaIdentity+$GET+https://management.azure.com/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourceGroups/fic-rg-1znoxkhq/providers/Microsoft.ManagedIdentity/userAssignedIdentities/fic-identity-ws41z9/federatedIdentityCredentials/fic-27zqjk?api-version=2022-01-31-preview+1": { + "Get-AzFederatedIdentityCredentials+[NoContext]+GetViaIdentity+$GET+https://management.azure.com/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourceGroups/fic-rg-49ei1m3y/providers/Microsoft.ManagedIdentity/userAssignedIdentities/fic-identity-oqecha/federatedIdentityCredentials/fic-mdkys2?api-version=2023-01-31+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourceGroups/fic-rg-1znoxkhq/providers/Microsoft.ManagedIdentity/userAssignedIdentities/fic-identity-ws41z9/federatedIdentityCredentials/fic-27zqjk?api-version=2022-01-31-preview", + "RequestUri": "https://management.azure.com/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourceGroups/fic-rg-49ei1m3y/providers/Microsoft.ManagedIdentity/userAssignedIdentities/fic-identity-oqecha/federatedIdentityCredentials/fic-mdkys2?api-version=2023-01-31", "Content": null, "isContentBase64": false, "Headers": { "x-ms-unique-id": [ "18" ], - "x-ms-client-request-id": [ "f847c8e1-73ab-4a8b-a02b-0a93dd89575d" ], + "x-ms-client-request-id": [ "42b4a10e-81b6-4323-ae41-a2d863e4683e" ], "CommandName": [ "Get-AzFederatedIdentityCredentials" ], "FullCommandName": [ "Get-AzFederatedIdentityCredentials_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ManagedServiceIdentity/0.2.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ManagedServiceIdentity/0.3.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -104,34 +104,34 @@ "Pragma": [ "no-cache" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], - "x-ms-request-id": [ "3765410d-8698-4aa2-9aba-dbf68e3c5497" ], - "x-ms-correlation-request-id": [ "3765410d-8698-4aa2-9aba-dbf68e3c5497" ], - "x-ms-routing-request-id": [ "NORTHEUROPE:20220906T145318Z:3765410d-8698-4aa2-9aba-dbf68e3c5497" ], + "x-ms-request-id": [ "f34c6034-de04-45c6-8c61-9ec53d921638" ], + "x-ms-correlation-request-id": [ "f34c6034-de04-45c6-8c61-9ec53d921638" ], + "x-ms-routing-request-id": [ "NORTHEUROPE:20230214T115911Z:f34c6034-de04-45c6-8c61-9ec53d921638" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Tue, 06 Sep 2022 14:53:17 GMT" ] + "Date": [ "Tue, 14 Feb 2023 11:59:10 GMT" ] }, "ContentHeaders": { "Content-Length": [ "479" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourcegroups/fic-rg-1znoxkhq/providers/Microsoft.ManagedIdentity/userAssignedIdentities/fic-identity-ws41z9/federatedIdentityCredentials/fic-27zqjk\",\"name\":\"fic-27zqjk\",\"type\":\"Microsoft.ManagedIdentity/userAssignedIdentities/federatedIdentityCredentials\",\"properties\":{\"issuer\":\"https://kubernetes-oauth.azure.mpxq2a\",\"subject\":\"system:serviceaccount:ns:svcaccount-5iaowt\",\"audiences\":[\"api://AzureADTokenExchange\"]}}", + "Content": "{\"id\":\"/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourcegroups/fic-rg-49ei1m3y/providers/Microsoft.ManagedIdentity/userAssignedIdentities/fic-identity-oqecha/federatedIdentityCredentials/fic-mdkys2\",\"name\":\"fic-mdkys2\",\"type\":\"Microsoft.ManagedIdentity/userAssignedIdentities/federatedIdentityCredentials\",\"properties\":{\"issuer\":\"https://kubernetes-oauth.azure.pc6txw\",\"subject\":\"system:serviceaccount:ns:svcaccount-dq1fse\",\"audiences\":[\"api://AzureADTokenExchange\"]}}", "isContentBase64": false } }, - "Get-AzFederatedIdentityCredentials+[NoContext]+GetViaIdentity+$GET+https://management.azure.com/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourceGroups/fic-rg-1znoxkhq/providers/Microsoft.ManagedIdentity/userAssignedIdentities/fic-identity-ws41z9/federatedIdentityCredentials/fic-27zqjk?api-version=2022-01-31-preview+2": { + "Get-AzFederatedIdentityCredentials+[NoContext]+GetViaIdentity+$GET+https://management.azure.com/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourceGroups/fic-rg-49ei1m3y/providers/Microsoft.ManagedIdentity/userAssignedIdentities/fic-identity-oqecha/federatedIdentityCredentials/fic-mdkys2?api-version=2023-01-31+2": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourceGroups/fic-rg-1znoxkhq/providers/Microsoft.ManagedIdentity/userAssignedIdentities/fic-identity-ws41z9/federatedIdentityCredentials/fic-27zqjk?api-version=2022-01-31-preview", + "RequestUri": "https://management.azure.com/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourceGroups/fic-rg-49ei1m3y/providers/Microsoft.ManagedIdentity/userAssignedIdentities/fic-identity-oqecha/federatedIdentityCredentials/fic-mdkys2?api-version=2023-01-31", "Content": null, "isContentBase64": false, "Headers": { "x-ms-unique-id": [ "19" ], - "x-ms-client-request-id": [ "189cc257-55e4-4a8e-b0ec-a422030bf6f2" ], + "x-ms-client-request-id": [ "ac6b7d1f-2d63-486a-931f-dcea2c79aeee" ], "CommandName": [ "Get-AzFederatedIdentityCredentials" ], "FullCommandName": [ "Get-AzFederatedIdentityCredentials_GetViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ManagedServiceIdentity/0.2.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ManagedServiceIdentity/0.3.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -144,18 +144,18 @@ "Pragma": [ "no-cache" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], - "x-ms-request-id": [ "eb053b1d-0fef-484a-89d7-7a2b5eaa66bb" ], - "x-ms-correlation-request-id": [ "eb053b1d-0fef-484a-89d7-7a2b5eaa66bb" ], - "x-ms-routing-request-id": [ "NORTHEUROPE:20220906T145318Z:eb053b1d-0fef-484a-89d7-7a2b5eaa66bb" ], + "x-ms-request-id": [ "f451404a-dc4c-4231-8f41-61fc5a856076" ], + "x-ms-correlation-request-id": [ "f451404a-dc4c-4231-8f41-61fc5a856076" ], + "x-ms-routing-request-id": [ "NORTHEUROPE:20230214T115911Z:f451404a-dc4c-4231-8f41-61fc5a856076" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Tue, 06 Sep 2022 14:53:17 GMT" ] + "Date": [ "Tue, 14 Feb 2023 11:59:11 GMT" ] }, "ContentHeaders": { "Content-Length": [ "479" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourcegroups/fic-rg-1znoxkhq/providers/Microsoft.ManagedIdentity/userAssignedIdentities/fic-identity-ws41z9/federatedIdentityCredentials/fic-27zqjk\",\"name\":\"fic-27zqjk\",\"type\":\"Microsoft.ManagedIdentity/userAssignedIdentities/federatedIdentityCredentials\",\"properties\":{\"issuer\":\"https://kubernetes-oauth.azure.mpxq2a\",\"subject\":\"system:serviceaccount:ns:svcaccount-5iaowt\",\"audiences\":[\"api://AzureADTokenExchange\"]}}", + "Content": "{\"id\":\"/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourcegroups/fic-rg-49ei1m3y/providers/Microsoft.ManagedIdentity/userAssignedIdentities/fic-identity-oqecha/federatedIdentityCredentials/fic-mdkys2\",\"name\":\"fic-mdkys2\",\"type\":\"Microsoft.ManagedIdentity/userAssignedIdentities/federatedIdentityCredentials\",\"properties\":{\"issuer\":\"https://kubernetes-oauth.azure.pc6txw\",\"subject\":\"system:serviceaccount:ns:svcaccount-dq1fse\",\"audiences\":[\"api://AzureADTokenExchange\"]}}", "isContentBase64": false } } diff --git a/src/ManagedServiceIdentity/test/Get-AzSystemAssignedIdentity.Recording.json b/src/ManagedServiceIdentity/test/Get-AzSystemAssignedIdentity.Recording.json index 5ec484009e36..3d6ee0827a3b 100644 --- a/src/ManagedServiceIdentity/test/Get-AzSystemAssignedIdentity.Recording.json +++ b/src/ManagedServiceIdentity/test/Get-AzSystemAssignedIdentity.Recording.json @@ -1,17 +1,17 @@ { - "Get-AzSystemAssignedIdentity+[NoContext]+Get+$GET+https://management.azure.com//subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourceGroups/identity-jvsqdw9r/providers/Microsoft.Web/sites/appServicegf62n9/providers/Microsoft.ManagedIdentity/identities/default?api-version=2022-01-31-preview+1": { + "Get-AzSystemAssignedIdentity+[NoContext]+Get+$GET+https://management.azure.com//subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourceGroups/identity-wmbx18cj/providers/Microsoft.Web/sites/appService1l9p6y/providers/Microsoft.ManagedIdentity/identities/default?api-version=2023-01-31+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com//subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourceGroups/identity-jvsqdw9r/providers/Microsoft.Web/sites/appServicegf62n9/providers/Microsoft.ManagedIdentity/identities/default?api-version=2022-01-31-preview", + "RequestUri": "https://management.azure.com//subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourceGroups/identity-wmbx18cj/providers/Microsoft.Web/sites/appService1l9p6y/providers/Microsoft.ManagedIdentity/identities/default?api-version=2023-01-31", "Content": null, "isContentBase64": false, "Headers": { "x-ms-unique-id": [ "20" ], - "x-ms-client-request-id": [ "58cd7465-2806-49b3-ba48-c3597570e448" ], + "x-ms-client-request-id": [ "e906951f-29fd-43c9-bf1a-458a8d481193" ], "CommandName": [ "Get-AzSystemAssignedIdentity" ], "FullCommandName": [ "Get-AzSystemAssignedIdentity_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ManagedServiceIdentity/0.2.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ManagedServiceIdentity/0.3.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -24,18 +24,18 @@ "Pragma": [ "no-cache" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "x-ms-ratelimit-remaining-subscription-reads": [ "11995" ], - "x-ms-request-id": [ "28c07cdf-61a1-4b5f-bb8a-ee3076ed5eb6" ], - "x-ms-correlation-request-id": [ "28c07cdf-61a1-4b5f-bb8a-ee3076ed5eb6" ], - "x-ms-routing-request-id": [ "NORTHEUROPE:20220906T145321Z:28c07cdf-61a1-4b5f-bb8a-ee3076ed5eb6" ], + "x-ms-request-id": [ "f15eb87f-7c67-4314-80a3-07d40392b53c" ], + "x-ms-correlation-request-id": [ "f15eb87f-7c67-4314-80a3-07d40392b53c" ], + "x-ms-routing-request-id": [ "NORTHEUROPE:20230214T115914Z:f15eb87f-7c67-4314-80a3-07d40392b53c" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Tue, 06 Sep 2022 14:53:20 GMT" ] + "Date": [ "Tue, 14 Feb 2023 11:59:14 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "748" ], + "Content-Length": [ "850" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourcegroups/identity-jvsqdw9r/providers/Microsoft.Web/sites/appServicegf62n9\",\"name\":\"appServicegf62n9\",\"type\":\"Microsoft.Web/sites\",\"location\":\"centralus\",\"tags\":{},\"properties\":{\"tenantId\":\"a66b4d27-b1b3-4b60-8b06-7fb4fd05bc3c\",\"principalId\":\"c3b22b4d-baac-44ed-8302-0713b62b6ea6\",\"clientId\":\"ef6f3430-be96-43d9-9863-4b4aee2398c9\",\"clientSecretUrl\":\"https://control-centralus.identity.azure.net/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourcegroups/identity-jvsqdw9r/providers/Microsoft.Web/sites/appServicegf62n9/credentials/v2/systemassigned?arpid=f80411fa-4f14-49e2-a287-28d88b442ff9\u0026said=ef6f3430-be96-43d9-9863-4b4aee2398c9\u0026tid=a66b4d27-b1b3-4b60-8b06-7fb4fd05bc3c\"}}", + "Content": "{\"id\":\"/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourcegroups/identity-wmbx18cj/providers/Microsoft.Web/sites/appService1l9p6y\",\"name\":\"appService1l9p6y\",\"type\":\"Microsoft.Web/sites\",\"location\":\"centralus\",\"tags\":{},\"properties\":{\"tenantId\":\"a66b4d27-b1b3-4b60-8b06-7fb4fd05bc3c\",\"principalId\":\"cda245ef-1dec-461b-b6d6-45aee84d00b9\",\"clientId\":\"8ceb1a81-313a-4002-9b19-dd65d111ed6a\",\"clientSecretUrl\":\"https://control-centralus.identity.azure.net/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourcegroups/identity-wmbx18cj/providers/Microsoft.Web/sites/appService1l9p6y/credentials/v2/systemassigned?arpid=e8a564bd-4502-4d52-8e6a-c47326b26ca0\u0026keyid=17cb9791-9a20-43b8-8a0a-194a071c3ef1\u0026said=8ceb1a81-313a-4002-9b19-dd65d111ed6a\u0026sigver=1.0\u0026tid=a66b4d27-b1b3-4b60-8b06-7fb4fd05bc3c\u0026sig=88fVqjikhlFGVyXH_Bx7QnKauxe2UJp8lxF1_PBVZ9I\"}}", "isContentBase64": false } } diff --git a/src/ManagedServiceIdentity/test/Get-AzUserAssignedIdentity.Recording.json b/src/ManagedServiceIdentity/test/Get-AzUserAssignedIdentity.Recording.json index 1f5dbbe98c4d..7bf92dcf3e1f 100644 --- a/src/ManagedServiceIdentity/test/Get-AzUserAssignedIdentity.Recording.json +++ b/src/ManagedServiceIdentity/test/Get-AzUserAssignedIdentity.Recording.json @@ -1,17 +1,17 @@ { - "Get-AzUserAssignedIdentity+[NoContext]+List+$GET+https://management.azure.com/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/providers/Microsoft.ManagedIdentity/userAssignedIdentities?api-version=2022-01-31-preview+1": { + "Get-AzUserAssignedIdentity+[NoContext]+List+$GET+https://management.azure.com/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/providers/Microsoft.ManagedIdentity/userAssignedIdentities?api-version=2023-01-31+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/providers/Microsoft.ManagedIdentity/userAssignedIdentities?api-version=2022-01-31-preview", + "RequestUri": "https://management.azure.com/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/providers/Microsoft.ManagedIdentity/userAssignedIdentities?api-version=2023-01-31", "Content": null, "isContentBase64": false, "Headers": { "x-ms-unique-id": [ "21" ], - "x-ms-client-request-id": [ "e8c88d19-ef42-4ca0-9488-97c6c0223c31" ], + "x-ms-client-request-id": [ "e86de982-e7e7-4b5b-9d76-c0d7635c7f20" ], "CommandName": [ "Get-AzUserAssignedIdentity" ], "FullCommandName": [ "Get-AzUserAssignedIdentity_List" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ManagedServiceIdentity/0.2.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ManagedServiceIdentity/0.3.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -22,37 +22,37 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-original-request-ids": [ "", "" ], + "x-ms-original-request-ids": [ "", "", "" ], "x-ms-ratelimit-remaining-subscription-reads": [ "11994" ], - "x-ms-request-id": [ "fe7bcd05-6c18-473f-bfad-50db47acddb6" ], - "x-ms-correlation-request-id": [ "fe7bcd05-6c18-473f-bfad-50db47acddb6" ], - "x-ms-routing-request-id": [ "NORTHEUROPE:20220906T145323Z:fe7bcd05-6c18-473f-bfad-50db47acddb6" ], + "x-ms-request-id": [ "b90eed3d-eb81-486e-b99c-6c371336217e" ], + "x-ms-correlation-request-id": [ "b90eed3d-eb81-486e-b99c-6c371336217e" ], + "x-ms-routing-request-id": [ "NORTHEUROPE:20230214T115917Z:b90eed3d-eb81-486e-b99c-6c371336217e" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Tue, 06 Sep 2022 14:53:23 GMT" ] + "Date": [ "Tue, 14 Feb 2023 11:59:17 GMT" ] }, "ContentHeaders": { "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ], - "Content-Length": [ "1811" ] + "Content-Length": [ "3539" ] }, - "Content": "{\"value\":[{\"id\":\"/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourcegroups/ar-rg-8or9dp5v/providers/Microsoft.ManagedIdentity/userAssignedIdentities/ar-identity6al5po\",\"name\":\"ar-identity6al5po\",\"type\":\"Microsoft.ManagedIdentity/userAssignedIdentities\",\"location\":\"centralus\",\"tags\":{},\"properties\":{\"tenantId\":\"a66b4d27-b1b3-4b60-8b06-7fb4fd05bc3c\",\"principalId\":\"8b30b04e-ebab-4a3e-93ad-459352ad3bc7\",\"clientId\":\"9ecc6987-94a0-4548-8855-4b0c4fbddd72\"}},{\"id\":\"/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourcegroups/identity-jvsqdw9r/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityhknlo4\",\"name\":\"identityhknlo4\",\"type\":\"Microsoft.ManagedIdentity/userAssignedIdentities\",\"location\":\"centralus\",\"tags\":{},\"properties\":{\"tenantId\":\"a66b4d27-b1b3-4b60-8b06-7fb4fd05bc3c\",\"principalId\":\"9da8a443-1b0d-4aec-97df-d0b13d0c1903\",\"clientId\":\"44f98dd3-e1f6-4fe6-9579-5fb55a0f4603\"}},{\"id\":\"/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourcegroups/fic-rg-1znoxkhq/providers/Microsoft.ManagedIdentity/userAssignedIdentities/fic-identity-ws41z9\",\"name\":\"fic-identity-ws41z9\",\"type\":\"Microsoft.ManagedIdentity/userAssignedIdentities\",\"location\":\"centralus\",\"tags\":{},\"properties\":{\"tenantId\":\"a66b4d27-b1b3-4b60-8b06-7fb4fd05bc3c\",\"principalId\":\"f98073fd-478e-4df6-b4b0-e10b9bd84d59\",\"clientId\":\"13c13c73-1b75-4691-9211-8eacf98ee7e8\"}},{\"id\":\"/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourcegroups/azure-rg-test/providers/Microsoft.ManagedIdentity/userAssignedIdentities/uai-pwsh01\",\"name\":\"uai-pwsh01\",\"type\":\"Microsoft.ManagedIdentity/userAssignedIdentities\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"tenantId\":\"a66b4d27-b1b3-4b60-8b06-7fb4fd05bc3c\",\"principalId\":\"cea5a8bd-7c86-467f-9362-1d5eb33177d7\",\"clientId\":\"aaa729d1-4545-4472-8ffc-2bd64fcdea90\"}}]}", + "Content": "{\"value\":[{\"id\":\"/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourcegroups/azure-rg-test/providers/Microsoft.ManagedIdentity/userAssignedIdentities/fic_demo2\",\"name\":\"fic_demo2\",\"type\":\"Microsoft.ManagedIdentity/userAssignedIdentities\",\"location\":\"westeurope\",\"tags\":{},\"properties\":{\"tenantId\":\"a66b4d27-b1b3-4b60-8b06-7fb4fd05bc3c\",\"principalId\":\"e1646919-c812-4dd2-abfe-1ef397774a4d\",\"clientId\":\"0042e980-9700-4889-8760-85cd8dabd79d\"}},{\"id\":\"/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourcegroups/azure-rg-test/providers/Microsoft.ManagedIdentity/userAssignedIdentities/222\",\"name\":\"222\",\"type\":\"Microsoft.ManagedIdentity/userAssignedIdentities\",\"location\":\"westeurope\",\"tags\":{},\"properties\":{\"tenantId\":\"a66b4d27-b1b3-4b60-8b06-7fb4fd05bc3c\",\"principalId\":\"fe07b70f-4cbb-4abd-8c2f-a3714eea71c6\",\"clientId\":\"34564bda-c03b-4106-827f-de8c6e3abd96\"}},{\"id\":\"/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourcegroups/azure-rg-test/providers/Microsoft.ManagedIdentity/userAssignedIdentities/111\",\"name\":\"111\",\"type\":\"Microsoft.ManagedIdentity/userAssignedIdentities\",\"location\":\"westeurope\",\"tags\":{},\"properties\":{\"tenantId\":\"a66b4d27-b1b3-4b60-8b06-7fb4fd05bc3c\",\"principalId\":\"dea3ce9d-dceb-4cf8-8329-d0b2a388d315\",\"clientId\":\"7a3976b2-863d-4f36-b799-65e8f22d3074\"}},{\"id\":\"/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourcegroups/ar-rg-xh7yipq8/providers/Microsoft.ManagedIdentity/userAssignedIdentities/ar-identityidcz62\",\"name\":\"ar-identityidcz62\",\"type\":\"Microsoft.ManagedIdentity/userAssignedIdentities\",\"location\":\"centralus\",\"tags\":{},\"properties\":{\"tenantId\":\"a66b4d27-b1b3-4b60-8b06-7fb4fd05bc3c\",\"principalId\":\"dfb06393-1822-4980-8f81-429007e3b4d9\",\"clientId\":\"6a434ba1-d5a8-425a-8d42-c5ff05988655\"}},{\"id\":\"/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourcegroups/identity-wmbx18cj/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identitybsw8q5\",\"name\":\"identitybsw8q5\",\"type\":\"Microsoft.ManagedIdentity/userAssignedIdentities\",\"location\":\"centralus\",\"tags\":{},\"properties\":{\"tenantId\":\"a66b4d27-b1b3-4b60-8b06-7fb4fd05bc3c\",\"principalId\":\"84d62ad1-cb0e-4c7f-b7c8-d716357ad438\",\"clientId\":\"40fc1be0-c9b4-44c1-8fe2-17463294f35c\"}},{\"id\":\"/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourcegroups/fic-rg-49ei1m3y/providers/Microsoft.ManagedIdentity/userAssignedIdentities/fic-identity-oqecha\",\"name\":\"fic-identity-oqecha\",\"type\":\"Microsoft.ManagedIdentity/userAssignedIdentities\",\"location\":\"centralus\",\"tags\":{},\"properties\":{\"tenantId\":\"a66b4d27-b1b3-4b60-8b06-7fb4fd05bc3c\",\"principalId\":\"12943eb2-b43a-42df-a74b-d20e82d0e317\",\"clientId\":\"b7f2faec-c383-4408-b7b3-52b51dbd113d\"}},{\"id\":\"/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourcegroups/azure-rg-test/providers/Microsoft.ManagedIdentity/userAssignedIdentities/uai-pwsh01\",\"name\":\"uai-pwsh01\",\"type\":\"Microsoft.ManagedIdentity/userAssignedIdentities\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"tenantId\":\"a66b4d27-b1b3-4b60-8b06-7fb4fd05bc3c\",\"principalId\":\"cea5a8bd-7c86-467f-9362-1d5eb33177d7\",\"clientId\":\"aaa729d1-4545-4472-8ffc-2bd64fcdea90\"}},{\"id\":\"/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourcegroups/azure-rg-test/providers/Microsoft.ManagedIdentity/userAssignedIdentities/parent_uami\",\"name\":\"parent_uami\",\"type\":\"Microsoft.ManagedIdentity/userAssignedIdentities\",\"location\":\"eastus\",\"tags\":{},\"properties\":{\"tenantId\":\"a66b4d27-b1b3-4b60-8b06-7fb4fd05bc3c\",\"principalId\":\"c847f856-3bb8-4979-a131-b35eb2a38eed\",\"clientId\":\"16aa9657-aff6-49b2-8f48-8d63dfd86423\"}}]}", "isContentBase64": false } }, - "Get-AzUserAssignedIdentity+[NoContext]+Get+$GET+https://management.azure.com/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourceGroups/identity-jvsqdw9r/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityhknlo4?api-version=2022-01-31-preview+1": { + "Get-AzUserAssignedIdentity+[NoContext]+Get+$GET+https://management.azure.com/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourceGroups/identity-wmbx18cj/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identitybsw8q5?api-version=2023-01-31+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourceGroups/identity-jvsqdw9r/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityhknlo4?api-version=2022-01-31-preview", + "RequestUri": "https://management.azure.com/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourceGroups/identity-wmbx18cj/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identitybsw8q5?api-version=2023-01-31", "Content": null, "isContentBase64": false, "Headers": { "x-ms-unique-id": [ "22" ], - "x-ms-client-request-id": [ "11608356-96f0-49cc-8292-938c8c16bbf2" ], + "x-ms-client-request-id": [ "3ea71150-ca56-43f1-820c-9f3a893be3fe" ], "CommandName": [ "Get-AzUserAssignedIdentity" ], "FullCommandName": [ "Get-AzUserAssignedIdentity_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ManagedServiceIdentity/0.2.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ManagedServiceIdentity/0.3.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -65,34 +65,34 @@ "Pragma": [ "no-cache" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "x-ms-ratelimit-remaining-subscription-reads": [ "11993" ], - "x-ms-request-id": [ "42d184bc-540c-4ba7-8a25-87ecfaf15301" ], - "x-ms-correlation-request-id": [ "42d184bc-540c-4ba7-8a25-87ecfaf15301" ], - "x-ms-routing-request-id": [ "NORTHEUROPE:20220906T145324Z:42d184bc-540c-4ba7-8a25-87ecfaf15301" ], + "x-ms-request-id": [ "7c52bd6f-6828-44ee-be5a-ee1b1d220fd2" ], + "x-ms-correlation-request-id": [ "7c52bd6f-6828-44ee-be5a-ee1b1d220fd2" ], + "x-ms-routing-request-id": [ "NORTHEUROPE:20230214T115917Z:7c52bd6f-6828-44ee-be5a-ee1b1d220fd2" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Tue, 06 Sep 2022 14:53:23 GMT" ] + "Date": [ "Tue, 14 Feb 2023 11:59:17 GMT" ] }, "ContentHeaders": { "Content-Length": [ "450" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourcegroups/identity-jvsqdw9r/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityhknlo4\",\"name\":\"identityhknlo4\",\"type\":\"Microsoft.ManagedIdentity/userAssignedIdentities\",\"location\":\"centralus\",\"tags\":{},\"properties\":{\"tenantId\":\"a66b4d27-b1b3-4b60-8b06-7fb4fd05bc3c\",\"principalId\":\"9da8a443-1b0d-4aec-97df-d0b13d0c1903\",\"clientId\":\"44f98dd3-e1f6-4fe6-9579-5fb55a0f4603\"}}", + "Content": "{\"id\":\"/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourcegroups/identity-wmbx18cj/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identitybsw8q5\",\"name\":\"identitybsw8q5\",\"type\":\"Microsoft.ManagedIdentity/userAssignedIdentities\",\"location\":\"centralus\",\"tags\":{},\"properties\":{\"tenantId\":\"a66b4d27-b1b3-4b60-8b06-7fb4fd05bc3c\",\"principalId\":\"84d62ad1-cb0e-4c7f-b7c8-d716357ad438\",\"clientId\":\"40fc1be0-c9b4-44c1-8fe2-17463294f35c\"}}", "isContentBase64": false } }, - "Get-AzUserAssignedIdentity+[NoContext]+List1+$GET+https://management.azure.com/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourceGroups/identity-jvsqdw9r/providers/Microsoft.ManagedIdentity/userAssignedIdentities?api-version=2022-01-31-preview+1": { + "Get-AzUserAssignedIdentity+[NoContext]+List1+$GET+https://management.azure.com/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourceGroups/identity-wmbx18cj/providers/Microsoft.ManagedIdentity/userAssignedIdentities?api-version=2023-01-31+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourceGroups/identity-jvsqdw9r/providers/Microsoft.ManagedIdentity/userAssignedIdentities?api-version=2022-01-31-preview", + "RequestUri": "https://management.azure.com/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourceGroups/identity-wmbx18cj/providers/Microsoft.ManagedIdentity/userAssignedIdentities?api-version=2023-01-31", "Content": null, "isContentBase64": false, "Headers": { "x-ms-unique-id": [ "23" ], - "x-ms-client-request-id": [ "b9ef1371-03dc-4d01-8629-548d4a21a639" ], + "x-ms-client-request-id": [ "e4b49ee6-ab11-4d7b-a234-4794286f73ac" ], "CommandName": [ "Get-AzUserAssignedIdentity" ], "FullCommandName": [ "Get-AzUserAssignedIdentity_List1" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ManagedServiceIdentity/0.2.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ManagedServiceIdentity/0.3.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -105,34 +105,34 @@ "Pragma": [ "no-cache" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "x-ms-ratelimit-remaining-subscription-reads": [ "11992" ], - "x-ms-request-id": [ "f2c39390-d92c-42be-908e-262c70273a6d" ], - "x-ms-correlation-request-id": [ "f2c39390-d92c-42be-908e-262c70273a6d" ], - "x-ms-routing-request-id": [ "NORTHEUROPE:20220906T145325Z:f2c39390-d92c-42be-908e-262c70273a6d" ], + "x-ms-request-id": [ "2fb56012-6e68-4673-a614-33ceeb58a2d2" ], + "x-ms-correlation-request-id": [ "2fb56012-6e68-4673-a614-33ceeb58a2d2" ], + "x-ms-routing-request-id": [ "NORTHEUROPE:20230214T115918Z:2fb56012-6e68-4673-a614-33ceeb58a2d2" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Tue, 06 Sep 2022 14:53:24 GMT" ] + "Date": [ "Tue, 14 Feb 2023 11:59:17 GMT" ] }, "ContentHeaders": { "Content-Length": [ "462" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"value\":[{\"id\":\"/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourcegroups/identity-jvsqdw9r/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityhknlo4\",\"name\":\"identityhknlo4\",\"type\":\"Microsoft.ManagedIdentity/userAssignedIdentities\",\"location\":\"centralus\",\"tags\":{},\"properties\":{\"tenantId\":\"a66b4d27-b1b3-4b60-8b06-7fb4fd05bc3c\",\"principalId\":\"9da8a443-1b0d-4aec-97df-d0b13d0c1903\",\"clientId\":\"44f98dd3-e1f6-4fe6-9579-5fb55a0f4603\"}}]}", + "Content": "{\"value\":[{\"id\":\"/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourcegroups/identity-wmbx18cj/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identitybsw8q5\",\"name\":\"identitybsw8q5\",\"type\":\"Microsoft.ManagedIdentity/userAssignedIdentities\",\"location\":\"centralus\",\"tags\":{},\"properties\":{\"tenantId\":\"a66b4d27-b1b3-4b60-8b06-7fb4fd05bc3c\",\"principalId\":\"84d62ad1-cb0e-4c7f-b7c8-d716357ad438\",\"clientId\":\"40fc1be0-c9b4-44c1-8fe2-17463294f35c\"}}]}", "isContentBase64": false } }, - "Get-AzUserAssignedIdentity+[NoContext]+GetViaIdentity+$GET+https://management.azure.com/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourceGroups/identity-jvsqdw9r/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityhknlo4?api-version=2022-01-31-preview+1": { + "Get-AzUserAssignedIdentity+[NoContext]+GetViaIdentity+$GET+https://management.azure.com/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourceGroups/identity-wmbx18cj/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identitybsw8q5?api-version=2023-01-31+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourceGroups/identity-jvsqdw9r/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityhknlo4?api-version=2022-01-31-preview", + "RequestUri": "https://management.azure.com/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourceGroups/identity-wmbx18cj/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identitybsw8q5?api-version=2023-01-31", "Content": null, "isContentBase64": false, "Headers": { "x-ms-unique-id": [ "24" ], - "x-ms-client-request-id": [ "a2eb7593-f571-4a56-b8f8-e8da2ae653dc" ], + "x-ms-client-request-id": [ "859e340f-ab0b-4450-afdb-c79f7aa87628" ], "CommandName": [ "Get-AzUserAssignedIdentity" ], "FullCommandName": [ "Get-AzUserAssignedIdentity_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ManagedServiceIdentity/0.2.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ManagedServiceIdentity/0.3.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -145,34 +145,34 @@ "Pragma": [ "no-cache" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "x-ms-ratelimit-remaining-subscription-reads": [ "11991" ], - "x-ms-request-id": [ "c27cac0b-915e-41f5-97d9-6b60846f8bd6" ], - "x-ms-correlation-request-id": [ "c27cac0b-915e-41f5-97d9-6b60846f8bd6" ], - "x-ms-routing-request-id": [ "NORTHEUROPE:20220906T145325Z:c27cac0b-915e-41f5-97d9-6b60846f8bd6" ], + "x-ms-request-id": [ "0917a592-6259-4024-8cc4-06df599120a1" ], + "x-ms-correlation-request-id": [ "0917a592-6259-4024-8cc4-06df599120a1" ], + "x-ms-routing-request-id": [ "NORTHEUROPE:20230214T115918Z:0917a592-6259-4024-8cc4-06df599120a1" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Tue, 06 Sep 2022 14:53:24 GMT" ] + "Date": [ "Tue, 14 Feb 2023 11:59:18 GMT" ] }, "ContentHeaders": { "Content-Length": [ "450" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourcegroups/identity-jvsqdw9r/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityhknlo4\",\"name\":\"identityhknlo4\",\"type\":\"Microsoft.ManagedIdentity/userAssignedIdentities\",\"location\":\"centralus\",\"tags\":{},\"properties\":{\"tenantId\":\"a66b4d27-b1b3-4b60-8b06-7fb4fd05bc3c\",\"principalId\":\"9da8a443-1b0d-4aec-97df-d0b13d0c1903\",\"clientId\":\"44f98dd3-e1f6-4fe6-9579-5fb55a0f4603\"}}", + "Content": "{\"id\":\"/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourcegroups/identity-wmbx18cj/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identitybsw8q5\",\"name\":\"identitybsw8q5\",\"type\":\"Microsoft.ManagedIdentity/userAssignedIdentities\",\"location\":\"centralus\",\"tags\":{},\"properties\":{\"tenantId\":\"a66b4d27-b1b3-4b60-8b06-7fb4fd05bc3c\",\"principalId\":\"84d62ad1-cb0e-4c7f-b7c8-d716357ad438\",\"clientId\":\"40fc1be0-c9b4-44c1-8fe2-17463294f35c\"}}", "isContentBase64": false } }, - "Get-AzUserAssignedIdentity+[NoContext]+GetViaIdentity+$GET+https://management.azure.com/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourceGroups/identity-jvsqdw9r/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityhknlo4?api-version=2022-01-31-preview+2": { + "Get-AzUserAssignedIdentity+[NoContext]+GetViaIdentity+$GET+https://management.azure.com/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourceGroups/identity-wmbx18cj/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identitybsw8q5?api-version=2023-01-31+2": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourceGroups/identity-jvsqdw9r/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityhknlo4?api-version=2022-01-31-preview", + "RequestUri": "https://management.azure.com/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourceGroups/identity-wmbx18cj/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identitybsw8q5?api-version=2023-01-31", "Content": null, "isContentBase64": false, "Headers": { "x-ms-unique-id": [ "25" ], - "x-ms-client-request-id": [ "01a6914d-a792-4cd4-b4f9-166f99a3099e" ], + "x-ms-client-request-id": [ "57063a88-6d6e-4324-8c7c-e3212dd3cbe9" ], "CommandName": [ "Get-AzUserAssignedIdentity" ], "FullCommandName": [ "Get-AzUserAssignedIdentity_GetViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ManagedServiceIdentity/0.2.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ManagedServiceIdentity/0.3.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -185,18 +185,18 @@ "Pragma": [ "no-cache" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "x-ms-ratelimit-remaining-subscription-reads": [ "11990" ], - "x-ms-request-id": [ "54fef8b0-f722-4154-b99f-0c9b110c92b2" ], - "x-ms-correlation-request-id": [ "54fef8b0-f722-4154-b99f-0c9b110c92b2" ], - "x-ms-routing-request-id": [ "NORTHEUROPE:20220906T145325Z:54fef8b0-f722-4154-b99f-0c9b110c92b2" ], + "x-ms-request-id": [ "fb1889db-a639-43a3-9755-a0c739944ec1" ], + "x-ms-correlation-request-id": [ "fb1889db-a639-43a3-9755-a0c739944ec1" ], + "x-ms-routing-request-id": [ "NORTHEUROPE:20230214T115918Z:fb1889db-a639-43a3-9755-a0c739944ec1" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Tue, 06 Sep 2022 14:53:25 GMT" ] + "Date": [ "Tue, 14 Feb 2023 11:59:18 GMT" ] }, "ContentHeaders": { "Content-Length": [ "450" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourcegroups/identity-jvsqdw9r/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityhknlo4\",\"name\":\"identityhknlo4\",\"type\":\"Microsoft.ManagedIdentity/userAssignedIdentities\",\"location\":\"centralus\",\"tags\":{},\"properties\":{\"tenantId\":\"a66b4d27-b1b3-4b60-8b06-7fb4fd05bc3c\",\"principalId\":\"9da8a443-1b0d-4aec-97df-d0b13d0c1903\",\"clientId\":\"44f98dd3-e1f6-4fe6-9579-5fb55a0f4603\"}}", + "Content": "{\"id\":\"/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourcegroups/identity-wmbx18cj/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identitybsw8q5\",\"name\":\"identitybsw8q5\",\"type\":\"Microsoft.ManagedIdentity/userAssignedIdentities\",\"location\":\"centralus\",\"tags\":{},\"properties\":{\"tenantId\":\"a66b4d27-b1b3-4b60-8b06-7fb4fd05bc3c\",\"principalId\":\"84d62ad1-cb0e-4c7f-b7c8-d716357ad438\",\"clientId\":\"40fc1be0-c9b4-44c1-8fe2-17463294f35c\"}}", "isContentBase64": false } } diff --git a/src/ManagedServiceIdentity/test/Get-AzUserAssignedIdentityAssociatedResource.Recording.json b/src/ManagedServiceIdentity/test/Get-AzUserAssignedIdentityAssociatedResource.Recording.json index 4b669b759835..66b80ed2b81e 100644 --- a/src/ManagedServiceIdentity/test/Get-AzUserAssignedIdentityAssociatedResource.Recording.json +++ b/src/ManagedServiceIdentity/test/Get-AzUserAssignedIdentityAssociatedResource.Recording.json @@ -1,17 +1,17 @@ { - "Get-AzSystemAssignedIdentity+[NoContext]+Get+$POST+https://management.azure.com/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourceGroups/ar-rg-8or9dp5v/providers/Microsoft.ManagedIdentity/userAssignedIdentities/ar-identity6al5po/listAssociatedResources?api-version=2022-01-31-preview+1": { + "Get-AzSystemAssignedIdentity+[NoContext]+Get+$POST+https://management.azure.com/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourceGroups/ar-rg-xh7yipq8/providers/Microsoft.ManagedIdentity/userAssignedIdentities/ar-identityidcz62/listAssociatedResources?api-version=2022-01-31-preview+1": { "Request": { "Method": "POST", - "RequestUri": "https://management.azure.com/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourceGroups/ar-rg-8or9dp5v/providers/Microsoft.ManagedIdentity/userAssignedIdentities/ar-identity6al5po/listAssociatedResources?api-version=2022-01-31-preview", + "RequestUri": "https://management.azure.com/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourceGroups/ar-rg-xh7yipq8/providers/Microsoft.ManagedIdentity/userAssignedIdentities/ar-identityidcz62/listAssociatedResources?api-version=2022-01-31-preview", "Content": null, "isContentBase64": false, "Headers": { "x-ms-unique-id": [ "26" ], - "x-ms-client-request-id": [ "745241e9-456f-4db6-8e84-46e2f3619325" ], + "x-ms-client-request-id": [ "0afb81be-e395-4690-9030-f537062b1716" ], "CommandName": [ "Get-AzUserAssignedIdentityAssociatedResource" ], "FullCommandName": [ "Get-AzUserAssignedIdentityAssociatedResource_List" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ManagedServiceIdentity/0.2.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ManagedServiceIdentity/0.3.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -24,18 +24,18 @@ "Pragma": [ "no-cache" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "x-ms-ratelimit-remaining-subscription-reads": [ "11989" ], - "x-ms-request-id": [ "7cd777cc-3266-4801-ac53-457a5d6ff283" ], - "x-ms-correlation-request-id": [ "7cd777cc-3266-4801-ac53-457a5d6ff283" ], - "x-ms-routing-request-id": [ "NORTHEUROPE:20220906T145329Z:7cd777cc-3266-4801-ac53-457a5d6ff283" ], + "x-ms-request-id": [ "6e3271ec-181b-491a-90e2-4f84196ce502" ], + "x-ms-correlation-request-id": [ "6e3271ec-181b-491a-90e2-4f84196ce502" ], + "x-ms-routing-request-id": [ "NORTHEUROPE:20230214T115923Z:6e3271ec-181b-491a-90e2-4f84196ce502" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Tue, 06 Sep 2022 14:53:28 GMT" ] + "Date": [ "Tue, 14 Feb 2023 11:59:22 GMT" ] }, "ContentHeaders": { "Content-Length": [ "380" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"totalCount\":1,\"value\":[{\"id\":\"/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourceGroups/identity-jvsqdw9r/providers/Microsoft.Web/sites/appServicegf62n9\",\"name\":\"appServicegf62n9\",\"type\":\"microsoft.web/sites\",\"resourceGroup\":\"identity-jvsqdw9r\",\"subscriptionId\":\"0336439f-0e9d-44ec-975e-62accb9b3901\",\"subscriptionDisplayName\":\"Visual Studio Enterprise Subscription\"}]}", + "Content": "{\"totalCount\":1,\"value\":[{\"id\":\"/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourceGroups/identity-wmbx18cj/providers/Microsoft.Web/sites/appService1l9p6y\",\"name\":\"appService1l9p6y\",\"type\":\"microsoft.web/sites\",\"resourceGroup\":\"identity-wmbx18cj\",\"subscriptionId\":\"0336439f-0e9d-44ec-975e-62accb9b3901\",\"subscriptionDisplayName\":\"Visual Studio Enterprise Subscription\"}]}", "isContentBase64": false } } diff --git a/src/ManagedServiceIdentity/test/New-AzFederatedIdentityCredentials.Recording.json b/src/ManagedServiceIdentity/test/New-AzFederatedIdentityCredentials.Recording.json index bb252e8cf2ea..1fc11c3831c9 100644 --- a/src/ManagedServiceIdentity/test/New-AzFederatedIdentityCredentials.Recording.json +++ b/src/ManagedServiceIdentity/test/New-AzFederatedIdentityCredentials.Recording.json @@ -1,9 +1,9 @@ { - "New-AzFederatedIdentityCredentials+[NoContext]+CreateExpanded+$PUT+https://management.azure.com/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourceGroups/fic-rg-1znoxkhq/providers/Microsoft.ManagedIdentity/userAssignedIdentities/fic-identity-ws41z9/federatedIdentityCredentials/fic-gwpmy6?api-version=2022-01-31-preview+1": { + "New-AzFederatedIdentityCredentials+[NoContext]+CreateExpanded+$PUT+https://management.azure.com/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourceGroups/fic-rg-49ei1m3y/providers/Microsoft.ManagedIdentity/userAssignedIdentities/fic-identity-oqecha/federatedIdentityCredentials/fic-blsv9r?api-version=2023-01-31+1": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourceGroups/fic-rg-1znoxkhq/providers/Microsoft.ManagedIdentity/userAssignedIdentities/fic-identity-ws41z9/federatedIdentityCredentials/fic-gwpmy6?api-version=2022-01-31-preview", - "Content": "{\n \"properties\": {\n \"issuer\": \"https://kubernetes-oauth.azure.bntxv3\",\n \"subject\": \"system:serviceaccount:ns:svcaccount-2s401c\",\n \"audiences\": [ \"api://AzureADTokenExchange\" ]\n }\n}", + "RequestUri": "https://management.azure.com/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourceGroups/fic-rg-49ei1m3y/providers/Microsoft.ManagedIdentity/userAssignedIdentities/fic-identity-oqecha/federatedIdentityCredentials/fic-blsv9r?api-version=2023-01-31", + "Content": "{\n \"properties\": {\n \"issuer\": \"https://kubernetes-oauth.azure.npolvx\",\n \"subject\": \"system:serviceaccount:ns:svcaccount-f2p1wq\",\n \"audiences\": [ \"api://AzureADTokenExchange\" ]\n }\n}", "isContentBase64": false, "Headers": { }, @@ -17,21 +17,21 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Location": [ "/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourcegroups/fic-rg-1znoxkhq/providers/Microsoft.ManagedIdentity/userAssignedIdentities/fic-identity-ws41z9/federatedIdentityCredentials/fic-gwpmy6" ], + "Location": [ "/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourcegroups/fic-rg-49ei1m3y/providers/Microsoft.ManagedIdentity/userAssignedIdentities/fic-identity-oqecha/federatedIdentityCredentials/fic-blsv9r" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "x-ms-ratelimit-remaining-subscription-writes": [ "1196" ], - "x-ms-request-id": [ "b466361f-2261-4306-a481-b9f0bebe11ba" ], - "x-ms-correlation-request-id": [ "b466361f-2261-4306-a481-b9f0bebe11ba" ], - "x-ms-routing-request-id": [ "NORTHEUROPE:20220906T145332Z:b466361f-2261-4306-a481-b9f0bebe11ba" ], + "x-ms-request-id": [ "be18455f-3249-4cd8-9a8a-0bb6b5b43068" ], + "x-ms-correlation-request-id": [ "be18455f-3249-4cd8-9a8a-0bb6b5b43068" ], + "x-ms-routing-request-id": [ "NORTHEUROPE:20230214T115926Z:be18455f-3249-4cd8-9a8a-0bb6b5b43068" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Tue, 06 Sep 2022 14:53:31 GMT" ] + "Date": [ "Tue, 14 Feb 2023 11:59:25 GMT" ] }, "ContentHeaders": { "Content-Length": [ "479" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourcegroups/fic-rg-1znoxkhq/providers/Microsoft.ManagedIdentity/userAssignedIdentities/fic-identity-ws41z9/federatedIdentityCredentials/fic-gwpmy6\",\"name\":\"fic-gwpmy6\",\"type\":\"Microsoft.ManagedIdentity/userAssignedIdentities/federatedIdentityCredentials\",\"properties\":{\"issuer\":\"https://kubernetes-oauth.azure.bntxv3\",\"subject\":\"system:serviceaccount:ns:svcaccount-2s401c\",\"audiences\":[\"api://AzureADTokenExchange\"]}}", + "Content": "{\"id\":\"/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourcegroups/fic-rg-49ei1m3y/providers/Microsoft.ManagedIdentity/userAssignedIdentities/fic-identity-oqecha/federatedIdentityCredentials/fic-blsv9r\",\"name\":\"fic-blsv9r\",\"type\":\"Microsoft.ManagedIdentity/userAssignedIdentities/federatedIdentityCredentials\",\"properties\":{\"issuer\":\"https://kubernetes-oauth.azure.npolvx\",\"subject\":\"system:serviceaccount:ns:svcaccount-f2p1wq\",\"audiences\":[\"api://AzureADTokenExchange\"]}}", "isContentBase64": false } } diff --git a/src/ManagedServiceIdentity/test/New-AzUserAssignedIdentity.Recording.json b/src/ManagedServiceIdentity/test/New-AzUserAssignedIdentity.Recording.json index 4d8959294c1b..f784a14b3717 100644 --- a/src/ManagedServiceIdentity/test/New-AzUserAssignedIdentity.Recording.json +++ b/src/ManagedServiceIdentity/test/New-AzUserAssignedIdentity.Recording.json @@ -1,8 +1,8 @@ { - "New-AzUserAssignedIdentity+[NoContext]+CreateExpanded+$PUT+https://management.azure.com/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourceGroups/identity-jvsqdw9r/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityw6movs?api-version=2022-01-31-preview+1": { + "New-AzUserAssignedIdentity+[NoContext]+CreateExpanded+$PUT+https://management.azure.com/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourceGroups/identity-wmbx18cj/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityeo64yq?api-version=2023-01-31+1": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourceGroups/identity-jvsqdw9r/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityw6movs?api-version=2022-01-31-preview", + "RequestUri": "https://management.azure.com/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourceGroups/identity-wmbx18cj/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityeo64yq?api-version=2023-01-31", "Content": "{\n \"location\": \"Central US\"\n}", "isContentBase64": false, "Headers": { @@ -17,21 +17,21 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Location": [ "/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourcegroups/identity-jvsqdw9r/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityw6movs" ], + "Location": [ "/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourcegroups/identity-wmbx18cj/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityeo64yq" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "x-ms-ratelimit-remaining-subscription-writes": [ "1195" ], - "x-ms-request-id": [ "ef2824fc-ed97-4b88-9076-3fcb29f214d4" ], - "x-ms-correlation-request-id": [ "ef2824fc-ed97-4b88-9076-3fcb29f214d4" ], - "x-ms-routing-request-id": [ "NORTHEUROPE:20220906T145336Z:ef2824fc-ed97-4b88-9076-3fcb29f214d4" ], + "x-ms-request-id": [ "69fd6833-dd7c-40d6-ae60-851f5e29e977" ], + "x-ms-correlation-request-id": [ "69fd6833-dd7c-40d6-ae60-851f5e29e977" ], + "x-ms-routing-request-id": [ "NORTHEUROPE:20230214T115930Z:69fd6833-dd7c-40d6-ae60-851f5e29e977" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Tue, 06 Sep 2022 14:53:35 GMT" ] + "Date": [ "Tue, 14 Feb 2023 11:59:30 GMT" ] }, "ContentHeaders": { "Content-Length": [ "450" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourcegroups/identity-jvsqdw9r/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityw6movs\",\"name\":\"identityw6movs\",\"type\":\"Microsoft.ManagedIdentity/userAssignedIdentities\",\"location\":\"centralus\",\"tags\":{},\"properties\":{\"tenantId\":\"a66b4d27-b1b3-4b60-8b06-7fb4fd05bc3c\",\"principalId\":\"49c22ba4-0b28-4982-9ce7-4674b9424a80\",\"clientId\":\"0dec13fc-23b4-44f3-a6b7-55ba18aa9aed\"}}", + "Content": "{\"id\":\"/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourcegroups/identity-wmbx18cj/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityeo64yq\",\"name\":\"identityeo64yq\",\"type\":\"Microsoft.ManagedIdentity/userAssignedIdentities\",\"location\":\"centralus\",\"tags\":{},\"properties\":{\"tenantId\":\"a66b4d27-b1b3-4b60-8b06-7fb4fd05bc3c\",\"principalId\":\"c1de5485-bf9c-4d72-9e37-532feeddb801\",\"clientId\":\"009f4c8e-e907-4483-bb04-34b54042df1d\"}}", "isContentBase64": false } } diff --git a/src/ManagedServiceIdentity/test/Remove-AzFederatedIdentityCredentials.Recording.json b/src/ManagedServiceIdentity/test/Remove-AzFederatedIdentityCredentials.Recording.json index 46bd8a5b41ab..2adaaef791cd 100644 --- a/src/ManagedServiceIdentity/test/Remove-AzFederatedIdentityCredentials.Recording.json +++ b/src/ManagedServiceIdentity/test/Remove-AzFederatedIdentityCredentials.Recording.json @@ -1,17 +1,17 @@ { - "Remove-AzFederatedIdentityCredentials+[NoContext]+Delete+$DELETE+https://management.azure.com/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourceGroups/fic-rg-1znoxkhq/providers/Microsoft.ManagedIdentity/userAssignedIdentities/fic-identity-ws41z9/federatedIdentityCredentials/fic-gwpmy6?api-version=2022-01-31-preview+1": { + "Remove-AzFederatedIdentityCredentials+[NoContext]+Delete+$DELETE+https://management.azure.com/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourceGroups/fic-rg-49ei1m3y/providers/Microsoft.ManagedIdentity/userAssignedIdentities/fic-identity-oqecha/federatedIdentityCredentials/fic-blsv9r?api-version=2023-01-31+1": { "Request": { "Method": "DELETE", - "RequestUri": "https://management.azure.com/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourceGroups/fic-rg-1znoxkhq/providers/Microsoft.ManagedIdentity/userAssignedIdentities/fic-identity-ws41z9/federatedIdentityCredentials/fic-gwpmy6?api-version=2022-01-31-preview", + "RequestUri": "https://management.azure.com/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourceGroups/fic-rg-49ei1m3y/providers/Microsoft.ManagedIdentity/userAssignedIdentities/fic-identity-oqecha/federatedIdentityCredentials/fic-blsv9r?api-version=2023-01-31", "Content": null, "isContentBase64": false, "Headers": { "x-ms-unique-id": [ "29" ], - "x-ms-client-request-id": [ "1e1af60b-2ab0-444c-b63f-f7bf5447b9f0" ], + "x-ms-client-request-id": [ "812053e3-641d-435f-96d9-02ec5ea808b4" ], "CommandName": [ "Remove-AzFederatedIdentityCredentials" ], "FullCommandName": [ "Remove-AzFederatedIdentityCredentials_Delete" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ManagedServiceIdentity/0.2.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ManagedServiceIdentity/0.3.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -24,11 +24,11 @@ "Pragma": [ "no-cache" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "x-ms-ratelimit-remaining-subscription-deletes": [ "14999" ], - "x-ms-request-id": [ "72eaa31f-5971-4bb2-bbe1-aeac7cb8d0ab" ], - "x-ms-correlation-request-id": [ "72eaa31f-5971-4bb2-bbe1-aeac7cb8d0ab" ], - "x-ms-routing-request-id": [ "NORTHEUROPE:20220906T145339Z:72eaa31f-5971-4bb2-bbe1-aeac7cb8d0ab" ], + "x-ms-request-id": [ "c129844c-4a5b-4520-8995-6644b52af328" ], + "x-ms-correlation-request-id": [ "c129844c-4a5b-4520-8995-6644b52af328" ], + "x-ms-routing-request-id": [ "NORTHEUROPE:20230214T115934Z:c129844c-4a5b-4520-8995-6644b52af328" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Tue, 06 Sep 2022 14:53:38 GMT" ] + "Date": [ "Tue, 14 Feb 2023 11:59:33 GMT" ] }, "ContentHeaders": { "Expires": [ "-1" ], @@ -38,19 +38,19 @@ "isContentBase64": false } }, - "Remove-AzFederatedIdentityCredentials+[NoContext]+Delete+$GET+https://management.azure.com/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourceGroups/fic-rg-1znoxkhq/providers/Microsoft.ManagedIdentity/userAssignedIdentities/fic-identity-ws41z9/federatedIdentityCredentials?api-version=2022-01-31-preview+2": { + "Remove-AzFederatedIdentityCredentials+[NoContext]+Delete+$GET+https://management.azure.com/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourceGroups/fic-rg-49ei1m3y/providers/Microsoft.ManagedIdentity/userAssignedIdentities/fic-identity-oqecha/federatedIdentityCredentials?api-version=2023-01-31+2": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourceGroups/fic-rg-1znoxkhq/providers/Microsoft.ManagedIdentity/userAssignedIdentities/fic-identity-ws41z9/federatedIdentityCredentials?api-version=2022-01-31-preview", + "RequestUri": "https://management.azure.com/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourceGroups/fic-rg-49ei1m3y/providers/Microsoft.ManagedIdentity/userAssignedIdentities/fic-identity-oqecha/federatedIdentityCredentials?api-version=2023-01-31", "Content": null, "isContentBase64": false, "Headers": { "x-ms-unique-id": [ "30" ], - "x-ms-client-request-id": [ "cd7a3d69-59f9-4965-af9d-d7291e59302e" ], + "x-ms-client-request-id": [ "2a9fc0ab-0f1d-4b25-abc3-f6e00df3735f" ], "CommandName": [ "Get-AzFederatedIdentityCredentials" ], "FullCommandName": [ "Get-AzFederatedIdentityCredentials_List" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ManagedServiceIdentity/0.2.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ManagedServiceIdentity/0.3.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -63,26 +63,26 @@ "Pragma": [ "no-cache" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "x-ms-ratelimit-remaining-subscription-reads": [ "11988" ], - "x-ms-request-id": [ "d7ed33e0-216a-423e-9e70-b719f718af76" ], - "x-ms-correlation-request-id": [ "d7ed33e0-216a-423e-9e70-b719f718af76" ], - "x-ms-routing-request-id": [ "NORTHEUROPE:20220906T145339Z:d7ed33e0-216a-423e-9e70-b719f718af76" ], + "x-ms-request-id": [ "3566135a-1cb6-4233-89fa-eac1f76753ee" ], + "x-ms-correlation-request-id": [ "3566135a-1cb6-4233-89fa-eac1f76753ee" ], + "x-ms-routing-request-id": [ "NORTHEUROPE:20230214T115934Z:3566135a-1cb6-4233-89fa-eac1f76753ee" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Tue, 06 Sep 2022 14:53:38 GMT" ] + "Date": [ "Tue, 14 Feb 2023 11:59:34 GMT" ] }, "ContentHeaders": { "Content-Length": [ "491" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"value\":[{\"id\":\"/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourcegroups/fic-rg-1znoxkhq/providers/Microsoft.ManagedIdentity/userAssignedIdentities/fic-identity-ws41z9/federatedIdentityCredentials/fic-27zqjk\",\"name\":\"fic-27zqjk\",\"type\":\"Microsoft.ManagedIdentity/userAssignedIdentities/federatedIdentityCredentials\",\"properties\":{\"issuer\":\"https://kubernetes-oauth.azure.mpxq2a\",\"subject\":\"system:serviceaccount:ns:svcaccount-5iaowt\",\"audiences\":[\"api://AzureADTokenExchange\"]}}]}", + "Content": "{\"value\":[{\"id\":\"/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourcegroups/fic-rg-49ei1m3y/providers/Microsoft.ManagedIdentity/userAssignedIdentities/fic-identity-oqecha/federatedIdentityCredentials/fic-mdkys2\",\"name\":\"fic-mdkys2\",\"type\":\"Microsoft.ManagedIdentity/userAssignedIdentities/federatedIdentityCredentials\",\"properties\":{\"issuer\":\"https://kubernetes-oauth.azure.pc6txw\",\"subject\":\"system:serviceaccount:ns:svcaccount-dq1fse\",\"audiences\":[\"api://AzureADTokenExchange\"]}}]}", "isContentBase64": false } }, - "Remove-AzFederatedIdentityCredentials+[NoContext]+DeleteViaIdentity+$PUT+https://management.azure.com/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourceGroups/fic-rg-1znoxkhq/providers/Microsoft.ManagedIdentity/userAssignedIdentities/fic-identity-ws41z9/federatedIdentityCredentials/fic-mwuszy?api-version=2022-01-31-preview+1": { + "Remove-AzFederatedIdentityCredentials+[NoContext]+DeleteViaIdentity+$PUT+https://management.azure.com/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourceGroups/fic-rg-49ei1m3y/providers/Microsoft.ManagedIdentity/userAssignedIdentities/fic-identity-oqecha/federatedIdentityCredentials/fic-bqo1ic?api-version=2023-01-31+1": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourceGroups/fic-rg-1znoxkhq/providers/Microsoft.ManagedIdentity/userAssignedIdentities/fic-identity-ws41z9/federatedIdentityCredentials/fic-mwuszy?api-version=2022-01-31-preview", - "Content": "{\n \"properties\": {\n \"issuer\": \"https://kubernetes-oauth.azure.has2xv\",\n \"subject\": \"system:serviceaccount:ns:svcaccount-n4ugq7\",\n \"audiences\": [ \"api://AzureADTokenExchange\" ]\n }\n}", + "RequestUri": "https://management.azure.com/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourceGroups/fic-rg-49ei1m3y/providers/Microsoft.ManagedIdentity/userAssignedIdentities/fic-identity-oqecha/federatedIdentityCredentials/fic-bqo1ic?api-version=2023-01-31", + "Content": "{\n \"properties\": {\n \"issuer\": \"https://kubernetes-oauth.azure.ou68i4\",\n \"subject\": \"system:serviceaccount:ns:svcaccount-dgysew\",\n \"audiences\": [ \"api://AzureADTokenExchange\" ]\n }\n}", "isContentBase64": false, "Headers": { }, @@ -96,37 +96,37 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Location": [ "/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourcegroups/fic-rg-1znoxkhq/providers/Microsoft.ManagedIdentity/userAssignedIdentities/fic-identity-ws41z9/federatedIdentityCredentials/fic-mwuszy" ], + "Location": [ "/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourcegroups/fic-rg-49ei1m3y/providers/Microsoft.ManagedIdentity/userAssignedIdentities/fic-identity-oqecha/federatedIdentityCredentials/fic-bqo1ic" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "x-ms-ratelimit-remaining-subscription-writes": [ "1194" ], - "x-ms-request-id": [ "622667d0-1768-485e-9c18-a015cd67e6fa" ], - "x-ms-correlation-request-id": [ "622667d0-1768-485e-9c18-a015cd67e6fa" ], - "x-ms-routing-request-id": [ "NORTHEUROPE:20220906T145340Z:622667d0-1768-485e-9c18-a015cd67e6fa" ], + "x-ms-request-id": [ "63e25392-5515-4c35-8fbf-d1207aee7b41" ], + "x-ms-correlation-request-id": [ "63e25392-5515-4c35-8fbf-d1207aee7b41" ], + "x-ms-routing-request-id": [ "NORTHEUROPE:20230214T115935Z:63e25392-5515-4c35-8fbf-d1207aee7b41" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Tue, 06 Sep 2022 14:53:39 GMT" ] + "Date": [ "Tue, 14 Feb 2023 11:59:35 GMT" ] }, "ContentHeaders": { "Content-Length": [ "479" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourcegroups/fic-rg-1znoxkhq/providers/Microsoft.ManagedIdentity/userAssignedIdentities/fic-identity-ws41z9/federatedIdentityCredentials/fic-mwuszy\",\"name\":\"fic-mwuszy\",\"type\":\"Microsoft.ManagedIdentity/userAssignedIdentities/federatedIdentityCredentials\",\"properties\":{\"issuer\":\"https://kubernetes-oauth.azure.has2xv\",\"subject\":\"system:serviceaccount:ns:svcaccount-n4ugq7\",\"audiences\":[\"api://AzureADTokenExchange\"]}}", + "Content": "{\"id\":\"/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourcegroups/fic-rg-49ei1m3y/providers/Microsoft.ManagedIdentity/userAssignedIdentities/fic-identity-oqecha/federatedIdentityCredentials/fic-bqo1ic\",\"name\":\"fic-bqo1ic\",\"type\":\"Microsoft.ManagedIdentity/userAssignedIdentities/federatedIdentityCredentials\",\"properties\":{\"issuer\":\"https://kubernetes-oauth.azure.ou68i4\",\"subject\":\"system:serviceaccount:ns:svcaccount-dgysew\",\"audiences\":[\"api://AzureADTokenExchange\"]}}", "isContentBase64": false } }, - "Remove-AzFederatedIdentityCredentials+[NoContext]+DeleteViaIdentity+$DELETE+https://management.azure.com/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourceGroups/fic-rg-1znoxkhq/providers/Microsoft.ManagedIdentity/userAssignedIdentities/fic-identity-ws41z9/federatedIdentityCredentials/fic-mwuszy?api-version=2022-01-31-preview+2": { + "Remove-AzFederatedIdentityCredentials+[NoContext]+DeleteViaIdentity+$DELETE+https://management.azure.com/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourceGroups/fic-rg-49ei1m3y/providers/Microsoft.ManagedIdentity/userAssignedIdentities/fic-identity-oqecha/federatedIdentityCredentials/fic-bqo1ic?api-version=2023-01-31+2": { "Request": { "Method": "DELETE", - "RequestUri": "https://management.azure.com/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourceGroups/fic-rg-1znoxkhq/providers/Microsoft.ManagedIdentity/userAssignedIdentities/fic-identity-ws41z9/federatedIdentityCredentials/fic-mwuszy?api-version=2022-01-31-preview", + "RequestUri": "https://management.azure.com/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourceGroups/fic-rg-49ei1m3y/providers/Microsoft.ManagedIdentity/userAssignedIdentities/fic-identity-oqecha/federatedIdentityCredentials/fic-bqo1ic?api-version=2023-01-31", "Content": null, "isContentBase64": false, "Headers": { "x-ms-unique-id": [ "32" ], - "x-ms-client-request-id": [ "a303d5ca-df4a-4c3a-b665-a220f33f24c7" ], + "x-ms-client-request-id": [ "8ac1b9da-1bd5-48da-926f-39b4d285eb86" ], "CommandName": [ "Remove-AzFederatedIdentityCredentials" ], "FullCommandName": [ "Remove-AzFederatedIdentityCredentials_DeleteViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ManagedServiceIdentity/0.2.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ManagedServiceIdentity/0.3.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -139,11 +139,11 @@ "Pragma": [ "no-cache" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "x-ms-ratelimit-remaining-subscription-deletes": [ "14998" ], - "x-ms-request-id": [ "03bade04-cab8-4a03-855a-775ea671eb24" ], - "x-ms-correlation-request-id": [ "03bade04-cab8-4a03-855a-775ea671eb24" ], - "x-ms-routing-request-id": [ "NORTHEUROPE:20220906T145340Z:03bade04-cab8-4a03-855a-775ea671eb24" ], + "x-ms-request-id": [ "4dbde54e-8576-4ef5-83c8-f55462c93a1b" ], + "x-ms-correlation-request-id": [ "4dbde54e-8576-4ef5-83c8-f55462c93a1b" ], + "x-ms-routing-request-id": [ "NORTHEUROPE:20230214T115936Z:4dbde54e-8576-4ef5-83c8-f55462c93a1b" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Tue, 06 Sep 2022 14:53:40 GMT" ] + "Date": [ "Tue, 14 Feb 2023 11:59:36 GMT" ] }, "ContentHeaders": { "Expires": [ "-1" ], @@ -153,19 +153,19 @@ "isContentBase64": false } }, - "Remove-AzFederatedIdentityCredentials+[NoContext]+DeleteViaIdentity+$GET+https://management.azure.com/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourceGroups/fic-rg-1znoxkhq/providers/Microsoft.ManagedIdentity/userAssignedIdentities/fic-identity-ws41z9/federatedIdentityCredentials?api-version=2022-01-31-preview+3": { + "Remove-AzFederatedIdentityCredentials+[NoContext]+DeleteViaIdentity+$GET+https://management.azure.com/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourceGroups/fic-rg-49ei1m3y/providers/Microsoft.ManagedIdentity/userAssignedIdentities/fic-identity-oqecha/federatedIdentityCredentials?api-version=2023-01-31+3": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourceGroups/fic-rg-1znoxkhq/providers/Microsoft.ManagedIdentity/userAssignedIdentities/fic-identity-ws41z9/federatedIdentityCredentials?api-version=2022-01-31-preview", + "RequestUri": "https://management.azure.com/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourceGroups/fic-rg-49ei1m3y/providers/Microsoft.ManagedIdentity/userAssignedIdentities/fic-identity-oqecha/federatedIdentityCredentials?api-version=2023-01-31", "Content": null, "isContentBase64": false, "Headers": { "x-ms-unique-id": [ "33" ], - "x-ms-client-request-id": [ "aa5a136d-b330-4191-b29e-6c154547d3a7" ], + "x-ms-client-request-id": [ "2150a950-6a2f-44ba-b6d2-7ccdcfaae827" ], "CommandName": [ "Get-AzFederatedIdentityCredentials" ], "FullCommandName": [ "Get-AzFederatedIdentityCredentials_List" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ManagedServiceIdentity/0.2.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ManagedServiceIdentity/0.3.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -178,18 +178,18 @@ "Pragma": [ "no-cache" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "x-ms-ratelimit-remaining-subscription-reads": [ "11987" ], - "x-ms-request-id": [ "f2c4ae2c-9672-4738-9d32-bd50030beed1" ], - "x-ms-correlation-request-id": [ "f2c4ae2c-9672-4738-9d32-bd50030beed1" ], - "x-ms-routing-request-id": [ "NORTHEUROPE:20220906T145340Z:f2c4ae2c-9672-4738-9d32-bd50030beed1" ], + "x-ms-request-id": [ "db16120a-5d9d-43f3-a945-af4d2a28b487" ], + "x-ms-correlation-request-id": [ "db16120a-5d9d-43f3-a945-af4d2a28b487" ], + "x-ms-routing-request-id": [ "NORTHEUROPE:20230214T115937Z:db16120a-5d9d-43f3-a945-af4d2a28b487" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Tue, 06 Sep 2022 14:53:40 GMT" ] + "Date": [ "Tue, 14 Feb 2023 11:59:36 GMT" ] }, "ContentHeaders": { "Content-Length": [ "491" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"value\":[{\"id\":\"/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourcegroups/fic-rg-1znoxkhq/providers/Microsoft.ManagedIdentity/userAssignedIdentities/fic-identity-ws41z9/federatedIdentityCredentials/fic-27zqjk\",\"name\":\"fic-27zqjk\",\"type\":\"Microsoft.ManagedIdentity/userAssignedIdentities/federatedIdentityCredentials\",\"properties\":{\"issuer\":\"https://kubernetes-oauth.azure.mpxq2a\",\"subject\":\"system:serviceaccount:ns:svcaccount-5iaowt\",\"audiences\":[\"api://AzureADTokenExchange\"]}}]}", + "Content": "{\"value\":[{\"id\":\"/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourcegroups/fic-rg-49ei1m3y/providers/Microsoft.ManagedIdentity/userAssignedIdentities/fic-identity-oqecha/federatedIdentityCredentials/fic-mdkys2\",\"name\":\"fic-mdkys2\",\"type\":\"Microsoft.ManagedIdentity/userAssignedIdentities/federatedIdentityCredentials\",\"properties\":{\"issuer\":\"https://kubernetes-oauth.azure.pc6txw\",\"subject\":\"system:serviceaccount:ns:svcaccount-dq1fse\",\"audiences\":[\"api://AzureADTokenExchange\"]}}]}", "isContentBase64": false } } diff --git a/src/ManagedServiceIdentity/test/Remove-AzUserAssignedIdentity.Recording.json b/src/ManagedServiceIdentity/test/Remove-AzUserAssignedIdentity.Recording.json index 9943c9d3ebb3..c0124057d5b4 100644 --- a/src/ManagedServiceIdentity/test/Remove-AzUserAssignedIdentity.Recording.json +++ b/src/ManagedServiceIdentity/test/Remove-AzUserAssignedIdentity.Recording.json @@ -1,17 +1,17 @@ { - "Remove-AzUserAssignedIdentity+[NoContext]+Delete+$DELETE+https://management.azure.com/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourceGroups/identity-jvsqdw9r/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityw6movs?api-version=2022-01-31-preview+1": { + "Remove-AzUserAssignedIdentity+[NoContext]+Delete+$DELETE+https://management.azure.com/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourceGroups/identity-wmbx18cj/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityeo64yq?api-version=2023-01-31+1": { "Request": { "Method": "DELETE", - "RequestUri": "https://management.azure.com/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourceGroups/identity-jvsqdw9r/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityw6movs?api-version=2022-01-31-preview", + "RequestUri": "https://management.azure.com/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourceGroups/identity-wmbx18cj/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityeo64yq?api-version=2023-01-31", "Content": null, "isContentBase64": false, "Headers": { "x-ms-unique-id": [ "34" ], - "x-ms-client-request-id": [ "0141ddb8-be4a-44bc-ab9d-826a46f780e5" ], + "x-ms-client-request-id": [ "9e2cfd3f-9ef3-4d16-a21f-5a71df61f5ec" ], "CommandName": [ "Remove-AzUserAssignedIdentity" ], "FullCommandName": [ "Remove-AzUserAssignedIdentity_Delete" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ManagedServiceIdentity/0.2.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ManagedServiceIdentity/0.3.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -24,11 +24,11 @@ "Pragma": [ "no-cache" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "x-ms-ratelimit-remaining-subscription-deletes": [ "14997" ], - "x-ms-request-id": [ "14224610-cb95-4418-a2f2-053db61174e9" ], - "x-ms-correlation-request-id": [ "14224610-cb95-4418-a2f2-053db61174e9" ], - "x-ms-routing-request-id": [ "NORTHEUROPE:20220906T145346Z:14224610-cb95-4418-a2f2-053db61174e9" ], + "x-ms-request-id": [ "3246f9b3-84fb-4ef3-8a72-0d4540d2ff0c" ], + "x-ms-correlation-request-id": [ "3246f9b3-84fb-4ef3-8a72-0d4540d2ff0c" ], + "x-ms-routing-request-id": [ "NORTHEUROPE:20230214T115943Z:3246f9b3-84fb-4ef3-8a72-0d4540d2ff0c" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Tue, 06 Sep 2022 14:53:45 GMT" ] + "Date": [ "Tue, 14 Feb 2023 11:59:42 GMT" ] }, "ContentHeaders": { "Expires": [ "-1" ], @@ -38,19 +38,19 @@ "isContentBase64": false } }, - "Remove-AzUserAssignedIdentity+[NoContext]+Delete+$GET+https://management.azure.com/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourceGroups/identity-jvsqdw9r/providers/Microsoft.ManagedIdentity/userAssignedIdentities?api-version=2022-01-31-preview+2": { + "Remove-AzUserAssignedIdentity+[NoContext]+Delete+$GET+https://management.azure.com/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourceGroups/identity-wmbx18cj/providers/Microsoft.ManagedIdentity/userAssignedIdentities?api-version=2023-01-31+2": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourceGroups/identity-jvsqdw9r/providers/Microsoft.ManagedIdentity/userAssignedIdentities?api-version=2022-01-31-preview", + "RequestUri": "https://management.azure.com/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourceGroups/identity-wmbx18cj/providers/Microsoft.ManagedIdentity/userAssignedIdentities?api-version=2023-01-31", "Content": null, "isContentBase64": false, "Headers": { "x-ms-unique-id": [ "35" ], - "x-ms-client-request-id": [ "821f9847-5ef4-47f0-85ad-56001f1bf0a1" ], + "x-ms-client-request-id": [ "21e4f898-778c-4850-912c-8500ee6a3127" ], "CommandName": [ "Get-AzUserAssignedIdentity" ], "FullCommandName": [ "Get-AzUserAssignedIdentity_List1" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ManagedServiceIdentity/0.2.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ManagedServiceIdentity/0.3.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -63,25 +63,25 @@ "Pragma": [ "no-cache" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "x-ms-ratelimit-remaining-subscription-reads": [ "11986" ], - "x-ms-request-id": [ "322b3b13-3eb3-47a1-ac93-d74c5238e592" ], - "x-ms-correlation-request-id": [ "322b3b13-3eb3-47a1-ac93-d74c5238e592" ], - "x-ms-routing-request-id": [ "NORTHEUROPE:20220906T145346Z:322b3b13-3eb3-47a1-ac93-d74c5238e592" ], + "x-ms-request-id": [ "510834e7-3eca-4a17-9fc2-b03758557e68" ], + "x-ms-correlation-request-id": [ "510834e7-3eca-4a17-9fc2-b03758557e68" ], + "x-ms-routing-request-id": [ "NORTHEUROPE:20230214T115943Z:510834e7-3eca-4a17-9fc2-b03758557e68" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Tue, 06 Sep 2022 14:53:46 GMT" ] + "Date": [ "Tue, 14 Feb 2023 11:59:42 GMT" ] }, "ContentHeaders": { "Content-Length": [ "462" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"value\":[{\"id\":\"/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourcegroups/identity-jvsqdw9r/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityhknlo4\",\"name\":\"identityhknlo4\",\"type\":\"Microsoft.ManagedIdentity/userAssignedIdentities\",\"location\":\"centralus\",\"tags\":{},\"properties\":{\"tenantId\":\"a66b4d27-b1b3-4b60-8b06-7fb4fd05bc3c\",\"principalId\":\"9da8a443-1b0d-4aec-97df-d0b13d0c1903\",\"clientId\":\"44f98dd3-e1f6-4fe6-9579-5fb55a0f4603\"}}]}", + "Content": "{\"value\":[{\"id\":\"/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourcegroups/identity-wmbx18cj/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identitybsw8q5\",\"name\":\"identitybsw8q5\",\"type\":\"Microsoft.ManagedIdentity/userAssignedIdentities\",\"location\":\"centralus\",\"tags\":{},\"properties\":{\"tenantId\":\"a66b4d27-b1b3-4b60-8b06-7fb4fd05bc3c\",\"principalId\":\"84d62ad1-cb0e-4c7f-b7c8-d716357ad438\",\"clientId\":\"40fc1be0-c9b4-44c1-8fe2-17463294f35c\"}}]}", "isContentBase64": false } }, - "Remove-AzUserAssignedIdentity+[NoContext]+DeleteViaIdentity+$PUT+https://management.azure.com/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourceGroups/identity-jvsqdw9r/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity40avkf?api-version=2022-01-31-preview+1": { + "Remove-AzUserAssignedIdentity+[NoContext]+DeleteViaIdentity+$PUT+https://management.azure.com/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourceGroups/identity-wmbx18cj/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity4qpm3e?api-version=2023-01-31+1": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourceGroups/identity-jvsqdw9r/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity40avkf?api-version=2022-01-31-preview", + "RequestUri": "https://management.azure.com/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourceGroups/identity-wmbx18cj/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity4qpm3e?api-version=2023-01-31", "Content": "{\n \"location\": \"Central US\"\n}", "isContentBase64": false, "Headers": { @@ -96,37 +96,37 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Location": [ "/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourcegroups/identity-jvsqdw9r/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity40avkf" ], + "Location": [ "/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourcegroups/identity-wmbx18cj/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity4qpm3e" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "x-ms-ratelimit-remaining-subscription-writes": [ "1193" ], - "x-ms-request-id": [ "91bb2555-2817-44bb-8533-ea25afeb3478" ], - "x-ms-correlation-request-id": [ "91bb2555-2817-44bb-8533-ea25afeb3478" ], - "x-ms-routing-request-id": [ "NORTHEUROPE:20220906T145348Z:91bb2555-2817-44bb-8533-ea25afeb3478" ], + "x-ms-request-id": [ "ffa0de82-87de-471a-9910-153c7264d6f0" ], + "x-ms-correlation-request-id": [ "ffa0de82-87de-471a-9910-153c7264d6f0" ], + "x-ms-routing-request-id": [ "NORTHEUROPE:20230214T115945Z:ffa0de82-87de-471a-9910-153c7264d6f0" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Tue, 06 Sep 2022 14:53:47 GMT" ] + "Date": [ "Tue, 14 Feb 2023 11:59:45 GMT" ] }, "ContentHeaders": { "Content-Length": [ "450" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourcegroups/identity-jvsqdw9r/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity40avkf\",\"name\":\"identity40avkf\",\"type\":\"Microsoft.ManagedIdentity/userAssignedIdentities\",\"location\":\"centralus\",\"tags\":{},\"properties\":{\"tenantId\":\"a66b4d27-b1b3-4b60-8b06-7fb4fd05bc3c\",\"principalId\":\"c27dd8b3-fd1b-43c9-8f8c-57fbde9e39d0\",\"clientId\":\"91b05f18-ee1f-4372-a6da-6613f8b61190\"}}", + "Content": "{\"id\":\"/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourcegroups/identity-wmbx18cj/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity4qpm3e\",\"name\":\"identity4qpm3e\",\"type\":\"Microsoft.ManagedIdentity/userAssignedIdentities\",\"location\":\"centralus\",\"tags\":{},\"properties\":{\"tenantId\":\"a66b4d27-b1b3-4b60-8b06-7fb4fd05bc3c\",\"principalId\":\"eff7e43f-94dd-429c-a423-9d0120363d74\",\"clientId\":\"a87209e3-d072-4953-af99-b7900b3147d0\"}}", "isContentBase64": false } }, - "Remove-AzUserAssignedIdentity+[NoContext]+DeleteViaIdentity+$DELETE+https://management.azure.com/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourceGroups/identity-jvsqdw9r/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity40avkf?api-version=2022-01-31-preview+2": { + "Remove-AzUserAssignedIdentity+[NoContext]+DeleteViaIdentity+$DELETE+https://management.azure.com/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourceGroups/identity-wmbx18cj/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity4qpm3e?api-version=2023-01-31+2": { "Request": { "Method": "DELETE", - "RequestUri": "https://management.azure.com/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourceGroups/identity-jvsqdw9r/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity40avkf?api-version=2022-01-31-preview", + "RequestUri": "https://management.azure.com/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourceGroups/identity-wmbx18cj/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity4qpm3e?api-version=2023-01-31", "Content": null, "isContentBase64": false, "Headers": { "x-ms-unique-id": [ "37" ], - "x-ms-client-request-id": [ "6c17fe59-a975-4782-9865-a3fd5f7b0dc7" ], + "x-ms-client-request-id": [ "35333792-d42c-4859-a0df-9262eb1b974a" ], "CommandName": [ "Remove-AzUserAssignedIdentity" ], "FullCommandName": [ "Remove-AzUserAssignedIdentity_DeleteViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ManagedServiceIdentity/0.2.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ManagedServiceIdentity/0.3.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -139,11 +139,11 @@ "Pragma": [ "no-cache" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "x-ms-ratelimit-remaining-subscription-deletes": [ "14996" ], - "x-ms-request-id": [ "5df19763-9d4f-4550-8017-434c28afc31f" ], - "x-ms-correlation-request-id": [ "5df19763-9d4f-4550-8017-434c28afc31f" ], - "x-ms-routing-request-id": [ "NORTHEUROPE:20220906T145350Z:5df19763-9d4f-4550-8017-434c28afc31f" ], + "x-ms-request-id": [ "99786802-929a-448f-85ab-6e50a0ede86d" ], + "x-ms-correlation-request-id": [ "99786802-929a-448f-85ab-6e50a0ede86d" ], + "x-ms-routing-request-id": [ "NORTHEUROPE:20230214T115947Z:99786802-929a-448f-85ab-6e50a0ede86d" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Tue, 06 Sep 2022 14:53:50 GMT" ] + "Date": [ "Tue, 14 Feb 2023 11:59:46 GMT" ] }, "ContentHeaders": { "Expires": [ "-1" ], @@ -153,19 +153,19 @@ "isContentBase64": false } }, - "Remove-AzUserAssignedIdentity+[NoContext]+DeleteViaIdentity+$GET+https://management.azure.com/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourceGroups/identity-jvsqdw9r/providers/Microsoft.ManagedIdentity/userAssignedIdentities?api-version=2022-01-31-preview+3": { + "Remove-AzUserAssignedIdentity+[NoContext]+DeleteViaIdentity+$GET+https://management.azure.com/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourceGroups/identity-wmbx18cj/providers/Microsoft.ManagedIdentity/userAssignedIdentities?api-version=2023-01-31+3": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourceGroups/identity-jvsqdw9r/providers/Microsoft.ManagedIdentity/userAssignedIdentities?api-version=2022-01-31-preview", + "RequestUri": "https://management.azure.com/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourceGroups/identity-wmbx18cj/providers/Microsoft.ManagedIdentity/userAssignedIdentities?api-version=2023-01-31", "Content": null, "isContentBase64": false, "Headers": { "x-ms-unique-id": [ "38" ], - "x-ms-client-request-id": [ "2ccd7dc5-d8d8-4987-bdf4-eea171c324c9" ], + "x-ms-client-request-id": [ "cbeecfac-1a8e-483d-bb2c-279f449a1e74" ], "CommandName": [ "Get-AzUserAssignedIdentity" ], "FullCommandName": [ "Get-AzUserAssignedIdentity_List1" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ManagedServiceIdentity/0.2.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ManagedServiceIdentity/0.3.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -178,18 +178,18 @@ "Pragma": [ "no-cache" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "x-ms-ratelimit-remaining-subscription-reads": [ "11985" ], - "x-ms-request-id": [ "32b1052a-1d1d-492d-867b-90a66e65430e" ], - "x-ms-correlation-request-id": [ "32b1052a-1d1d-492d-867b-90a66e65430e" ], - "x-ms-routing-request-id": [ "NORTHEUROPE:20220906T145350Z:32b1052a-1d1d-492d-867b-90a66e65430e" ], + "x-ms-request-id": [ "10911d53-0c41-452f-8992-38271cb5319f" ], + "x-ms-correlation-request-id": [ "10911d53-0c41-452f-8992-38271cb5319f" ], + "x-ms-routing-request-id": [ "NORTHEUROPE:20230214T115948Z:10911d53-0c41-452f-8992-38271cb5319f" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Tue, 06 Sep 2022 14:53:50 GMT" ] + "Date": [ "Tue, 14 Feb 2023 11:59:47 GMT" ] }, "ContentHeaders": { "Content-Length": [ "462" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"value\":[{\"id\":\"/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourcegroups/identity-jvsqdw9r/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityhknlo4\",\"name\":\"identityhknlo4\",\"type\":\"Microsoft.ManagedIdentity/userAssignedIdentities\",\"location\":\"centralus\",\"tags\":{},\"properties\":{\"tenantId\":\"a66b4d27-b1b3-4b60-8b06-7fb4fd05bc3c\",\"principalId\":\"9da8a443-1b0d-4aec-97df-d0b13d0c1903\",\"clientId\":\"44f98dd3-e1f6-4fe6-9579-5fb55a0f4603\"}}]}", + "Content": "{\"value\":[{\"id\":\"/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourcegroups/identity-wmbx18cj/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identitybsw8q5\",\"name\":\"identitybsw8q5\",\"type\":\"Microsoft.ManagedIdentity/userAssignedIdentities\",\"location\":\"centralus\",\"tags\":{},\"properties\":{\"tenantId\":\"a66b4d27-b1b3-4b60-8b06-7fb4fd05bc3c\",\"principalId\":\"84d62ad1-cb0e-4c7f-b7c8-d716357ad438\",\"clientId\":\"40fc1be0-c9b4-44c1-8fe2-17463294f35c\"}}]}", "isContentBase64": false } } diff --git a/src/ManagedServiceIdentity/test/Update-AzFederatedIdentityCredentials.Recording.json b/src/ManagedServiceIdentity/test/Update-AzFederatedIdentityCredentials.Recording.json index 0e22c67fb41c..48213c3fbe8f 100644 --- a/src/ManagedServiceIdentity/test/Update-AzFederatedIdentityCredentials.Recording.json +++ b/src/ManagedServiceIdentity/test/Update-AzFederatedIdentityCredentials.Recording.json @@ -1,9 +1,9 @@ { - "Update-AzFederatedIdentityCredentials+[NoContext]+UpdateExpanded+$PUT+https://management.azure.com/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourceGroups/fic-rg-1znoxkhq/providers/Microsoft.ManagedIdentity/userAssignedIdentities/fic-identity-ws41z9/federatedIdentityCredentials/fic-27zqjk?api-version=2022-01-31-preview+1": { + "Update-AzFederatedIdentityCredentials+[NoContext]+UpdateExpanded+$PUT+https://management.azure.com/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourceGroups/fic-rg-49ei1m3y/providers/Microsoft.ManagedIdentity/userAssignedIdentities/fic-identity-oqecha/federatedIdentityCredentials/fic-mdkys2?api-version=2023-01-31+1": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourceGroups/fic-rg-1znoxkhq/providers/Microsoft.ManagedIdentity/userAssignedIdentities/fic-identity-ws41z9/federatedIdentityCredentials/fic-27zqjk?api-version=2022-01-31-preview", - "Content": "{\n \"properties\": {\n \"issuer\": \"https://kubernetes-oauth.azure.mpxq2a-updated\",\n \"subject\": \"system:serviceaccount:ns:svcaccount-5iaowt-updated\",\n \"audiences\": [ \"updated\" ]\n }\n}", + "RequestUri": "https://management.azure.com/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourceGroups/fic-rg-49ei1m3y/providers/Microsoft.ManagedIdentity/userAssignedIdentities/fic-identity-oqecha/federatedIdentityCredentials/fic-mdkys2?api-version=2023-01-31", + "Content": "{\n \"properties\": {\n \"issuer\": \"https://kubernetes-oauth.azure.pc6txw-updated\",\n \"subject\": \"system:serviceaccount:ns:svcaccount-dq1fse-updated\",\n \"audiences\": [ \"updated\" ]\n }\n}", "isContentBase64": false, "Headers": { }, @@ -19,34 +19,34 @@ "Pragma": [ "no-cache" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "x-ms-ratelimit-remaining-subscription-writes": [ "1192" ], - "x-ms-request-id": [ "b15cb5cb-7352-4de7-aea1-87471109c347" ], - "x-ms-correlation-request-id": [ "b15cb5cb-7352-4de7-aea1-87471109c347" ], - "x-ms-routing-request-id": [ "NORTHEUROPE:20220906T145358Z:b15cb5cb-7352-4de7-aea1-87471109c347" ], + "x-ms-request-id": [ "775bade9-d68d-405d-89ce-487cc3390225" ], + "x-ms-correlation-request-id": [ "775bade9-d68d-405d-89ce-487cc3390225" ], + "x-ms-routing-request-id": [ "NORTHEUROPE:20230214T115956Z:775bade9-d68d-405d-89ce-487cc3390225" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Tue, 06 Sep 2022 14:53:58 GMT" ] + "Date": [ "Tue, 14 Feb 2023 11:59:55 GMT" ] }, "ContentHeaders": { "Content-Length": [ "476" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourcegroups/fic-rg-1znoxkhq/providers/Microsoft.ManagedIdentity/userAssignedIdentities/fic-identity-ws41z9/federatedIdentityCredentials/fic-27zqjk\",\"name\":\"fic-27zqjk\",\"type\":\"Microsoft.ManagedIdentity/userAssignedIdentities/federatedIdentityCredentials\",\"properties\":{\"issuer\":\"https://kubernetes-oauth.azure.mpxq2a-updated\",\"subject\":\"system:serviceaccount:ns:svcaccount-5iaowt-updated\",\"audiences\":[\"updated\"]}}", + "Content": "{\"id\":\"/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourcegroups/fic-rg-49ei1m3y/providers/Microsoft.ManagedIdentity/userAssignedIdentities/fic-identity-oqecha/federatedIdentityCredentials/fic-mdkys2\",\"name\":\"fic-mdkys2\",\"type\":\"Microsoft.ManagedIdentity/userAssignedIdentities/federatedIdentityCredentials\",\"properties\":{\"issuer\":\"https://kubernetes-oauth.azure.pc6txw-updated\",\"subject\":\"system:serviceaccount:ns:svcaccount-dq1fse-updated\",\"audiences\":[\"updated\"]}}", "isContentBase64": false } }, - "Update-AzFederatedIdentityCredentials+[NoContext]+UpdateViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourceGroups/fic-rg-1znoxkhq/providers/Microsoft.ManagedIdentity/userAssignedIdentities/fic-identity-ws41z9/federatedIdentityCredentials/fic-27zqjk?api-version=2022-01-31-preview+1": { + "Update-AzFederatedIdentityCredentials+[NoContext]+UpdateViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourceGroups/fic-rg-49ei1m3y/providers/Microsoft.ManagedIdentity/userAssignedIdentities/fic-identity-oqecha/federatedIdentityCredentials/fic-mdkys2?api-version=2023-01-31+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourceGroups/fic-rg-1znoxkhq/providers/Microsoft.ManagedIdentity/userAssignedIdentities/fic-identity-ws41z9/federatedIdentityCredentials/fic-27zqjk?api-version=2022-01-31-preview", + "RequestUri": "https://management.azure.com/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourceGroups/fic-rg-49ei1m3y/providers/Microsoft.ManagedIdentity/userAssignedIdentities/fic-identity-oqecha/federatedIdentityCredentials/fic-mdkys2?api-version=2023-01-31", "Content": null, "isContentBase64": false, "Headers": { "x-ms-unique-id": [ "40" ], - "x-ms-client-request-id": [ "4946bbbc-2cb6-4e70-83d1-6ea9f223033d" ], + "x-ms-client-request-id": [ "db74bb25-8c65-4fad-8bd5-7f1dc6bc498b" ], "CommandName": [ "Get-AzFederatedIdentityCredentials" ], "FullCommandName": [ "Get-AzFederatedIdentityCredentials_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ManagedServiceIdentity/0.2.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ManagedServiceIdentity/0.3.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -59,26 +59,26 @@ "Pragma": [ "no-cache" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "x-ms-ratelimit-remaining-subscription-reads": [ "11984" ], - "x-ms-request-id": [ "eea3e38c-2c11-462c-87ac-1d34715c8806" ], - "x-ms-correlation-request-id": [ "eea3e38c-2c11-462c-87ac-1d34715c8806" ], - "x-ms-routing-request-id": [ "NORTHEUROPE:20220906T145359Z:eea3e38c-2c11-462c-87ac-1d34715c8806" ], + "x-ms-request-id": [ "201d1f17-dc21-484f-9a43-c3b0f5cc6219" ], + "x-ms-correlation-request-id": [ "201d1f17-dc21-484f-9a43-c3b0f5cc6219" ], + "x-ms-routing-request-id": [ "NORTHEUROPE:20230214T115956Z:201d1f17-dc21-484f-9a43-c3b0f5cc6219" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Tue, 06 Sep 2022 14:53:58 GMT" ] + "Date": [ "Tue, 14 Feb 2023 11:59:55 GMT" ] }, "ContentHeaders": { "Content-Length": [ "476" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourcegroups/fic-rg-1znoxkhq/providers/Microsoft.ManagedIdentity/userAssignedIdentities/fic-identity-ws41z9/federatedIdentityCredentials/fic-27zqjk\",\"name\":\"fic-27zqjk\",\"type\":\"Microsoft.ManagedIdentity/userAssignedIdentities/federatedIdentityCredentials\",\"properties\":{\"issuer\":\"https://kubernetes-oauth.azure.mpxq2a-updated\",\"subject\":\"system:serviceaccount:ns:svcaccount-5iaowt-updated\",\"audiences\":[\"updated\"]}}", + "Content": "{\"id\":\"/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourcegroups/fic-rg-49ei1m3y/providers/Microsoft.ManagedIdentity/userAssignedIdentities/fic-identity-oqecha/federatedIdentityCredentials/fic-mdkys2\",\"name\":\"fic-mdkys2\",\"type\":\"Microsoft.ManagedIdentity/userAssignedIdentities/federatedIdentityCredentials\",\"properties\":{\"issuer\":\"https://kubernetes-oauth.azure.pc6txw-updated\",\"subject\":\"system:serviceaccount:ns:svcaccount-dq1fse-updated\",\"audiences\":[\"updated\"]}}", "isContentBase64": false } }, - "Update-AzFederatedIdentityCredentials+[NoContext]+UpdateViaIdentityExpanded+$PUT+https://management.azure.com/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourceGroups/fic-rg-1znoxkhq/providers/Microsoft.ManagedIdentity/userAssignedIdentities/fic-identity-ws41z9/federatedIdentityCredentials/fic-27zqjk?api-version=2022-01-31-preview+2": { + "Update-AzFederatedIdentityCredentials+[NoContext]+UpdateViaIdentityExpanded+$PUT+https://management.azure.com/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourceGroups/fic-rg-49ei1m3y/providers/Microsoft.ManagedIdentity/userAssignedIdentities/fic-identity-oqecha/federatedIdentityCredentials/fic-mdkys2?api-version=2023-01-31+2": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourceGroups/fic-rg-1znoxkhq/providers/Microsoft.ManagedIdentity/userAssignedIdentities/fic-identity-ws41z9/federatedIdentityCredentials/fic-27zqjk?api-version=2022-01-31-preview", - "Content": "{\n \"properties\": {\n \"issuer\": \"https://kubernetes-oauth.azure.mpxq2a-updated2\",\n \"subject\": \"system:serviceaccount:ns:svcaccount-5iaowt-updated2\",\n \"audiences\": [ \"updated2\" ]\n }\n}", + "RequestUri": "https://management.azure.com/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourceGroups/fic-rg-49ei1m3y/providers/Microsoft.ManagedIdentity/userAssignedIdentities/fic-identity-oqecha/federatedIdentityCredentials/fic-mdkys2?api-version=2023-01-31", + "Content": "{\n \"properties\": {\n \"issuer\": \"https://kubernetes-oauth.azure.pc6txw-updated2\",\n \"subject\": \"system:serviceaccount:ns:svcaccount-dq1fse-updated2\",\n \"audiences\": [ \"updated2\" ]\n }\n}", "isContentBase64": false, "Headers": { }, @@ -94,18 +94,18 @@ "Pragma": [ "no-cache" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "x-ms-ratelimit-remaining-subscription-writes": [ "1191" ], - "x-ms-request-id": [ "6d27237a-b7a4-434d-b382-7e3bfd54cb43" ], - "x-ms-correlation-request-id": [ "6d27237a-b7a4-434d-b382-7e3bfd54cb43" ], - "x-ms-routing-request-id": [ "NORTHEUROPE:20220906T145359Z:6d27237a-b7a4-434d-b382-7e3bfd54cb43" ], + "x-ms-request-id": [ "8b16754c-3057-40d8-ae08-1ed96b47e36d" ], + "x-ms-correlation-request-id": [ "8b16754c-3057-40d8-ae08-1ed96b47e36d" ], + "x-ms-routing-request-id": [ "NORTHEUROPE:20230214T115957Z:8b16754c-3057-40d8-ae08-1ed96b47e36d" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Tue, 06 Sep 2022 14:53:59 GMT" ] + "Date": [ "Tue, 14 Feb 2023 11:59:56 GMT" ] }, "ContentHeaders": { "Content-Length": [ "479" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourcegroups/fic-rg-1znoxkhq/providers/Microsoft.ManagedIdentity/userAssignedIdentities/fic-identity-ws41z9/federatedIdentityCredentials/fic-27zqjk\",\"name\":\"fic-27zqjk\",\"type\":\"Microsoft.ManagedIdentity/userAssignedIdentities/federatedIdentityCredentials\",\"properties\":{\"issuer\":\"https://kubernetes-oauth.azure.mpxq2a-updated2\",\"subject\":\"system:serviceaccount:ns:svcaccount-5iaowt-updated2\",\"audiences\":[\"updated2\"]}}", + "Content": "{\"id\":\"/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourcegroups/fic-rg-49ei1m3y/providers/Microsoft.ManagedIdentity/userAssignedIdentities/fic-identity-oqecha/federatedIdentityCredentials/fic-mdkys2\",\"name\":\"fic-mdkys2\",\"type\":\"Microsoft.ManagedIdentity/userAssignedIdentities/federatedIdentityCredentials\",\"properties\":{\"issuer\":\"https://kubernetes-oauth.azure.pc6txw-updated2\",\"subject\":\"system:serviceaccount:ns:svcaccount-dq1fse-updated2\",\"audiences\":[\"updated2\"]}}", "isContentBase64": false } } diff --git a/src/ManagedServiceIdentity/test/Update-AzUserAssignedIdentity.Recording.json b/src/ManagedServiceIdentity/test/Update-AzUserAssignedIdentity.Recording.json index 0d7e5bf1fe17..f4f5ed3cf724 100644 --- a/src/ManagedServiceIdentity/test/Update-AzUserAssignedIdentity.Recording.json +++ b/src/ManagedServiceIdentity/test/Update-AzUserAssignedIdentity.Recording.json @@ -1,8 +1,8 @@ { - "Update-AzUserAssignedIdentity+[NoContext]+UpdateExpanded+$PATCH+https://management.azure.com/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourceGroups/identity-jvsqdw9r/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityhknlo4?api-version=2022-01-31-preview+1": { + "Update-AzUserAssignedIdentity+[NoContext]+UpdateExpanded+$PATCH+https://management.azure.com/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourceGroups/identity-wmbx18cj/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identitybsw8q5?api-version=2023-01-31+1": { "Request": { "Method": "PATCH", - "RequestUri": "https://management.azure.com/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourceGroups/identity-jvsqdw9r/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityhknlo4?api-version=2022-01-31-preview", + "RequestUri": "https://management.azure.com/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourceGroups/identity-wmbx18cj/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identitybsw8q5?api-version=2023-01-31", "Content": "{\n \"tags\": {\n \"key02\": \"value02\",\n \"key01\": \"value01\"\n }\n}", "isContentBase64": false, "Headers": { @@ -19,34 +19,34 @@ "Pragma": [ "no-cache" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "x-ms-ratelimit-remaining-subscription-writes": [ "1190" ], - "x-ms-request-id": [ "217731db-daff-45c7-8a21-8c48143ddbec" ], - "x-ms-correlation-request-id": [ "217731db-daff-45c7-8a21-8c48143ddbec" ], - "x-ms-routing-request-id": [ "NORTHEUROPE:20220906T145404Z:217731db-daff-45c7-8a21-8c48143ddbec" ], + "x-ms-request-id": [ "acb2292e-7ed6-41f4-93ee-2141785e7304" ], + "x-ms-correlation-request-id": [ "acb2292e-7ed6-41f4-93ee-2141785e7304" ], + "x-ms-routing-request-id": [ "NORTHEUROPE:20230214T120001Z:acb2292e-7ed6-41f4-93ee-2141785e7304" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Tue, 06 Sep 2022 14:54:03 GMT" ] + "Date": [ "Tue, 14 Feb 2023 12:00:01 GMT" ] }, "ContentHeaders": { "Content-Length": [ "485" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourcegroups/identity-jvsqdw9r/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityhknlo4\",\"name\":\"identityhknlo4\",\"type\":\"Microsoft.ManagedIdentity/userAssignedIdentities\",\"location\":\"centralus\",\"tags\":{\"key02\":\"value02\",\"key01\":\"value01\"},\"properties\":{\"tenantId\":\"a66b4d27-b1b3-4b60-8b06-7fb4fd05bc3c\",\"principalId\":\"9da8a443-1b0d-4aec-97df-d0b13d0c1903\",\"clientId\":\"44f98dd3-e1f6-4fe6-9579-5fb55a0f4603\"}}", + "Content": "{\"id\":\"/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourcegroups/identity-wmbx18cj/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identitybsw8q5\",\"name\":\"identitybsw8q5\",\"type\":\"Microsoft.ManagedIdentity/userAssignedIdentities\",\"location\":\"centralus\",\"tags\":{\"key02\":\"value02\",\"key01\":\"value01\"},\"properties\":{\"tenantId\":\"a66b4d27-b1b3-4b60-8b06-7fb4fd05bc3c\",\"principalId\":\"84d62ad1-cb0e-4c7f-b7c8-d716357ad438\",\"clientId\":\"40fc1be0-c9b4-44c1-8fe2-17463294f35c\"}}", "isContentBase64": false } }, - "Update-AzUserAssignedIdentity+[NoContext]+UpdateViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourceGroups/identity-jvsqdw9r/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityhknlo4?api-version=2022-01-31-preview+1": { + "Update-AzUserAssignedIdentity+[NoContext]+UpdateViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourceGroups/identity-wmbx18cj/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identitybsw8q5?api-version=2023-01-31+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourceGroups/identity-jvsqdw9r/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityhknlo4?api-version=2022-01-31-preview", + "RequestUri": "https://management.azure.com/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourceGroups/identity-wmbx18cj/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identitybsw8q5?api-version=2023-01-31", "Content": null, "isContentBase64": false, "Headers": { "x-ms-unique-id": [ "43" ], - "x-ms-client-request-id": [ "dc714576-71be-49ce-a98a-aef2154cb60e" ], + "x-ms-client-request-id": [ "6c83af93-5a1a-44f6-a70a-8d2ad31e6225" ], "CommandName": [ "Get-AzUserAssignedIdentity" ], "FullCommandName": [ "Get-AzUserAssignedIdentity_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ManagedServiceIdentity/0.2.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.3", "Az.ManagedServiceIdentity/0.3.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -59,26 +59,26 @@ "Pragma": [ "no-cache" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "x-ms-ratelimit-remaining-subscription-reads": [ "11983" ], - "x-ms-request-id": [ "d24c0005-f6f5-4e4f-8d1c-26913f1027d9" ], - "x-ms-correlation-request-id": [ "d24c0005-f6f5-4e4f-8d1c-26913f1027d9" ], - "x-ms-routing-request-id": [ "NORTHEUROPE:20220906T145404Z:d24c0005-f6f5-4e4f-8d1c-26913f1027d9" ], + "x-ms-request-id": [ "d017d1c9-3e6b-4037-a4c3-151fce4a6b69" ], + "x-ms-correlation-request-id": [ "d017d1c9-3e6b-4037-a4c3-151fce4a6b69" ], + "x-ms-routing-request-id": [ "NORTHEUROPE:20230214T120002Z:d017d1c9-3e6b-4037-a4c3-151fce4a6b69" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Tue, 06 Sep 2022 14:54:03 GMT" ] + "Date": [ "Tue, 14 Feb 2023 12:00:01 GMT" ] }, "ContentHeaders": { "Content-Length": [ "485" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourcegroups/identity-jvsqdw9r/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityhknlo4\",\"name\":\"identityhknlo4\",\"type\":\"Microsoft.ManagedIdentity/userAssignedIdentities\",\"location\":\"centralus\",\"tags\":{\"key02\":\"value02\",\"key01\":\"value01\"},\"properties\":{\"tenantId\":\"a66b4d27-b1b3-4b60-8b06-7fb4fd05bc3c\",\"principalId\":\"9da8a443-1b0d-4aec-97df-d0b13d0c1903\",\"clientId\":\"44f98dd3-e1f6-4fe6-9579-5fb55a0f4603\"}}", + "Content": "{\"id\":\"/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourcegroups/identity-wmbx18cj/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identitybsw8q5\",\"name\":\"identitybsw8q5\",\"type\":\"Microsoft.ManagedIdentity/userAssignedIdentities\",\"location\":\"centralus\",\"tags\":{\"key02\":\"value02\",\"key01\":\"value01\"},\"properties\":{\"tenantId\":\"a66b4d27-b1b3-4b60-8b06-7fb4fd05bc3c\",\"principalId\":\"84d62ad1-cb0e-4c7f-b7c8-d716357ad438\",\"clientId\":\"40fc1be0-c9b4-44c1-8fe2-17463294f35c\"}}", "isContentBase64": false } }, - "Update-AzUserAssignedIdentity+[NoContext]+UpdateViaIdentityExpanded+$PATCH+https://management.azure.com/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourceGroups/identity-jvsqdw9r/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityhknlo4?api-version=2022-01-31-preview+2": { + "Update-AzUserAssignedIdentity+[NoContext]+UpdateViaIdentityExpanded+$PATCH+https://management.azure.com/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourceGroups/identity-wmbx18cj/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identitybsw8q5?api-version=2023-01-31+2": { "Request": { "Method": "PATCH", - "RequestUri": "https://management.azure.com/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourceGroups/identity-jvsqdw9r/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityhknlo4?api-version=2022-01-31-preview", - "Content": "{\n \"tags\": {\n \"key03\": \"value03\",\n \"key02\": \"value02\",\n \"key01\": \"value01\"\n }\n}", + "RequestUri": "https://management.azure.com/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourceGroups/identity-wmbx18cj/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identitybsw8q5?api-version=2023-01-31", + "Content": "{\n \"tags\": {\n \"key01\": \"value01\",\n \"key02\": \"value02\",\n \"key03\": \"value03\"\n }\n}", "isContentBase64": false, "Headers": { }, @@ -94,18 +94,18 @@ "Pragma": [ "no-cache" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "x-ms-ratelimit-remaining-subscription-writes": [ "1189" ], - "x-ms-request-id": [ "aa62660f-fffc-4a59-baa5-78a57cd65c2b" ], - "x-ms-correlation-request-id": [ "aa62660f-fffc-4a59-baa5-78a57cd65c2b" ], - "x-ms-routing-request-id": [ "NORTHEUROPE:20220906T145405Z:aa62660f-fffc-4a59-baa5-78a57cd65c2b" ], + "x-ms-request-id": [ "1945d50f-75b9-407a-8614-5ddf8e4eb584" ], + "x-ms-correlation-request-id": [ "1945d50f-75b9-407a-8614-5ddf8e4eb584" ], + "x-ms-routing-request-id": [ "NORTHEUROPE:20230214T120004Z:1945d50f-75b9-407a-8614-5ddf8e4eb584" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Tue, 06 Sep 2022 14:54:05 GMT" ] + "Date": [ "Tue, 14 Feb 2023 12:00:03 GMT" ] }, "ContentHeaders": { "Content-Length": [ "503" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourcegroups/identity-jvsqdw9r/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityhknlo4\",\"name\":\"identityhknlo4\",\"type\":\"Microsoft.ManagedIdentity/userAssignedIdentities\",\"location\":\"centralus\",\"tags\":{\"key03\":\"value03\",\"key02\":\"value02\",\"key01\":\"value01\"},\"properties\":{\"tenantId\":\"a66b4d27-b1b3-4b60-8b06-7fb4fd05bc3c\",\"principalId\":\"9da8a443-1b0d-4aec-97df-d0b13d0c1903\",\"clientId\":\"44f98dd3-e1f6-4fe6-9579-5fb55a0f4603\"}}", + "Content": "{\"id\":\"/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourcegroups/identity-wmbx18cj/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identitybsw8q5\",\"name\":\"identitybsw8q5\",\"type\":\"Microsoft.ManagedIdentity/userAssignedIdentities\",\"location\":\"centralus\",\"tags\":{\"key01\":\"value01\",\"key02\":\"value02\",\"key03\":\"value03\"},\"properties\":{\"tenantId\":\"a66b4d27-b1b3-4b60-8b06-7fb4fd05bc3c\",\"principalId\":\"84d62ad1-cb0e-4c7f-b7c8-d716357ad438\",\"clientId\":\"40fc1be0-c9b4-44c1-8fe2-17463294f35c\"}}", "isContentBase64": false } } diff --git a/src/ManagedServiceIdentity/test/deployment-templates/app-service/parameters.json b/src/ManagedServiceIdentity/test/deployment-templates/app-service/parameters.json index 688add339a41..77c49ba6004c 100644 --- a/src/ManagedServiceIdentity/test/deployment-templates/app-service/parameters.json +++ b/src/ManagedServiceIdentity/test/deployment-templates/app-service/parameters.json @@ -3,13 +3,13 @@ "contentVersion": "1.0.0.0", "parameters": { "service_name": { - "value": "appServicegf62n9" + "value": "appService1l9p6y" }, "servicePlan_id": { - "value": "/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourceGroups/identity-jvsqdw9r/providers/Microsoft.Web/serverfarms/appServicePlanhzstpn" + "value": "/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourceGroups/identity-wmbx18cj/providers/Microsoft.Web/serverfarms/appServicePlani9g7zq" }, "ua_identity_id": { - "value": "/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourceGroups/ar-rg-8or9dp5v/providers/Microsoft.ManagedIdentity/userAssignedIdentities/ar-identity6al5po" + "value": "/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourceGroups/ar-rg-xh7yipq8/providers/Microsoft.ManagedIdentity/userAssignedIdentities/ar-identityidcz62" } } } diff --git a/src/ManagedServiceIdentity/test/deployment-templates/app-serviceplan/parameters.json b/src/ManagedServiceIdentity/test/deployment-templates/app-serviceplan/parameters.json index dab5640a3035..a1d663b6ff8a 100644 --- a/src/ManagedServiceIdentity/test/deployment-templates/app-serviceplan/parameters.json +++ b/src/ManagedServiceIdentity/test/deployment-templates/app-serviceplan/parameters.json @@ -3,7 +3,7 @@ "contentVersion": "1.0.0.0", "parameters": { "serviceplan_name": { - "value": "appServicePlanhzstpn" + "value": "appServicePlani9g7zq" } } } diff --git a/src/ManagedServiceIdentity/test/env.json b/src/ManagedServiceIdentity/test/env.json index 0d0439b592b2..ccef1916f7bd 100644 --- a/src/ManagedServiceIdentity/test/env.json +++ b/src/ManagedServiceIdentity/test/env.json @@ -1,28 +1,28 @@ { - "Issuer01": "https://kubernetes-oauth.azure.mpxq2a", - "ficUserIdentityName": "fic-identity-ws41z9", - "appServicePlanName": "appServicePlanhzstpn", - "Subject01": "system:serviceaccount:ns:svcaccount-5iaowt", - "userIdentityName01": "identityhknlo4", - "SubscriptionId": "0336439f-0e9d-44ec-975e-62accb9b3901", - "ficName01": "fic-27zqjk", - "Issuer03": "https://kubernetes-oauth.azure.has2xv", - "Subject02": "system:serviceaccount:ns:svcaccount-2s401c", - "appServiceName": "appServicegf62n9", - "userIdentityName02": "identityw6movs", - "associatedResourceResourceGroup": "ar-rg-8or9dp5v", - "userIdentityName03": "identity40avkf", - "location": "Central US", - "associatedResourceIdentityName": "ar-identity6al5po", - "ficName02": "fic-gwpmy6", - "ficResourceGroup": "fic-rg-1znoxkhq", - "appServiceId": "/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourceGroups/identity-jvsqdw9r/providers/Microsoft.Web/sites/appServicegf62n9", - "Issuer02": "https://kubernetes-oauth.azure.bntxv3", - "Tenant": "a66b4d27-b1b3-4b60-8b06-7fb4fd05bc3c", + "ficName02": "fic-blsv9r", + "Subject02": "system:serviceaccount:ns:svcaccount-f2p1wq", + "Issuer03": "https://kubernetes-oauth.azure.ou68i4", "ficAudience": [ "api://AzureADTokenExchange" ], - "ficName03": "fic-mwuszy", - "Subject03": "system:serviceaccount:ns:svcaccount-n4ugq7", - "resourceGroup": "identity-jvsqdw9r" + "SubscriptionId": "0336439f-0e9d-44ec-975e-62accb9b3901", + "ficUserIdentityName": "fic-identity-oqecha", + "resourceGroup": "identity-wmbx18cj", + "location": "Central US", + "Subject03": "system:serviceaccount:ns:svcaccount-dgysew", + "associatedResourceIdentityName": "ar-identityidcz62", + "Issuer01": "https://kubernetes-oauth.azure.pc6txw", + "ficName03": "fic-bqo1ic", + "userIdentityName01": "identitybsw8q5", + "userIdentityName03": "identity4qpm3e", + "ficName01": "fic-mdkys2", + "appServicePlanName": "appServicePlani9g7zq", + "userIdentityName02": "identityeo64yq", + "appServiceName": "appService1l9p6y", + "appServiceId": "/subscriptions/0336439f-0e9d-44ec-975e-62accb9b3901/resourceGroups/identity-wmbx18cj/providers/Microsoft.Web/sites/appService1l9p6y", + "Tenant": "a66b4d27-b1b3-4b60-8b06-7fb4fd05bc3c", + "Issuer02": "https://kubernetes-oauth.azure.npolvx", + "associatedResourceResourceGroup": "ar-rg-xh7yipq8", + "ficResourceGroup": "fic-rg-49ei1m3y", + "Subject01": "system:serviceaccount:ns:svcaccount-dq1fse" }