diff --git a/documentation/azure-powershell-modules.md b/documentation/azure-powershell-modules.md
index a3b5481c599d..e372a790d79f 100644
--- a/documentation/azure-powershell-modules.md
+++ b/documentation/azure-powershell-modules.md
@@ -27,9 +27,12 @@ Blueprints | `Az.Blueprint`
Content Delivery Network | `Az.Cdn` | [![Cdn]][CdnGallery]
Cognitive Services | `Az.CognitiveServices` | [![CognitiveServices]][CognitiveServicesGallery]
Compute | `Az.Compute` | [![Compute]][ComputeGallery]
+Connected Kubernetes | `Az.ConnectedKubernetes` | [![ConnectedKubernetes]][ConnectedKubernetesGallery]
+
Container Instance | `Az.ContainerInstance` | [![ContainerInstance]][ContainerInstanceGallery]
Container Registry | `Az.ContainerRegistry` | [![ContainerRegistry]][ContainerRegistryGallery]
Cosmos DB | `Az.CosmosDB` | [![CosmosDB]][CosmosDBGallery]
+Custom Resource Providers | `Az.CustomProviders` | [![CustomProviders]][CustomProvidersGallery]
Data Box | `Az.DataBox` | [![DataBox]][DataBoxGallery]
Data Box Edge (Stack Edge) | `Az.DataBoxEdge` | [![DataBoxEdge]][DataBoxEdgeGallery]
Databricks | `Az.Databricks` | [![Databricks]][DatabricksGallery]
@@ -49,6 +52,7 @@ Event Hubs | `Az.EventHub`
Front Door | `Az.FrontDoor` | [![FrontDoor]][FrontDoorGallery]
Functions | `Az.Functions` | [![Functions]][FunctionsGallery]
Guest Configuration | `Az.GuestConfiguration` | [![GuestConfiguration]][GuestConfigurationGallery]
+SAP HANA on Azure | `Az.HanaOnAzure` | [![HanaOnAzure]][HanaOnAzureGallery]
HDInsight | `Az.HDInsight` | [![HDInsight]][HDInsightGallery]
API for FHIR | `Az.HealthcareApis` | [![HealthcareApis]][HealthcareApisGallery]
HPC Cache | `Az.HPCCache` | [![HPCCache]][HPCCacheGallery]
@@ -57,6 +61,7 @@ Import/Export | `Az.ImportExport`
IoT Central | `Az.IotCentral` | [![IotCentral]][IotCentralGallery]
IoT Hub | `Az.IotHub` | [![IotHub]][IotHubGallery]
Key Vault | `Az.KeyVault` | [![KeyVault]][KeyVaultGallery]
+Kubernetes Configuration | `Az.KubernetesConfiguration` | [![KubernetesConfiguration]][KubernetesConfigurationGallery]
Kusto | `Az.Kusto` | [![Kusto]][KustoGallery]
Logic App | `Az.LogicApp` | [![LogicApp]][LogicAppGallery]
Machine Learning | `Az.MachineLearning` | [![MachineLearning]][MachineLearningGallery]
@@ -71,6 +76,7 @@ Marketplace Ordering | `Az.MarketplaceOrdering`
Media | `Az.Media` | [![Media]][MediaGallery]
Mixed Reality | `Az.MixedReality` | [![MixedReality]][MixedRealityGallery]
Monitor | `Az.Monitor` | [![Monitor]][MonitorGallery]
+Monitoring Solutions | `Az.MonitoringSolutions` | [![MonitoringSolutions]][MonitoringSolutionsGallery]
Database for MySQL | `Az.MySql` | [![MySql]][MySqlGallery]
NetApp Files | `Az.NetAppFiles` | [![NetAppFiles]][NetAppFilesGallery]
Network | `Az.Network` | [![Network]][NetworkGallery]
@@ -127,9 +133,11 @@ Web App Service | `Az.Websites`
[Cdn]: https://img.shields.io/powershellgallery/v/Az.Cdn.svg?style=flat-square&label=Az.Cdn
[CognitiveServices]: https://img.shields.io/powershellgallery/v/Az.CognitiveServices.svg?style=flat-square&label=Az.CognitiveServices
[Compute]: https://img.shields.io/powershellgallery/v/Az.Compute.svg?style=flat-square&label=Az.Compute
+[ConnectedKubernetes]: https://img.shields.io/powershellgallery/v/Az.ConnectedKubernetes.svg?style=flat-square&label=Az.ConnectedKubernetes
[ContainerInstance]: https://img.shields.io/powershellgallery/v/Az.ContainerInstance.svg?style=flat-square&label=Az.ContainerInstance
[ContainerRegistry]: https://img.shields.io/powershellgallery/v/Az.ContainerRegistry.svg?style=flat-square&label=Az.ContainerRegistry
[CosmosDB]: https://img.shields.io/powershellgallery/v/Az.CosmosDB.svg?style=flat-square&label=Az.CosmosDB
+[CustomProvidersDB]: https://img.shields.io/powershellgallery/v/Az.CustomProviders.svg?style=flat-square&label=Az.CustomProviders
[DataBox]: https://img.shields.io/powershellgallery/v/Az.DataBox.svg?style=flat-square&label=Az.DataBox
[DataBoxEdge]: https://img.shields.io/powershellgallery/v/Az.DataBoxEdge.svg?style=flat-square&label=Az.DataBoxEdge
[Databricks]: https://img.shields.io/powershellgallery/v/Az.Databricks.svg?style=flat-square&label=Az.Databricks
@@ -149,6 +157,7 @@ Web App Service | `Az.Websites`
[FrontDoor]: https://img.shields.io/powershellgallery/v/Az.FrontDoor.svg?style=flat-square&label=Az.FrontDoor
[Functions]: https://img.shields.io/powershellgallery/v/Az.Functions.svg?style=flat-square&label=Az.Functions
[GuestConfiguration]: https://img.shields.io/powershellgallery/v/Az.GuestConfiguration.svg?style=flat-square&label=Az.GuestConfiguration
+[HanaOnAzure]: https://img.shields.io/powershellgallery/v/Az.HanaOnAzure.svg?style=flat-square&label=Az.HanaOnAzure
[HDInsight]: https://img.shields.io/powershellgallery/v/Az.HDInsight.svg?style=flat-square&label=Az.HDInsight
[HealthcareApis]: https://img.shields.io/powershellgallery/v/Az.HealthcareApis.svg?style=flat-square&label=Az.HealthcareApis
[HPCCache]: https://img.shields.io/powershellgallery/v/Az.HPCCache.svg?style=flat-square&label=Az.HPCCache
@@ -157,6 +166,7 @@ Web App Service | `Az.Websites`
[IotCentral]: https://img.shields.io/powershellgallery/v/Az.IotCentral.svg?style=flat-square&label=Az.IotCentral
[IotHub]: https://img.shields.io/powershellgallery/v/Az.IotHub.svg?style=flat-square&label=Az.IotHub
[KeyVault]: https://img.shields.io/powershellgallery/v/Az.KeyVault.svg?style=flat-square&label=Az.KeyVault
+[KubernetesConfiguration]: https://img.shields.io/powershellgallery/v/Az.KubernetesConfiguration.svg?style=flat-square&label=Az.KubernetesConfiguration
[Kusto]: https://img.shields.io/powershellgallery/v/Az.Kusto.svg?style=flat-square&label=Az.Kusto
[LogicApp]: https://img.shields.io/powershellgallery/v/Az.LogicApp.svg?style=flat-square&label=Az.LogicApp
[MachineLearning]: https://img.shields.io/powershellgallery/v/Az.MachineLearning.svg?style=flat-square&label=Az.MachineLearning
@@ -171,6 +181,7 @@ Web App Service | `Az.Websites`
[Media]: https://img.shields.io/powershellgallery/v/Az.Media.svg?style=flat-square&label=Az.Media
[MixedReality]: https://img.shields.io/powershellgallery/v/Az.MixedReality.svg?style=flat-square&label=Az.MixedReality
[Monitor]: https://img.shields.io/powershellgallery/v/Az.Monitor.svg?style=flat-square&label=Az.Monitor
+[MonitoringSolutions]: https://img.shields.io/powershellgallery/v/Az.MonitoringSolutions.svg?style=flat-square&label=Az.MonitoringSolutions
[MySql]: https://img.shields.io/powershellgallery/v/Az.MySql.svg?style=flat-square&label=Az.MySql
[NetAppFiles]: https://img.shields.io/powershellgallery/v/Az.NetAppFiles.svg?style=flat-square&label=Az.NetAppFiles
[Network]: https://img.shields.io/powershellgallery/v/Az.Network.svg?style=flat-square&label=Az.Network
@@ -225,9 +236,11 @@ Web App Service | `Az.Websites`
[CdnGallery]: https://www.powershellgallery.com/packages/Az.Cdn/
[CognitiveServicesGallery]: https://www.powershellgallery.com/packages/Az.CognitiveServices/
[ComputeGallery]: https://www.powershellgallery.com/packages/Az.Compute/
+[ConnectedKubernetesGallery]: https://www.powershellgallery.com/packages/Az.ConnectedKubernetes/
[ContainerInstanceGallery]: https://www.powershellgallery.com/packages/Az.ContainerInstance/
[ContainerRegistryGallery]: https://www.powershellgallery.com/packages/Az.ContainerRegistry/
[CosmosDBGallery]: https://www.powershellgallery.com/packages/Az.CosmosDB/
+[CustomProvidersGallery]: https://www.powershellgallery.com/packages/Az.CustomProviders/
[DataBoxGallery]: https://www.powershellgallery.com/packages/Az.DataBox/
[DataBoxEdgeGallery]: https://www.powershellgallery.com/packages/Az.DataBoxEdge/
[DatabricksGallery]: https://www.powershellgallery.com/packages/Az.Databricks/
@@ -247,6 +260,7 @@ Web App Service | `Az.Websites`
[FrontDoorGallery]: https://www.powershellgallery.com/packages/Az.FrontDoor/
[FunctionsGallery]: https://www.powershellgallery.com/packages/Az.Functions/
[GuestConfigurationGallery]: https://www.powershellgallery.com/packages/Az.GuestConfiguration/
+[HanaOnAzureGallery]: https://www.powershellgallery.com/packages/Az.HanaOnAzure/
[HDInsightGallery]: https://www.powershellgallery.com/packages/Az.HDInsight/
[HealthcareApisGallery]: https://www.powershellgallery.com/packages/Az.HealthcareApis/
[HPCCacheGallery]: https://www.powershellgallery.com/packages/Az.HPCCache/
@@ -255,6 +269,7 @@ Web App Service | `Az.Websites`
[IotCentralGallery]: https://www.powershellgallery.com/packages/Az.IotCentral/
[IotHubGallery]: https://www.powershellgallery.com/packages/Az.IotHub/
[KeyVaultGallery]: https://www.powershellgallery.com/packages/Az.KeyVault/
+[KubernetesConfigurationGallery]: https://www.powershellgallery.com/packages/Az.KubernetesConfiguration/
[KustoGallery]: https://www.powershellgallery.com/packages/Az.Kusto/
[LogicAppGallery]: https://www.powershellgallery.com/packages/Az.LogicApp/
[MachineLearningGallery]: https://www.powershellgallery.com/packages/Az.MachineLearning/
@@ -269,6 +284,7 @@ Web App Service | `Az.Websites`
[MediaGallery]: https://www.powershellgallery.com/packages/Az.Media/
[MixedRealityGallery]: https://www.powershellgallery.com/packages/Az.MixedReality/
[MonitorGallery]: https://www.powershellgallery.com/packages/Az.Monitor/
+[MonitoringSolutionsGallery]: https://www.powershellgallery.com/packages/Az.MonitoringSolutions/
[MySqlGallery]: https://www.powershellgallery.com/packages/Az.MySql/
[NetAppFilesGallery]: https://www.powershellgallery.com/packages/Az.NetAppFiles/
[NetworkGallery]: https://www.powershellgallery.com/packages/Az.Network/
diff --git a/src/ConnectedKubernetes/Az.ConnectedKubernetes.csproj b/src/ConnectedKubernetes/Az.ConnectedKubernetes.csproj
new file mode 100644
index 000000000000..dc9d6760fd68
--- /dev/null
+++ b/src/ConnectedKubernetes/Az.ConnectedKubernetes.csproj
@@ -0,0 +1,7 @@
+
+
+ ConnectedKubernetes
+
+
+
+
\ No newline at end of file
diff --git a/src/ConnectedKubernetes/Az.ConnectedKubernetes.format.ps1xml b/src/ConnectedKubernetes/Az.ConnectedKubernetes.format.ps1xml
new file mode 100644
index 000000000000..abea45198d67
--- /dev/null
+++ b/src/ConnectedKubernetes/Az.ConnectedKubernetes.format.ps1xml
@@ -0,0 +1,477 @@
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ConnectedKubernetesIdentity
+
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ConnectedKubernetesIdentity
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ClusterName
+
+
+ ResourceGroupName
+
+
+ SubscriptionId
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.ConnectedCluster
+
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.ConnectedCluster
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Location
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.ConnectedClusterAadProfile
+
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.ConnectedClusterAadProfile
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ClientAppId
+
+
+ ServerAppId
+
+
+ TenantId
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.ConnectedClusterIdentity
+
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.ConnectedClusterIdentity
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ PrincipalId
+
+
+ TenantId
+
+
+ Type
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.ConnectedClusterList
+
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.ConnectedClusterList
+
+
+
+
+
+
+
+
+
+
+
+ NextLink
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.ConnectedClusterPatchProperties
+
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.ConnectedClusterPatchProperties
+
+
+
+
+
+
+
+
+
+
+
+ AgentPublicKeyCertificate
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.ConnectedClusterPatchTags
+
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.ConnectedClusterPatchTags
+
+
+
+
+
+
+
+
+
+
+
+ Item
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.ConnectedClusterProperties
+
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.ConnectedClusterProperties
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ AgentPublicKeyCertificate
+
+
+ AgentVersion
+
+
+ KubernetesVersion
+
+
+ ProvisioningState
+
+
+ TotalNodeCount
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.CredentialResult
+
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.CredentialResult
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ Value
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.ErrorDetails
+
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.ErrorDetails
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Code
+
+
+ Message
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.Operation
+
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.Operation
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.OperationDisplay
+
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.OperationDisplay
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Description
+
+
+ Operation
+
+
+ Provider
+
+
+ Resource
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.OperationList
+
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.OperationList
+
+
+
+
+
+
+
+
+
+
+
+ NextLink
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10.Resource
+
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10.Resource
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10.TrackedResource
+
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10.TrackedResource
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+ Location
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10.TrackedResourceTags
+
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10.TrackedResourceTags
+
+
+
+
+
+
+
+
+
+
+
+ Item
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/ConnectedKubernetes/Az.ConnectedKubernetes.psd1 b/src/ConnectedKubernetes/Az.ConnectedKubernetes.psd1
new file mode 100644
index 000000000000..11f80d725ca7
--- /dev/null
+++ b/src/ConnectedKubernetes/Az.ConnectedKubernetes.psd1
@@ -0,0 +1,25 @@
+@{
+ GUID = '59df8ab1-442a-41ae-9b55-60b505bae789'
+ RootModule = './Az.ConnectedKubernetes.psm1'
+ ModuleVersion = '0.1.0'
+ CompatiblePSEditions = 'Core', 'Desktop'
+ Author = 'Microsoft Corporation'
+ CompanyName = 'Microsoft Corporation'
+ Copyright = 'Microsoft Corporation. All rights reserved.'
+ Description = 'Microsoft Azure PowerShell: ConnectedKubernetes cmdlets'
+ PowerShellVersion = '5.1'
+ DotNetFrameworkVersion = '4.7.2'
+ RequiredAssemblies = './bin/Az.ConnectedKubernetes.private.dll'
+ RequiredModules = @(@{ModuleName = 'Az.Accounts'; ModuleVersion = '1.9.0'; })
+ FormatsToProcess = './Az.ConnectedKubernetes.format.ps1xml'
+ FunctionsToExport = 'Get-AzConnectedKubernetes', 'New-AzConnectedKubernetes', 'Remove-AzConnectedKubernetes', 'Update-AzConnectedKubernetes'
+ AliasesToExport = '*'
+ PrivateData = @{
+ PSData = @{
+ Tags = 'Azure', 'ResourceManager', 'ARM', 'PSModule', 'ConnectedKubernetes'
+ LicenseUri = 'https://aka.ms/azps-license'
+ ProjectUri = 'https://github.com/Azure/azure-powershell'
+ ReleaseNotes = '* the first preview release'
+ }
+ }
+}
diff --git a/src/ConnectedKubernetes/Az.ConnectedKubernetes.psm1 b/src/ConnectedKubernetes/Az.ConnectedKubernetes.psm1
new file mode 100644
index 000000000000..52bc33e74f63
--- /dev/null
+++ b/src/ConnectedKubernetes/Az.ConnectedKubernetes.psm1
@@ -0,0 +1,109 @@
+# region Generated
+ # ----------------------------------------------------------------------------------
+ #
+ # Copyright Microsoft Corporation
+ # Licensed under the Apache License, Version 2.0 (the "License");
+ # you may not use this file except in compliance with the License.
+ # You may obtain a copy of the License at
+ # http://www.apache.org/licenses/LICENSE-2.0
+ # Unless required by applicable law or agreed to in writing, software
+ # distributed under the License is distributed on an "AS IS" BASIS,
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ # See the License for the specific language governing permissions and
+ # limitations under the License.
+ # ----------------------------------------------------------------------------------
+ # Load required Az.Accounts module
+ $accountsName = 'Az.Accounts'
+ $accountsModule = Get-Module -Name $accountsName
+ if(-not $accountsModule) {
+ $localAccountsPath = Join-Path $PSScriptRoot 'generated\modules'
+ if(Test-Path -Path $localAccountsPath) {
+ $localAccounts = Get-ChildItem -Path $localAccountsPath -Recurse -Include 'Az.Accounts.psd1' | Select-Object -Last 1
+ if($localAccounts) {
+ $accountsModule = Import-Module -Name ($localAccounts.FullName) -Scope Global -PassThru
+ }
+ }
+ if(-not $accountsModule) {
+ $hasAdequateVersion = (Get-Module -Name $accountsName -ListAvailable | Where-Object { $_.Version -ge [System.Version]'1.7.4' } | Measure-Object).Count -gt 0
+ if($hasAdequateVersion) {
+ $accountsModule = Import-Module -Name $accountsName -MinimumVersion 1.7.4 -Scope Global -PassThru
+ }
+ }
+ }
+
+ if(-not $accountsModule) {
+ Write-Error "`nThis module requires $accountsName version 1.7.4 or greater. For installation instructions, please see: https://docs.microsoft.com/en-us/powershell/azure/install-az-ps" -ErrorAction Stop
+ } elseif (($accountsModule.Version -lt [System.Version]'1.7.4') -and (-not $localAccounts)) {
+ Write-Error "`nThis module requires $accountsName version 1.7.4 or greater. An earlier version of Az.Accounts is imported in the current PowerShell session. If you are running test, please try to remove '.PSSharedModules' in your home directory. 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
+ }
+ Write-Information "Loaded Module '$($accountsModule.Name)'"
+
+ # Load the private module dll
+ $null = Import-Module -Name (Join-Path $PSScriptRoot './bin/Az.ConnectedKubernetes.private.dll')
+
+ # Get the private module's instance
+ $instance = [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Module]::Instance
+
+ # Ask for the shared functionality table
+ $VTable = Register-AzModule
+
+ # Tweaks the pipeline on module load
+ $instance.OnModuleLoad = $VTable.OnModuleLoad
+
+ # Tweaks the pipeline per call
+ $instance.OnNewRequest = $VTable.OnNewRequest
+
+ # Gets shared parameter values
+ $instance.GetParameterValue = $VTable.GetParameterValue
+
+ # Allows shared module to listen to events from this module
+ $instance.EventListener = $VTable.EventListener
+
+ # Gets shared argument completers
+ $instance.ArgumentCompleter = $VTable.ArgumentCompleter
+
+ # The name of the currently selected Azure profile
+ $instance.ProfileName = $VTable.ProfileName
+
+
+ # Load the custom module
+ $customModulePath = Join-Path $PSScriptRoot './custom/Az.ConnectedKubernetes.custom.psm1'
+ if(Test-Path $customModulePath) {
+ $null = Import-Module -Name $customModulePath
+ }
+
+ # Export nothing to clear implicit exports
+ Export-ModuleMember
+
+ # Export proxy cmdlet scripts
+ $exportsPath = Join-Path $PSScriptRoot './exports'
+ $directories = Get-ChildItem -Directory -Path $exportsPath
+ $profileDirectory = $null
+ if($instance.ProfileName) {
+ if(($directories | ForEach-Object { $_.Name }) -contains $instance.ProfileName) {
+ $profileDirectory = $directories | Where-Object { $_.Name -eq $instance.ProfileName }
+ } else {
+ # Don't export anything if the profile doesn't exist for the module
+ $exportsPath = $null
+ Write-Warning "Selected Azure profile '$($instance.ProfileName)' does not exist for module '$($instance.Name)'. No cmdlets were loaded."
+ }
+ } elseif(($directories | Measure-Object).Count -gt 0) {
+ # Load the last folder if no profile is selected
+ $profileDirectory = $directories | Select-Object -Last 1
+ }
+
+ if($profileDirectory) {
+ Write-Information "Loaded Azure profile '$($profileDirectory.Name)' for module '$($instance.Name)'"
+ $exportsPath = $profileDirectory.FullName
+ }
+
+ if($exportsPath) {
+ Get-ChildItem -Path $exportsPath -Recurse -Include '*.ps1' -File | ForEach-Object { . $_.FullName }
+ $cmdletNames = Get-ScriptCmdlet -ScriptFolder $exportsPath
+ Export-ModuleMember -Function $cmdletNames -Alias (Get-ScriptCmdlet -ScriptFolder $exportsPath -AsAlias)
+ }
+
+ # Finalize initialization of this module
+ $instance.Init();
+ Write-Information "Loaded Module '$($instance.Name)'"
+# endregion
diff --git a/src/ConnectedKubernetes/ChangeLog.md b/src/ConnectedKubernetes/ChangeLog.md
new file mode 100644
index 000000000000..b76ecb79cf4a
--- /dev/null
+++ b/src/ConnectedKubernetes/ChangeLog.md
@@ -0,0 +1,24 @@
+
+## Upcoming Release
+
+## Version 0.1.0
+* the first preview release
+
diff --git a/src/ConnectedKubernetes/ConnectedKubernetes.sln b/src/ConnectedKubernetes/ConnectedKubernetes.sln
new file mode 100644
index 000000000000..709176957217
--- /dev/null
+++ b/src/ConnectedKubernetes/ConnectedKubernetes.sln
@@ -0,0 +1,48 @@
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 16
+VisualStudioVersion = 16.0.29709.97
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Accounts", "..\Accounts\Accounts\Accounts.csproj", "{142D7B0B-388A-4CEB-A228-7F6D423C5C2E}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Authentication", "..\Accounts\Authentication\Authentication.csproj", "{62843FE6-7575-4D88-B989-7DF7EEC0BC01}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Authentication.ResourceManager", "..\Accounts\Authentication.ResourceManager\Authentication.ResourceManager.csproj", "{442C609B-A431-4A71-B289-08F0B63C83E5}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Authenticators", "..\Accounts\Authenticators\Authenticators.csproj", "{59E8F6B8-8F0E-403F-B88B-9736DBC396D9}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Az.ConnectedKubernetes", "Az.ConnectedKubernetes.csproj", "{1C203C0C-E0FD-40D2-B79E-C6DA52E4E350}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {142D7B0B-388A-4CEB-A228-7F6D423C5C2E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {142D7B0B-388A-4CEB-A228-7F6D423C5C2E}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {142D7B0B-388A-4CEB-A228-7F6D423C5C2E}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {142D7B0B-388A-4CEB-A228-7F6D423C5C2E}.Release|Any CPU.Build.0 = Release|Any CPU
+ {62843FE6-7575-4D88-B989-7DF7EEC0BC01}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {62843FE6-7575-4D88-B989-7DF7EEC0BC01}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {62843FE6-7575-4D88-B989-7DF7EEC0BC01}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {62843FE6-7575-4D88-B989-7DF7EEC0BC01}.Release|Any CPU.Build.0 = Release|Any CPU
+ {442C609B-A431-4A71-B289-08F0B63C83E5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {442C609B-A431-4A71-B289-08F0B63C83E5}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {442C609B-A431-4A71-B289-08F0B63C83E5}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {442C609B-A431-4A71-B289-08F0B63C83E5}.Release|Any CPU.Build.0 = Release|Any CPU
+ {59E8F6B8-8F0E-403F-B88B-9736DBC396D9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {59E8F6B8-8F0E-403F-B88B-9736DBC396D9}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {59E8F6B8-8F0E-403F-B88B-9736DBC396D9}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {59E8F6B8-8F0E-403F-B88B-9736DBC396D9}.Release|Any CPU.Build.0 = Release|Any CPU
+ {1C203C0C-E0FD-40D2-B79E-C6DA52E4E350}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {1C203C0C-E0FD-40D2-B79E-C6DA52E4E350}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {1C203C0C-E0FD-40D2-B79E-C6DA52E4E350}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {1C203C0C-E0FD-40D2-B79E-C6DA52E4E350}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {F9B3D96E-9680-40BE-A917-02EE655D6030}
+ EndGlobalSection
+EndGlobal
diff --git a/src/ConnectedKubernetes/MSSharedLibKey.snk b/src/ConnectedKubernetes/MSSharedLibKey.snk
new file mode 100644
index 000000000000..695f1b38774e
Binary files /dev/null and b/src/ConnectedKubernetes/MSSharedLibKey.snk differ
diff --git a/src/ConnectedKubernetes/Properties/AssemblyInfo.cs b/src/ConnectedKubernetes/Properties/AssemblyInfo.cs
new file mode 100644
index 000000000000..3d8b538cdd3c
--- /dev/null
+++ b/src/ConnectedKubernetes/Properties/AssemblyInfo.cs
@@ -0,0 +1,28 @@
+// ----------------------------------------------------------------------------------
+//
+// Copyright Microsoft Corporation
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+// http://www.apache.org/licenses/LICENSE-2.0
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+// ----------------------------------------------------------------------------------
+
+using System;
+using System.Reflection;
+using System.Runtime.InteropServices;
+
+[assembly: AssemblyTitle("Microsoft Azure Powershell - ConnectedKubernetes")]
+[assembly: AssemblyCompany(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyCompany)]
+[assembly: AssemblyProduct(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyProduct)]
+[assembly: AssemblyCopyright(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyCopyright)]
+
+[assembly: ComVisible(false)]
+[assembly: CLSCompliant(false)]
+[assembly: Guid("CE93AF3C-92E0-4357-93A0-22A5766CDF13")]
+[assembly: AssemblyVersion("0.1.0")]
+[assembly: AssemblyFileVersion("0.1.0")]
\ No newline at end of file
diff --git a/src/ConnectedKubernetes/build-module.ps1 b/src/ConnectedKubernetes/build-module.ps1
new file mode 100644
index 000000000000..de0123a884d1
--- /dev/null
+++ b/src/ConnectedKubernetes/build-module.ps1
@@ -0,0 +1,153 @@
+# ----------------------------------------------------------------------------------
+#
+# Copyright Microsoft Corporation
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ----------------------------------------------------------------------------------
+param([switch]$Isolated, [switch]$Run, [switch]$Test, [switch]$Docs, [switch]$Pack, [switch]$Code, [switch]$Release, [switch]$Debugger, [switch]$NoDocs)
+$ErrorActionPreference = 'Stop'
+
+if($PSEdition -ne 'Core') {
+ Write-Error 'This script requires PowerShell Core to execute. [Note] Generated cmdlets will work in both PowerShell Core or Windows PowerShell.'
+}
+
+if(-not $Isolated -and -not $Debugger) {
+ Write-Host -ForegroundColor Green 'Creating isolated process...'
+ $pwsh = [System.Diagnostics.Process]::GetCurrentProcess().Path
+ & "$pwsh" -NonInteractive -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -Isolated
+
+ if($LastExitCode -ne 0) {
+ # Build failed. Don't attempt to run the module.
+ return
+ }
+
+ if($Test) {
+ . (Join-Path $PSScriptRoot 'test-module.ps1')
+ if($LastExitCode -ne 0) {
+ # Tests failed. Don't attempt to run the module.
+ return
+ }
+ }
+
+ if($Docs) {
+ . (Join-Path $PSScriptRoot 'generate-help.ps1')
+ if($LastExitCode -ne 0) {
+ # Docs generation failed. Don't attempt to run the module.
+ return
+ }
+ }
+
+ if($Pack) {
+ . (Join-Path $PSScriptRoot 'pack-module.ps1')
+ if($LastExitCode -ne 0) {
+ # Packing failed. Don't attempt to run the module.
+ return
+ }
+ }
+
+ $runModulePath = Join-Path $PSScriptRoot 'run-module.ps1'
+ if($Code) {
+ . $runModulePath -Code
+ } elseif($Run) {
+ . $runModulePath
+ } else {
+ Write-Host -ForegroundColor Cyan "To run this module in an isolated PowerShell session, run the 'run-module.ps1' script or provide the '-Run' parameter to this script."
+ }
+ return
+}
+
+$binFolder = Join-Path $PSScriptRoot 'bin'
+$objFolder = Join-Path $PSScriptRoot 'obj'
+
+if(-not $Debugger) {
+ Write-Host -ForegroundColor Green 'Cleaning build folders...'
+ $null = Remove-Item -Recurse -ErrorAction SilentlyContinue -Path $binFolder, $objFolder
+
+ if((Test-Path $binFolder) -or (Test-Path $objFolder)) {
+ Write-Host -ForegroundColor Cyan 'Did you forget to exit your isolated module session before rebuilding?'
+ Write-Error 'Unable to clean ''bin'' or ''obj'' folder. A process may have an open handle.'
+ }
+
+ Write-Host -ForegroundColor Green 'Compiling module...'
+ $buildConfig = 'Debug'
+ if($Release) {
+ $buildConfig = 'Release'
+ }
+ dotnet publish $PSScriptRoot --verbosity quiet --configuration $buildConfig /nologo
+ if($LastExitCode -ne 0) {
+ Write-Error 'Compilation failed.'
+ }
+
+ $null = Remove-Item -Recurse -ErrorAction SilentlyContinue -Path (Join-Path $binFolder 'Debug'), (Join-Path $binFolder 'Release')
+}
+
+$dll = Join-Path $PSScriptRoot 'bin\Az.ConnectedKubernetes.private.dll'
+if(-not (Test-Path $dll)) {
+ Write-Error "Unable to find output assembly in '$binFolder'."
+}
+
+# Load DLL to use build-time cmdlets
+$null = Import-Module -Name $dll
+
+$modulePaths = $dll
+$customPsm1 = Join-Path $PSScriptRoot 'custom\Az.ConnectedKubernetes.custom.psm1'
+if(Test-Path $customPsm1) {
+ $modulePaths = @($dll, $customPsm1)
+}
+
+$exportsFolder = Join-Path $PSScriptRoot 'exports'
+if(Test-Path $exportsFolder) {
+ $null = Get-ChildItem -Path $exportsFolder -Recurse -Exclude 'readme.md' | Remove-Item -Recurse -ErrorAction SilentlyContinue
+}
+$null = New-Item -ItemType Directory -Force -Path $exportsFolder
+
+$internalFolder = Join-Path $PSScriptRoot 'internal'
+if(Test-Path $internalFolder) {
+ $null = Get-ChildItem -Path $internalFolder -Recurse -Exclude '*.psm1', 'readme.md' | Remove-Item -Recurse -ErrorAction SilentlyContinue
+}
+$null = New-Item -ItemType Directory -Force -Path $internalFolder
+
+$psd1 = Join-Path $PSScriptRoot './Az.ConnectedKubernetes.psd1'
+$guid = Get-ModuleGuid -Psd1Path $psd1
+$moduleName = 'Az.ConnectedKubernetes'
+$examplesFolder = Join-Path $PSScriptRoot 'examples'
+$null = New-Item -ItemType Directory -Force -Path $examplesFolder
+
+if($NoDocs) {
+ Write-Host -ForegroundColor Green 'Creating exports...'
+ Export-ProxyCmdlet -ModuleName $moduleName -ModulePath $modulePaths -ExportsFolder $exportsFolder -InternalFolder $internalFolder -ExcludeDocs
+} else {
+ Write-Host -ForegroundColor Green 'Creating exports and docs...'
+ $moduleDescription = 'Microsoft Azure PowerShell: ConnectedKubernetes cmdlets'
+ $docsFolder = Join-Path $PSScriptRoot 'docs'
+ if(Test-Path $docsFolder) {
+ $null = Get-ChildItem -Path $docsFolder -Recurse -Exclude 'readme.md' | Remove-Item -Recurse -ErrorAction SilentlyContinue
+ }
+ $null = New-Item -ItemType Directory -Force -Path $docsFolder
+ Export-ProxyCmdlet -ModuleName $moduleName -ModulePath $modulePaths -ExportsFolder $exportsFolder -InternalFolder $internalFolder -ModuleDescription $moduleDescription -DocsFolder $docsFolder -ExamplesFolder $examplesFolder -ModuleGuid $guid
+}
+
+Write-Host -ForegroundColor Green 'Creating format.ps1xml...'
+$formatPs1xml = Join-Path $PSScriptRoot './Az.ConnectedKubernetes.format.ps1xml'
+Export-FormatPs1xml -FilePath $formatPs1xml
+
+Write-Host -ForegroundColor Green 'Creating psd1...'
+$customFolder = Join-Path $PSScriptRoot 'custom'
+Export-Psd1 -ExportsFolder $exportsFolder -CustomFolder $customFolder -Psd1Path $psd1 -ModuleGuid $guid
+
+Write-Host -ForegroundColor Green 'Creating test stubs...'
+$testFolder = Join-Path $PSScriptRoot 'test'
+$null = New-Item -ItemType Directory -Force -Path $testFolder
+Export-TestStub -ModuleName $moduleName -ExportsFolder $exportsFolder -OutputFolder $testFolder
+
+Write-Host -ForegroundColor Green 'Creating example stubs...'
+Export-ExampleStub -ExportsFolder $exportsFolder -OutputFolder $examplesFolder
+
+Write-Host -ForegroundColor Green '-------------Done-------------'
diff --git a/src/ConnectedKubernetes/check-dependencies.ps1 b/src/ConnectedKubernetes/check-dependencies.ps1
new file mode 100644
index 000000000000..5cd7ab5c808f
--- /dev/null
+++ b/src/ConnectedKubernetes/check-dependencies.ps1
@@ -0,0 +1,62 @@
+# ----------------------------------------------------------------------------------
+#
+# Copyright Microsoft Corporation
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ----------------------------------------------------------------------------------
+param([switch]$Isolated, [switch]$Accounts, [switch]$Pester, [switch]$Resources)
+$ErrorActionPreference = 'Stop'
+
+if(-not $Isolated) {
+ Write-Host -ForegroundColor Green 'Creating isolated process...'
+ $pwsh = [System.Diagnostics.Process]::GetCurrentProcess().Path
+ & "$pwsh" -NoExit -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -Isolated
+ return
+}
+
+function DownloadModule ([bool]$predicate, [string]$path, [string]$moduleName, [string]$versionMinimum) {
+ if($predicate) {
+ $module = Get-Module -ListAvailable -Name $moduleName
+ if((-not $module) -or ($versionMinimum -and ($module | ForEach-Object { $_.Version } | Where-Object { $_ -ge [System.Version]$versionMinimum } | Measure-Object).Count -eq 0)) {
+ $null = New-Item -ItemType Directory -Force -Path $path
+ Write-Host -ForegroundColor Green "Installing local $moduleName module into '$path'..."
+ if($versionMinimum) {
+ Find-Module -Name $moduleName -MinimumVersion $versionMinimum -Repository PSGallery | Save-Module -Path $path
+ } else {
+ Find-Module -Name $moduleName -Repository PSGallery | Save-Module -Path $path
+ }
+ }
+ }
+}
+
+$ProgressPreference = 'SilentlyContinue'
+$all = (@($Accounts.IsPresent, $Pester.IsPresent) | Select-Object -Unique | Measure-Object).Count -eq 1
+
+$localModulesPath = Join-Path $PSScriptRoot 'generated\modules'
+if(Test-Path -Path $localModulesPath) {
+ $env:PSModulePath = "$localModulesPath$([IO.Path]::PathSeparator)$env:PSModulePath"
+}
+
+DownloadModule -predicate ($all -or $Accounts) -path $localModulesPath -moduleName 'Az.Accounts' -versionMinimum '1.7.4'
+DownloadModule -predicate ($all -or $Pester) -path $localModulesPath -moduleName 'Pester' -versionMinimum ''
+
+$tools = Join-Path $PSScriptRoot 'tools'
+$resourceDir = Join-Path $tools 'Resources'
+$resourceModule = Join-Path $HOME '.PSSharedModules\Resources\Az.Resources.TestSupport.psm1'
+
+if ($Resources.IsPresent -and (-not (Test-Path -Path $resourceModule))) {
+ Write-Host -ForegroundColor Green "Building local Resource module used for test..."
+ Set-Location $resourceDir
+ $null = autorest-beta .\readme.md --output-folder=$HOME/.PSSharedModules/Resources
+ $null = Copy-Item custom/* $HOME/.PSSharedModules/Resources/custom/
+ Set-Location $HOME/.PSSharedModules/Resources
+ $null = .\build-module.ps1
+ Set-Location $PSScriptRoot
+}
diff --git a/src/ConnectedKubernetes/custom/Az.ConnectedKubernetes.custom.psm1 b/src/ConnectedKubernetes/custom/Az.ConnectedKubernetes.custom.psm1
new file mode 100644
index 000000000000..98305bb3def3
--- /dev/null
+++ b/src/ConnectedKubernetes/custom/Az.ConnectedKubernetes.custom.psm1
@@ -0,0 +1,17 @@
+# region Generated
+ # Load the private module dll
+ $null = Import-Module -PassThru -Name (Join-Path $PSScriptRoot '../bin/Az.ConnectedKubernetes.private.dll')
+
+ # Load the internal module
+ $internalModulePath = Join-Path $PSScriptRoot '../internal/Az.ConnectedKubernetes.internal.psm1'
+ if(Test-Path $internalModulePath) {
+ $null = Import-Module -Name $internalModulePath
+ }
+
+ # Export nothing to clear implicit exports
+ Export-ModuleMember
+
+ # Export script cmdlets
+ Get-ChildItem -Path $PSScriptRoot -Recurse -Include '*.ps1' -File | ForEach-Object { . $_.FullName }
+ Export-ModuleMember -Function (Get-ScriptCmdlet -ScriptFolder $PSScriptRoot) -Alias (Get-ScriptCmdlet -ScriptFolder $PSScriptRoot -AsAlias)
+# endregion
diff --git a/src/ConnectedKubernetes/custom/New-AzConnectedKubernetes.ps1 b/src/ConnectedKubernetes/custom/New-AzConnectedKubernetes.ps1
new file mode 100644
index 000000000000..e0832426fb6e
--- /dev/null
+++ b/src/ConnectedKubernetes/custom/New-AzConnectedKubernetes.ps1
@@ -0,0 +1,273 @@
+
+# ----------------------------------------------------------------------------------
+#
+# Copyright Microsoft Corporation
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ----------------------------------------------------------------------------------
+
+<#
+.Synopsis
+API to register a new K8s cluster and thereby create a tracked resource in ARM
+.Description
+API to register a new K8s cluster and thereby create a tracked resource in ARM
+
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedCluster
+.Link
+https://docs.microsoft.com/en-us/powershell/module/az.connectedkubernetes/new-azconnectedkubernetes
+#>
+function New-AzConnectedKubernetes {
+ [OutputType([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedCluster])]
+ [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
+ param(
+ [Parameter(Mandatory)]
+ [Alias('Name')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Path')]
+ [System.String]
+ # The name of the Kubernetes cluster on which get is called.
+ ${ClusterName},
+
+ [Parameter(Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Path')]
+ [System.String]
+ # The name of the resource group to which the kubernetes cluster is registered.
+ ${ResourceGroupName},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
+ [System.String]
+ # The ID of the subscription to which the kubernetes cluster is registered.
+ ${SubscriptionId},
+
+ [Parameter(HelpMessage="Path to the kube config file")]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')]
+ [System.String]
+ # Path to the kube config file
+ ${KubeConfig},
+
+ [Parameter(HelpMessage="Kubconfig context from current machine")]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')]
+ [System.String]
+ # Kubconfig context from current machine
+ ${KubeContext},
+
+ [Parameter(Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')]
+ [System.String]
+ # Location of the cluster
+ ${Location},
+
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Azure')]
+ [System.Management.Automation.PSObject]
+ # The credentials, account, tenant, and subscription used for communication with Azure.
+ ${DefaultProfile},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Wait for .NET debugger to attach
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline
+ ${HttpPipelinePrepend},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Use the default credentials for the proxy
+ ${ProxyUseDefaultCredentials}
+ )
+
+ process {
+ if ($PSBoundParameters.ContainsKey('KubeConfig')) {
+ $Null = $PSBoundParameters.Remove('KubeConfig')
+ } elseif (Test-Path Env:KUBECONFIG) {
+ $KubeConfig = Get-ChildItem -Path Env:KUBECONFIG
+ } elseif (Test-Path Env:Home) {
+ $KubeConfig = Join-Path -Path $Env:Home -ChildPath '.kube' | Join-Path -ChildPath 'config'
+ } else {
+ $KubeConfig = Join-Path -Path $Home -ChildPath '.kube' | Join-Path -ChildPath 'config'
+ }
+ if (-not (Test-Path $KubeConfig)) {
+ Write-Error 'Cannot find the kube-config. Please make sure that you have the kube-config on your machine.'
+ return
+ }
+ if ($PSBoundParameters.ContainsKey('KubeContext')) {
+ $Null = $PSBoundParameters.Remove('KubeContext')
+ }
+ if (($KubeContext -eq $null) -or ($KubeContext -eq '')) {
+ $KubeContext = kubectl config current-context
+ }
+
+ $CommonPSBoundParameters = @{}
+ if ($PSBoundParameters.ContainsKey('HttpPipelineAppend')) {
+ $CommonPSBoundParameters['HttpPipelineAppend'] = $HttpPipelineAppend
+ }
+ if ($PSBoundParameters.ContainsKey('HttpPipelinePrepend')) {
+ $CommonPSBoundParameters['HttpPipelinePrepend'] = $HttpPipelinePrepend
+ }
+ if ($PSBoundParameters.ContainsKey('SubscriptionId')) {
+ $CommonPSBoundParameters['SubscriptionId'] = $SubscriptionId
+ }
+ $AadProfileClientAppId = ''
+ $PSBoundParameters.Add('AadProfileClientAppId', $AadProfileClientAppId)
+ $AadProfileServerAppId = ''
+ $PSBoundParameters.Add('AadProfileServerAppId', $AadProfileServerAppId)
+ $AadProfileTenantId = ''
+ $PSBoundParameters.Add('AadProfileTenantId', $AadProfileTenantId)
+ $IdentityType = [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ResourceIdentityType]::SystemAssigned
+ $PSBoundParameters.Add('IdentityType', $IdentityType)
+
+ #Region check helm install
+ try {
+ $HelmVersion = helm version --short --kubeconfig $KubeConfig
+ if ($HelmVersion.Contains("v2")) {
+ Write-Error "Helm version 3+ is required. Ensure that you have installed the latest version of Helm. Learn more at https://aka.ms/arc/k8s/onboarding-helm-install"
+ return
+ }
+ } catch {
+ Write-Error "Helm version 3+ is required. Ensure that you have installed the latest version of Helm. Learn more at https://aka.ms/arc/k8s/onboarding-helm-install"
+ throw
+ }
+ #EndRegion
+
+ #Region get release namespace
+ $ReleaseNamespace = $null
+ try {
+ $ReleaseNamespace = (helm status azure-arc -o json --kubeconfig $KubeConfig --kube-context $KubeContext | ConvertFrom-Json).namespace
+ } catch {
+ Write-Error "Fail to find the namespace for azure-arc."
+ }
+ #Endregion
+
+ if ($null -ne $ReleaseNamespace) {
+ # $Configmap = kubectl get configmap --namespace azure-arc azure-clusterconfig -o json --kubeconfig $KubeConfig | ConvertFrom-Json
+ # $ConfigmapRgName = $Configmap.data.AZURE_RESOURCE_GROUP
+ # $ConfigmapClusterName = $Configmap.data.AZURE_RESOURCE_NAME
+ try {
+ $ExistConnectedKubernetes = Get-AzConnectedKubernetes -ResourceGroupName $ResourceGroupName -ClusterName $ClusterName @CommonPSBoundParameters
+
+ $PSBoundParameters.Add('AgentPublicKeyCertificate', $ExistConnectedKubernetes.AgentPublicKeyCertificate)
+ Az.ConnectedKubernetes.internal\New-AzConnectedKubernetes @PSBoundParameters
+ # if (($ResourceGroupName -eq $ConfigmapRgName) -and ($ClusterName -eq $ConfigmapClusterName)) {
+ # $PSBoundParameters.Add('AgentPublicKeyCertificate', $ExistConnectedKubernetes.AgentPublicKeyCertificate)
+ # Az.ConnectedKubernetes.internal\New-AzConnectedKubernetes @PSBoundParameters
+ # } else {
+ # Write-Error "The kubernetes cluster you are trying to onboard is already onboarded to the resource group '${ConfigmapRgName}' with resource name '${ConfigmapClusterName}'."
+ # }
+ # return
+ } catch {
+ helm delete azure-arc --namespace $ReleaseNamespace --kubeconfig $KubeConfig --kube-context $KubeContext
+ }
+ }
+
+ if ((Test-Path Env:HELMREPONAME) -and (Test-Path Env:HELMREPOURL)) {
+ $HelmRepoName = Get-ChildItem -Path Env:HELMREPONAME
+ $HelmRepoUrl = Get-ChildItem -Path Env:HELMREPOURL
+ helm repo add $HelmRepoName $HelmRepoUrl --kubeconfig $KubeConfig --kube-context $KubeContext
+ }
+
+ if (Test-Path Env:HELMREGISTRY) {
+ $RegisteryPath = Get-ChildItem -Path Env:HELMREGISTRY
+ } else {
+ $ReleaseTrain = ''
+ if ((Test-Path Env:RELEASETRAIN) -and (Test-Path Env:RELEASETRAIN)) {
+ $ReleaseTrain = Get-ChildItem -Path Env:RELEASETRAIN
+ } else {
+ $ReleaseTrain = 'stable'
+ }
+ $ChartLocationUrl = "https://${Location}.dp.kubernetesconfiguration.azure.com/azure-arc-k8sagents/GetLatestHelmPackagePath?api-version=2019-11-01-preview&releaseTrain=${ReleaseTrain}"
+
+ $Uri = [System.Uri]::New($ChartLocationUrl)
+ $Account = [Microsoft.Azure.Commands.Common.Authentication.Abstractions.AzureRmProfileProvider]::Instance.Profile.DefaultContext.Account
+ $Env = [Microsoft.Azure.Commands.Common.Authentication.Abstractions.AzureEnvironment]::PublicEnvironments[[Microsoft.Azure.Commands.Common.Authentication.Abstractions.EnvironmentName]::AzureCloud]
+ $TenantId = [Microsoft.Azure.Commands.Common.Authentication.Abstractions.AzureRmProfileProvider]::Instance.Profile.DefaultContext.Tenant.Id
+ $PromptBehavior = [Microsoft.Azure.Commands.Common.Authentication.ShowDialog]::Never
+ $Token = [Microsoft.Azure.Commands.Common.Authentication.AzureSession]::Instance.AuthenticationFactory.Authenticate($account, $env, $tenantId, $null, $promptBehavior, $null)
+ $AccessToken = $Token.AccessToken
+
+ $HeaderParameter = @{
+ "Authorization" = "Bearer $AccessToken"
+ }
+ $Response = Invoke-WebRequest -Uri $Uri -Headers $HeaderParameter -Method Post
+ if ($Response.StatusCode -eq 200) {
+ $RegisteryPath = ($Response.Content | ConvertFrom-Json).repositoryPath
+ } else {
+ Write-Error "Error while fetching helm chart registry path: ${$Response.RawContent}"
+ throw
+ }
+ }
+ Set-Item -Path Env:HELM_EXPERIMENTAL_OCI -Value 1
+ #Region pull helm chart
+ try {
+ helm chart pull $RegisteryPath --kubeconfig $KubeConfig --kube-context $KubeContext
+ } catch {
+ Write-Error "Unable to pull helm chart from the registery $RegisteryPath"
+ throw
+ }
+ #Endregion
+
+ #Region export helm chart
+ $ChartExportPath = Join-Path -Path (Get-Item Env:HOME).Value -ChildPath '.azure' | Join-Path -ChildPath 'AzureArcCharts'
+ try {
+ helm chart export $RegisteryPath --kubeconfig $KubeConfig --kube-context $KubeContext --destination $ChartExportPath
+ } catch {
+ Write-Error "Unable to export helm chart from the registery $RegisteryPath"
+ throw
+ }
+ #Endregion
+
+ $RSA = [System.Security.Cryptography.RSA]::Create(4096)
+ $AgentPublicKey = [System.Convert]::ToBase64String($RSA.ExportRSAPublicKey())
+ $AgentPrivateKey = [System.Convert]::ToBase64String($RSA.ExportRSAPrivateKey())
+
+ $HelmChartPath = Join-Path -Path $ChartExportPath -ChildPath 'azure-arc-k8sagents'
+ if (Test-Path Env:HELMCHART) {
+ $ChartPath = Get-ChildItem -Path Env:HELMCHART
+ } else {
+ $ChartPath = $HelmChartPath
+ }
+
+ $TenantId = [Microsoft.Azure.Commands.Common.Authentication.Abstractions.AzureRmProfileProvider]::Instance.Profile.DefaultContext.Tenant.Id
+ helm upgrade --install azure-arc $ChartPath --set global.subscriptionId=$SubscriptionId --set global.resourceGroupName=$ResourceGroupName --set global.resourceName=$ClusterName --set global.tenantId=$TenantId --set global.location=$Location --set global.onboardingPrivateKey=$AgentPrivateKey --set systemDefaultValues.spnOnboarding=false --kubeconfig $KubeConfig --kube-context $KubeContext
+
+ $PSBoundParameters.Add('AgentPublicKeyCertificate', $AgentPublicKey)
+ Az.ConnectedKubernetes.internal\New-AzConnectedKubernetes @PSBoundParameters
+ }
+}
diff --git a/src/ConnectedKubernetes/custom/Remove-AzConnectedKubernetes.ps1 b/src/ConnectedKubernetes/custom/Remove-AzConnectedKubernetes.ps1
new file mode 100644
index 000000000000..0492a667023b
--- /dev/null
+++ b/src/ConnectedKubernetes/custom/Remove-AzConnectedKubernetes.ps1
@@ -0,0 +1,214 @@
+
+# ----------------------------------------------------------------------------------
+#
+# Copyright Microsoft Corporation
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ----------------------------------------------------------------------------------
+
+<#
+.Synopsis
+Delete a connected cluster, removing the tracked resource in Azure Resource Manager (ARM).
+.Description
+Delete a connected cluster, removing the tracked resource in Azure Resource Manager (ARM).
+
+.Inputs
+Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedKubernetesIdentity
+.Outputs
+System.Boolean
+.Notes
+COMPLEX PARAMETER PROPERTIES
+
+To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables.
+
+INPUTOBJECT : Identity Parameter
+ [ClusterName ]: The name of the Kubernetes cluster on which get is called.
+ [Id ]: Resource identity path
+ [ResourceGroupName ]: The name of the resource group. The name is case insensitive.
+ [SubscriptionId ]: The ID of the target subscription.
+.Link
+https://docs.microsoft.com/en-us/powershell/module/az.connectedkubernetes/remove-azconnectedkubernetes
+#>
+function Remove-AzConnectedKubernetes {
+[OutputType([System.Boolean])]
+[CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
+param(
+ [Parameter(ParameterSetName='Delete', Mandatory)]
+ [Alias('Name')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Path')]
+ [System.String]
+ # The name of the Kubernetes cluster on which get is called.
+ ${ClusterName},
+
+ [Parameter(ParameterSetName='Delete', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Path')]
+ [System.String]
+ # The name of the resource group.
+ # The name is case insensitive.
+ ${ResourceGroupName},
+
+ [Parameter(HelpMessage="Path to the kube config file")]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')]
+ [System.String]
+ # Path to the kube config file
+ ${KubeConfig},
+
+ [Parameter(HelpMessage="Kubconfig context from current machine")]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')]
+ [System.String]
+ # Kubconfig context from current machine
+ ${KubeContext},
+
+ [Parameter(ParameterSetName='Delete')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
+ [System.String]
+ # The ID of the target subscription.
+ ${SubscriptionId},
+
+ [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedKubernetesIdentity]
+ # Identity Parameter
+ # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
+ ${InputObject},
+
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Azure')]
+ [System.Management.Automation.PSObject]
+ # The credentials, account, tenant, and subscription used for communication with Azure.
+ ${DefaultProfile},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Run the command as a job
+ ${AsJob},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Wait for .NET debugger to attach
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline
+ ${HttpPipelinePrepend},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Run the command asynchronously
+ ${NoWait},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Returns true when the command succeeds
+ ${PassThru},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Use the default credentials for the proxy
+ ${ProxyUseDefaultCredentials}
+)
+
+ process {
+ if ($PSBoundParameters.ContainsKey('KubeConfig')) {
+ $Null = $PSBoundParameters.Remove('KubeConfig')
+ } elseif (Test-Path Env:KUBECONFIG) {
+ $KubeConfig = Get-ChildItem -Path Env:KUBECONFIG
+ } elseif (Test-Path Env:Home) {
+ $KubeConfig = Join-Path -Path $Env:Home -ChildPath '.kube' | Join-Path -ChildPath 'config'
+ } else {
+ $KubeConfig = Join-Path -Path $Home -ChildPath '.kube' | Join-Path -ChildPath 'config'
+ }
+ if (-not (Test-Path $KubeConfig)) {
+ Write-Error 'Cannot find the kube-config. Please make sure that you have the kube-config on your machine.'
+ return
+ }
+ if ($PSBoundParameters.ContainsKey('KubeContext')) {
+ $Null = $PSBoundParameters.Remove('KubeContext')
+ }
+ if (($KubeContext -eq $null) -or ($KubeContext -eq '')) {
+ $KubeContext = kubectl config current-context
+ }
+
+ #Region check helm install
+ try {
+ $HelmVersion = helm version --short --kubeconfig $KubeConfig
+ if ($HelmVersion.Contains("v2")) {
+ Write-Error "Helm version 3+ is required. Ensure that you have installed the latest version of Helm. Learn more at https://aka.ms/arc/k8s/onboarding-helm-install"
+ return
+ }
+ } catch {
+ Write-Error "Helm version 3+ is required. Ensure that you have installed the latest version of Helm. Learn more at https://aka.ms/arc/k8s/onboarding-helm-install"
+ throw
+ }
+ #Endregion
+
+ #Region get release namespace
+ $ReleaseNamespace = $null
+ try {
+ $ReleaseNamespace = (helm status azure-arc -o json --kubeconfig $KubeConfig --kube-context $KubeContext | ConvertFrom-Json).namespace
+ } catch {
+ Write-Error "Fail to find the namespace for azure-arc."
+ }
+ #Endregion
+
+ if ($null -eq $ReleaseNamespace) {
+ Az.ConnectedKubernetes.internal\Remove-AzConnectedKubernetes @PSBoundParameters
+ return
+ }
+
+ $Configmap = kubectl get configmap --namespace azure-arc azure-clusterconfig -o json --kubeconfig $KubeConfig | ConvertFrom-Json
+ $ConfigmapRgName = $Configmap.data.AZURE_RESOURCE_GROUP
+ $ConfigmapClusterName = $Configmap.data.AZURE_RESOURCE_NAME
+ if ($PSBoundParameters.ContainsKey('InputObject')) {
+ $ResourceGroupName = $InputObject.ResourceGroupName
+ $ClusterName = $InputObject.ClusterName
+ $Null = $PSBoundParameters.Remove('InputObject')
+ $PSBoundParameters.Add('ResourceGroupName')
+ $PSBoundParameters.Add('ClusterName')
+ }
+ if (($ResourceGroupName -eq $ConfigmapRgName) -and ($ClusterName -eq $ConfigmapClusterName)) {
+ Az.ConnectedKubernetes.internal\Remove-AzConnectedKubernetes @PSBoundParameters
+ helm delete azure-arc --namespace $ReleaseNamespace --kubeconfig $KubeConfig --kube-context $KubeContext
+ } else {
+ Write-Error "The current context in the kubeconfig file does not correspond to the connected cluster resource specified. Agents installed on this cluster correspond to the resource group name '$ConfigmapRgName' and resource name '$ConfigmapClusterName'."
+ }
+ }
+}
diff --git a/src/ConnectedKubernetes/custom/Update-AzConnectedKubernetes.ps1 b/src/ConnectedKubernetes/custom/Update-AzConnectedKubernetes.ps1
new file mode 100644
index 000000000000..245140ee0c54
--- /dev/null
+++ b/src/ConnectedKubernetes/custom/Update-AzConnectedKubernetes.ps1
@@ -0,0 +1,129 @@
+
+# ----------------------------------------------------------------------------------
+#
+# Copyright Microsoft Corporation
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ----------------------------------------------------------------------------------
+
+<#
+.Synopsis
+API to update certain properties of the connected cluster resource.
+.Description
+API to update certain properties of the connected cluster resource.
+
+.Inputs
+Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedKubernetesIdentity
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedCluster
+.Notes
+COMPLEX PARAMETER PROPERTIES
+
+To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables.
+
+INPUTOBJECT : Identity Parameter
+ [ClusterName ]: The name of the Kubernetes cluster on which get is called.
+ [Id ]: Resource identity path
+ [ResourceGroupName ]: The name of the resource group. The name is case insensitive.
+ [SubscriptionId ]: The ID of the target subscription.
+.Link
+https://docs.microsoft.com/en-us/powershell/module/az.connectedkubernetes/update-azconnectedkubernetes
+#>
+function Update-AzConnectedKubernetes {
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedCluster])]
+[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
+param(
+ [Parameter(ParameterSetName='UpdateExpanded', Mandatory)]
+ [Alias('Name')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Path')]
+ [System.String]
+ # The name of the Kubernetes cluster on which get is called.
+ ${ClusterName},
+
+ [Parameter(ParameterSetName='UpdateExpanded', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Path')]
+ [System.String]
+ # The name of the resource group.
+ # The name is case insensitive.
+ ${ResourceGroupName},
+
+ [Parameter(ParameterSetName='UpdateExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
+ [System.String]
+ # The ID of the target subscription.
+ ${SubscriptionId},
+
+ [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedKubernetesIdentity]
+ # Identity Parameter
+ # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
+ ${InputObject},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterPatchTags]))]
+ [System.Collections.Hashtable]
+ # Resource tags.
+ ${Tag},
+
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Azure')]
+ [System.Management.Automation.PSObject]
+ # The credentials, account, tenant, and subscription used for communication with Azure.
+ ${DefaultProfile},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Wait for .NET debugger to attach
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline
+ ${HttpPipelinePrepend},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Use the default credentials for the proxy
+ ${ProxyUseDefaultCredentials}
+)
+
+ process {
+ Az.ConnectedKubernetes.internal\Update-AzConnectedKubernetes @PSBoundParameters
+ }
+}
diff --git a/src/ConnectedKubernetes/custom/readme.md b/src/ConnectedKubernetes/custom/readme.md
new file mode 100644
index 000000000000..275122977ca8
--- /dev/null
+++ b/src/ConnectedKubernetes/custom/readme.md
@@ -0,0 +1,41 @@
+# Custom
+This directory contains custom implementation for non-generated cmdlets for the `Az.ConnectedKubernetes` module. Both scripts (`.ps1`) and C# files (`.cs`) can be implemented here. They will be used during the build process in `build-module.ps1`, and create cmdlets into the `..\exports` folder. The only generated file into this folder is the `Az.ConnectedKubernetes.custom.psm1`. This file should not be modified.
+
+## Info
+- Modifiable: yes
+- Generated: partial
+- Committed: yes
+- Packaged: yes
+
+## Details
+For `Az.ConnectedKubernetes` to use custom cmdlets, it does this two different ways. We **highly recommend** creating script cmdlets, as they are easier to write and allow access to the other exported cmdlets. C# cmdlets *cannot access exported cmdlets*.
+
+For C# cmdlets, they are compiled with the rest of the generated low-level cmdlets into the `./bin/Az.ConnectedKubernetes.private.dll`. The names of the cmdlets (methods) and files must follow the `[cmdletName]_[variantName]` syntax used for generated cmdlets. The `variantName` is used as the `ParameterSetName`, so use something appropriate that doesn't clash with already created variant or parameter set names. You cannot use the `ParameterSetName` property in the `Parameter` attribute on C# cmdlets. Each cmdlet must be separated into variants using the same pattern as seen in the `generated/cmdlets` folder.
+
+For script cmdlets, these are loaded via the `Az.ConnectedKubernetes.custom.psm1`. Then, during the build process, this module is loaded and processed in the same manner as the C# cmdlets. The fundemental difference is the script cmdlets use the `ParameterSetName` attribute and C# cmdlets do not. To create a script cmdlet variant of a generated cmdlet, simply decorate all parameters in the script with the new `ParameterSetName` in the `Parameter` attribute. This will appropriately treat each parameter set as a separate variant when processed to be exported during the build.
+
+## Purpose
+This allows the modules to have cmdlets that were not defined in the REST specification. It also allows combining logic using generated cmdlets. This is a level of customization beyond what can be done using the [readme configuration options](https://github.com/Azure/autorest/blob/master/docs/powershell/options.md) that are currently available. These custom cmdlets are then referenced by the cmdlets created at build-time in the `..\exports` folder.
+
+## Usage
+The easiest way currently to start developing custom cmdlets is to copy an existing cmdlet. For C# cmdlets, copy one from the `generated/cmdlets` folder. For script cmdlets, build the project using `build-module.ps1` and copy one of the scripts from the `..\exports` folder. After that, if you want to add new parameter sets, follow the guidelines in the `Details` section above. For implementing a new cmdlets, at minimum, please keep these parameters:
+- Break
+- DefaultProfile
+- HttpPipelineAppend
+- HttpPipelinePrepend
+- Proxy
+- ProxyCredential
+- ProxyUseDefaultCredentials
+
+These provide functionality to our HTTP pipeline and other useful features. In script, you can forward these parameters using `$PSBoundParameters` to the other cmdlets you're calling within `Az.ConnectedKubernetes`. For C#, follow the usage seen in the `ProcessRecordAsync` method.
+
+### Attributes
+For processing the cmdlets, we've created some additional attributes:
+- `Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.DescriptionAttribute`
+ - Used in C# cmdlets to provide a high-level description of the cmdlet. This is propegated to reference documentation via [help comments](https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_comment_based_help) in the exported scripts.
+- `Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.DoNotExportAttribute`
+ - Used in C# and script cmdlets to suppress creating an exported cmdlet at build-time. These cmdlets will *not be exposed* by `Az.ConnectedKubernetes`.
+- `Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.InternalExportAttribute`
+ - Used in C# cmdlets to route exported cmdlets to the `..\internal`, which are *not exposed* by `Az.ConnectedKubernetes`. For more information, see [readme.md](..\internal/readme.md) in the `..\internal` folder.
+- `Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.ProfileAttribute`
+ - Used in C# and script cmdlets to define which Azure profiles the cmdlet supports. This is only supported for Azure (`--azure`) modules.
\ No newline at end of file
diff --git a/src/ConnectedKubernetes/examples/Get-AzConnectedKubernetes.md b/src/ConnectedKubernetes/examples/Get-AzConnectedKubernetes.md
new file mode 100644
index 000000000000..9958cc085709
--- /dev/null
+++ b/src/ConnectedKubernetes/examples/Get-AzConnectedKubernetes.md
@@ -0,0 +1,54 @@
+### Example 1: Get all connected kubernetes under a subscription
+```powershell
+PS C:\> Get-AzConnectedKubernetes
+
+Location Name Type
+-------- ---- ----
+eastus connected-aks Microsoft.Kubernetes/connectedClusters
+eastus connected-pwsh-aks Microsoft.Kubernetes/connectedClusters
+eastus connected-pwsh-aks1 Microsoft.Kubernetes/connectedClusters
+eastus connected-pwsh-aks3 Microsoft.Kubernetes/connectedClusters
+eastus connected-aks-cli1 Microsoft.Kubernetes/connectedClusters
+```
+
+This command gets all connected kubernetes under a subscription.
+
+### Example 2: Get all connected kubernetes under the resource group
+```powershell
+PS C:\> Get-AzConnectedKubernetes -ResourceGroupName connected-aks
+
+Location Name Type
+-------- ---- ----
+eastus connected-aks Microsoft.Kubernetes/connectedClusters
+eastus connected-pwsh-aks Microsoft.Kubernetes/connectedClusters
+eastus connected-pwsh-aks1 Microsoft.Kubernetes/connectedClusters
+eastus connected-pwsh-aks3 Microsoft.Kubernetes/connectedClusters
+eastus connected-aks-cli1 Microsoft.Kubernetes/connectedClusters
+```
+
+This command gets all connected kubernetes under the resource group.
+
+### Example 3: Get a connected kubernetes
+```powershell
+PS C:\> Get-AzConnectedKubernetes -ResourceGroupName connected-aks -Name connected-pwsh-aks
+
+Location Name Type
+-------- ---- ----
+eastus connected-pwsh-aks Microsoft.Kubernetes/connectedClusters
+```
+
+This command gets a connected kubernetes.
+
+### Example 4: Get a connected kubernetes by object
+```powershell
+PS C:\> $conAks = Get-AzConnectedKubernetes -ResourceGroupName connected-aks -Name connected-pwsh-aks
+PS C:\> Get-AzConnectedKubernetes -InputObject $conAks
+
+Location Name Type
+-------- ---- ----
+eastus connected-pwsh-aks Microsoft.Kubernetes/connectedClusters
+```
+
+This command gets a connected kubernetes by object.
+
+
diff --git a/src/ConnectedKubernetes/examples/New-AzConnectedKubernetes.md b/src/ConnectedKubernetes/examples/New-AzConnectedKubernetes.md
new file mode 100644
index 000000000000..cb14c07828da
--- /dev/null
+++ b/src/ConnectedKubernetes/examples/New-AzConnectedKubernetes.md
@@ -0,0 +1,21 @@
+### Example 1: Create a connected kubernetes
+```powershell
+PS C:\> New-AzConnectedKubernetes -ClusterName ps-connaks-t01 -ResourceGroupName connected-aks -Location
+Location Name Type
+-------- ---- ----
+eastus ps-connaks-t01 Microsoft.Kubernetes/connectedClusters
+```
+
+This command creates a connected kubernetes.
+
+### Example 1: Create a connected kubernetes with parameters kubeConfig and kubeContext
+```powershell
+PS C:\> New-AzConnectedKubernetes -ClusterName ps-connaks-t02 -ResourceGroupName connected-aks -Location eastus -KubeConfig $HOME\.kube\config -KubeContext portal-aks-t01
+
+Location Name Type
+-------- ---- ----
+eastus ps-connaks-t02 Microsoft.Kubernetes/connectedClusters
+```
+
+This command creates a connected kubernetes with parameters kubeConfig and kubeContext.
+
diff --git a/src/ConnectedKubernetes/examples/Remove-AzConnectedKubernetes.md b/src/ConnectedKubernetes/examples/Remove-AzConnectedKubernetes.md
new file mode 100644
index 000000000000..6b13e1ad9a6d
--- /dev/null
+++ b/src/ConnectedKubernetes/examples/Remove-AzConnectedKubernetes.md
@@ -0,0 +1,17 @@
+### Example 1: Remove a connected kubernetes
+```powershell
+PS C:\> Remove-AzConnectedKubernetes -ResourceGroupName azureps-manual-test -ClusterName ps-connaks-t01
+
+```
+
+This command removes a connected kubernetes
+
+### Example 2: Remove a connected kubernetes by object
+```powershell
+PS C:\> $connaks = Get-AzConnectedKubernetes -ResourceGroupName azureps-manual-test -Name ps-connaks-t02
+PS C:\> Remove-AzConnectedKubernetes -InputObject $connaks
+
+```
+
+This command removes a connected kubernetes by object
+
diff --git a/src/ConnectedKubernetes/examples/Update-AzConnectedKubernetes.md b/src/ConnectedKubernetes/examples/Update-AzConnectedKubernetes.md
new file mode 100644
index 000000000000..5448843728de
--- /dev/null
+++ b/src/ConnectedKubernetes/examples/Update-AzConnectedKubernetes.md
@@ -0,0 +1,23 @@
+### Example 1: Update a connected kubernetes
+```powershell
+PS C:\> Update-AzConnectedKubernetes -ResourceGroupName connected-aks -ClusterName ps-connaks-t01 -Tag @{'key'='1'}
+
+Location Name Type
+-------- ---- ----
+eastus ps-connaks-t01 Microsoft.Kubernetes/connectedClusters
+```
+
+This command updates a connected kubernetes.
+
+### Example 2: Update a connected kubernetes by object
+```powershell
+PS C:\> $conn = Get-AzConnectedKubernetes -ResourceGroupName connected-aks -ClusterName ps-connaks-t03
+PS C:\> Update-AzConnectedKubernetes -InputObject $conn -Tag @{'key'='2'}
+
+Location Name Type
+-------- ---- ----
+eastus ps-connaks-t03 Microsoft.Kubernetes/connectedClusters
+```
+
+This command updates a connected kubernetes by object.
+
diff --git a/src/ConnectedKubernetes/export-surface.ps1 b/src/ConnectedKubernetes/export-surface.ps1
new file mode 100644
index 000000000000..b5e23206a75d
--- /dev/null
+++ b/src/ConnectedKubernetes/export-surface.ps1
@@ -0,0 +1,40 @@
+# ----------------------------------------------------------------------------------
+#
+# Copyright Microsoft Corporation
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ----------------------------------------------------------------------------------
+param([switch]$Isolated, [switch]$IncludeGeneralParameters, [switch]$UseExpandedFormat)
+$ErrorActionPreference = 'Stop'
+
+$pwsh = [System.Diagnostics.Process]::GetCurrentProcess().Path
+if(-not $Isolated) {
+ Write-Host -ForegroundColor Green 'Creating isolated process...'
+ & "$pwsh" -NonInteractive -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -Isolated
+ return
+}
+
+$dll = Join-Path $PSScriptRoot 'bin\Az.ConnectedKubernetes.private.dll'
+if(-not (Test-Path $dll)) {
+ Write-Error "Unable to find output assembly in '$binFolder'."
+}
+$null = Import-Module -Name $dll
+
+$moduleName = 'Az.ConnectedKubernetes'
+$exportsFolder = Join-Path $PSScriptRoot 'exports'
+$resourcesFolder = Join-Path $PSScriptRoot 'resources'
+
+Export-CmdletSurface -ModuleName $moduleName -CmdletFolder $exportsFolder -OutputFolder $resourcesFolder -IncludeGeneralParameters $IncludeGeneralParameters.IsPresent -UseExpandedFormat $UseExpandedFormat.IsPresent
+Write-Host -ForegroundColor Green "CmdletSurface file(s) created in '$resourcesFolder'"
+
+Export-ModelSurface -OutputFolder $resourcesFolder -UseExpandedFormat $UseExpandedFormat.IsPresent
+Write-Host -ForegroundColor Green "ModelSurface file created in '$resourcesFolder'"
+
+Write-Host -ForegroundColor Green '-------------Done-------------'
\ No newline at end of file
diff --git a/src/ConnectedKubernetes/exports/Get-AzConnectedKubernetes.ps1 b/src/ConnectedKubernetes/exports/Get-AzConnectedKubernetes.ps1
new file mode 100644
index 000000000000..dd98f93d57b7
--- /dev/null
+++ b/src/ConnectedKubernetes/exports/Get-AzConnectedKubernetes.ps1
@@ -0,0 +1,195 @@
+
+# ----------------------------------------------------------------------------------
+#
+# Copyright Microsoft Corporation
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ----------------------------------------------------------------------------------
+
+<#
+.Synopsis
+Returns the properties of the specified connected cluster, including name, identity, properties, and additional cluster details.
+.Description
+Returns the properties of the specified connected cluster, including name, identity, properties, and additional cluster details.
+.Example
+PS C:\> Get-AzConnectedKubernetes
+
+Location Name Type
+-------- ---- ----
+eastus connected-aks Microsoft.Kubernetes/connectedClusters
+eastus connected-pwsh-aks Microsoft.Kubernetes/connectedClusters
+eastus connected-pwsh-aks1 Microsoft.Kubernetes/connectedClusters
+eastus connected-pwsh-aks3 Microsoft.Kubernetes/connectedClusters
+eastus connected-aks-cli1 Microsoft.Kubernetes/connectedClusters
+.Example
+PS C:\> Get-AzConnectedKubernetes -ResourceGroupName connected-aks
+
+Location Name Type
+-------- ---- ----
+eastus connected-aks Microsoft.Kubernetes/connectedClusters
+eastus connected-pwsh-aks Microsoft.Kubernetes/connectedClusters
+eastus connected-pwsh-aks1 Microsoft.Kubernetes/connectedClusters
+eastus connected-pwsh-aks3 Microsoft.Kubernetes/connectedClusters
+eastus connected-aks-cli1 Microsoft.Kubernetes/connectedClusters
+.Example
+PS C:\> Get-AzConnectedKubernetes -ResourceGroupName connected-aks -Name connected-pwsh-aks
+
+Location Name Type
+-------- ---- ----
+eastus connected-pwsh-aks Microsoft.Kubernetes/connectedClusters
+.Example
+PS C:\> $conAks = Get-AzConnectedKubernetes -ResourceGroupName connected-aks -Name connected-pwsh-aks
+PS C:\> Get-AzConnectedKubernetes -InputObject $conAks
+
+Location Name Type
+-------- ---- ----
+eastus connected-pwsh-aks Microsoft.Kubernetes/connectedClusters
+
+.Inputs
+Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedKubernetesIdentity
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedCluster
+.Notes
+COMPLEX PARAMETER PROPERTIES
+
+To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables.
+
+INPUTOBJECT : Identity Parameter
+ [ClusterName ]: The name of the Kubernetes cluster on which get is called.
+ [Id ]: Resource identity path
+ [ResourceGroupName ]: The name of the resource group. The name is case insensitive.
+ [SubscriptionId ]: The ID of the target subscription.
+.Link
+https://docs.microsoft.com/en-us/powershell/module/az.connectedkubernetes/get-azconnectedkubernetes
+#>
+function Get-AzConnectedKubernetes {
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedCluster])]
+[CmdletBinding(DefaultParameterSetName='List1', PositionalBinding=$false)]
+param(
+ [Parameter(ParameterSetName='Get', Mandatory)]
+ [Alias('Name')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Path')]
+ [System.String]
+ # The name of the Kubernetes cluster on which get is called.
+ ${ClusterName},
+
+ [Parameter(ParameterSetName='Get', Mandatory)]
+ [Parameter(ParameterSetName='List', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Path')]
+ [System.String]
+ # The name of the resource group.
+ # The name is case insensitive.
+ ${ResourceGroupName},
+
+ [Parameter(ParameterSetName='Get')]
+ [Parameter(ParameterSetName='List')]
+ [Parameter(ParameterSetName='List1')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
+ [System.String[]]
+ # The ID of the target subscription.
+ ${SubscriptionId},
+
+ [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedKubernetesIdentity]
+ # Identity Parameter
+ # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
+ ${InputObject},
+
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Azure')]
+ [System.Management.Automation.PSObject]
+ # The credentials, account, tenant, and subscription used for communication with Azure.
+ ${DefaultProfile},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Wait for .NET debugger to attach
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline
+ ${HttpPipelinePrepend},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Use the default credentials for the proxy
+ ${ProxyUseDefaultCredentials}
+)
+
+begin {
+ try {
+ $outBuffer = $null
+ if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {
+ $PSBoundParameters['OutBuffer'] = 1
+ }
+ $parameterSet = $PSCmdlet.ParameterSetName
+ $mapping = @{
+ Get = 'Az.ConnectedKubernetes.private\Get-AzConnectedKubernetes_Get';
+ GetViaIdentity = 'Az.ConnectedKubernetes.private\Get-AzConnectedKubernetes_GetViaIdentity';
+ List = 'Az.ConnectedKubernetes.private\Get-AzConnectedKubernetes_List';
+ List1 = 'Az.ConnectedKubernetes.private\Get-AzConnectedKubernetes_List1';
+ }
+ if (('Get', 'List', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
+ $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
+ }
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ $scriptCmd = {& $wrappedCmd @PSBoundParameters}
+ $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
+ $steppablePipeline.Begin($PSCmdlet)
+ } catch {
+ throw
+ }
+}
+
+process {
+ try {
+ $steppablePipeline.Process($_)
+ } catch {
+ throw
+ }
+}
+
+end {
+ try {
+ $steppablePipeline.End()
+ } catch {
+ throw
+ }
+}
+}
diff --git a/src/ConnectedKubernetes/exports/New-AzConnectedKubernetes.ps1 b/src/ConnectedKubernetes/exports/New-AzConnectedKubernetes.ps1
new file mode 100644
index 000000000000..de664b436669
--- /dev/null
+++ b/src/ConnectedKubernetes/exports/New-AzConnectedKubernetes.ps1
@@ -0,0 +1,165 @@
+
+# ----------------------------------------------------------------------------------
+#
+# Copyright Microsoft Corporation
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ----------------------------------------------------------------------------------
+
+<#
+.Synopsis
+API to register a new K8s cluster and thereby create a tracked resource in ARM
+.Description
+API to register a new K8s cluster and thereby create a tracked resource in ARM
+.Example
+PS C:\> New-AzConnectedKubernetes -ClusterName ps-connaks-t01 -ResourceGroupName connected-aks -Location
+Location Name Type
+-------- ---- ----
+eastus ps-connaks-t01 Microsoft.Kubernetes/connectedClusters
+.Example
+PS C:\> New-AzConnectedKubernetes -ClusterName ps-connaks-t02 -ResourceGroupName connected-aks -Location eastus -KubeConfig $HOME\.kube\config -KubeContext portal-aks-t01
+
+Location Name Type
+-------- ---- ----
+eastus ps-connaks-t02 Microsoft.Kubernetes/connectedClusters
+
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedCluster
+.Link
+https://docs.microsoft.com/en-us/powershell/module/az.connectedkubernetes/new-azconnectedkubernetes
+#>
+function New-AzConnectedKubernetes {
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedCluster])]
+[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
+param(
+ [Parameter(Mandatory)]
+ [Alias('Name')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Path')]
+ [System.String]
+ # The name of the Kubernetes cluster on which get is called.
+ ${ClusterName},
+
+ [Parameter(Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Path')]
+ [System.String]
+ # The name of the resource group to which the kubernetes cluster is registered.
+ ${ResourceGroupName},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
+ [System.String]
+ # The ID of the subscription to which the kubernetes cluster is registered.
+ ${SubscriptionId},
+
+ [Parameter(Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')]
+ [System.String]
+ # Location of the cluster
+ ${Location},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')]
+ [System.String]
+ # Path to the kube config file
+ ${KubeConfig},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')]
+ [System.String]
+ # Kubconfig context from current machine
+ ${KubeContext},
+
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Azure')]
+ [System.Management.Automation.PSObject]
+ # The credentials, account, tenant, and subscription used for communication with Azure.
+ ${DefaultProfile},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Wait for .NET debugger to attach
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline
+ ${HttpPipelinePrepend},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Use the default credentials for the proxy
+ ${ProxyUseDefaultCredentials}
+)
+
+begin {
+ try {
+ $outBuffer = $null
+ if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {
+ $PSBoundParameters['OutBuffer'] = 1
+ }
+ $parameterSet = $PSCmdlet.ParameterSetName
+ $mapping = @{
+ CreateExpanded = 'Az.ConnectedKubernetes.custom\New-AzConnectedKubernetes';
+ }
+ if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
+ $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
+ }
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ $scriptCmd = {& $wrappedCmd @PSBoundParameters}
+ $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
+ $steppablePipeline.Begin($PSCmdlet)
+ } catch {
+ throw
+ }
+}
+
+process {
+ try {
+ $steppablePipeline.Process($_)
+ } catch {
+ throw
+ }
+}
+
+end {
+ try {
+ $steppablePipeline.End()
+ } catch {
+ throw
+ }
+}
+}
diff --git a/src/ConnectedKubernetes/exports/ProxyCmdletDefinitions.ps1 b/src/ConnectedKubernetes/exports/ProxyCmdletDefinitions.ps1
new file mode 100644
index 000000000000..2ed83093b8d8
--- /dev/null
+++ b/src/ConnectedKubernetes/exports/ProxyCmdletDefinitions.ps1
@@ -0,0 +1,731 @@
+
+# ----------------------------------------------------------------------------------
+#
+# Copyright Microsoft Corporation
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ----------------------------------------------------------------------------------
+
+<#
+.Synopsis
+Returns the properties of the specified connected cluster, including name, identity, properties, and additional cluster details.
+.Description
+Returns the properties of the specified connected cluster, including name, identity, properties, and additional cluster details.
+.Example
+PS C:\> Get-AzConnectedKubernetes
+
+Location Name Type
+-------- ---- ----
+eastus connected-aks Microsoft.Kubernetes/connectedClusters
+eastus connected-pwsh-aks Microsoft.Kubernetes/connectedClusters
+eastus connected-pwsh-aks1 Microsoft.Kubernetes/connectedClusters
+eastus connected-pwsh-aks3 Microsoft.Kubernetes/connectedClusters
+eastus connected-aks-cli1 Microsoft.Kubernetes/connectedClusters
+.Example
+PS C:\> Get-AzConnectedKubernetes -ResourceGroupName connected-aks
+
+Location Name Type
+-------- ---- ----
+eastus connected-aks Microsoft.Kubernetes/connectedClusters
+eastus connected-pwsh-aks Microsoft.Kubernetes/connectedClusters
+eastus connected-pwsh-aks1 Microsoft.Kubernetes/connectedClusters
+eastus connected-pwsh-aks3 Microsoft.Kubernetes/connectedClusters
+eastus connected-aks-cli1 Microsoft.Kubernetes/connectedClusters
+.Example
+PS C:\> Get-AzConnectedKubernetes -ResourceGroupName connected-aks -Name connected-pwsh-aks
+
+Location Name Type
+-------- ---- ----
+eastus connected-pwsh-aks Microsoft.Kubernetes/connectedClusters
+.Example
+PS C:\> $conAks = Get-AzConnectedKubernetes -ResourceGroupName connected-aks -Name connected-pwsh-aks
+PS C:\> Get-AzConnectedKubernetes -InputObject $conAks
+
+Location Name Type
+-------- ---- ----
+eastus connected-pwsh-aks Microsoft.Kubernetes/connectedClusters
+
+.Inputs
+Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedKubernetesIdentity
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedCluster
+.Notes
+COMPLEX PARAMETER PROPERTIES
+
+To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables.
+
+INPUTOBJECT : Identity Parameter
+ [ClusterName ]: The name of the Kubernetes cluster on which get is called.
+ [Id ]: Resource identity path
+ [ResourceGroupName ]: The name of the resource group. The name is case insensitive.
+ [SubscriptionId ]: The ID of the target subscription.
+.Link
+https://docs.microsoft.com/en-us/powershell/module/az.connectedkubernetes/get-azconnectedkubernetes
+#>
+function Get-AzConnectedKubernetes {
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedCluster])]
+[CmdletBinding(DefaultParameterSetName='List1', PositionalBinding=$false)]
+param(
+ [Parameter(ParameterSetName='Get', Mandatory)]
+ [Alias('Name')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Path')]
+ [System.String]
+ # The name of the Kubernetes cluster on which get is called.
+ ${ClusterName},
+
+ [Parameter(ParameterSetName='Get', Mandatory)]
+ [Parameter(ParameterSetName='List', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Path')]
+ [System.String]
+ # The name of the resource group.
+ # The name is case insensitive.
+ ${ResourceGroupName},
+
+ [Parameter(ParameterSetName='Get')]
+ [Parameter(ParameterSetName='List')]
+ [Parameter(ParameterSetName='List1')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
+ [System.String[]]
+ # The ID of the target subscription.
+ ${SubscriptionId},
+
+ [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedKubernetesIdentity]
+ # Identity Parameter
+ # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
+ ${InputObject},
+
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Azure')]
+ [System.Management.Automation.PSObject]
+ # The credentials, account, tenant, and subscription used for communication with Azure.
+ ${DefaultProfile},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Wait for .NET debugger to attach
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline
+ ${HttpPipelinePrepend},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Use the default credentials for the proxy
+ ${ProxyUseDefaultCredentials}
+)
+
+begin {
+ try {
+ $outBuffer = $null
+ if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {
+ $PSBoundParameters['OutBuffer'] = 1
+ }
+ $parameterSet = $PSCmdlet.ParameterSetName
+ $mapping = @{
+ Get = 'Az.ConnectedKubernetes.private\Get-AzConnectedKubernetes_Get';
+ GetViaIdentity = 'Az.ConnectedKubernetes.private\Get-AzConnectedKubernetes_GetViaIdentity';
+ List = 'Az.ConnectedKubernetes.private\Get-AzConnectedKubernetes_List';
+ List1 = 'Az.ConnectedKubernetes.private\Get-AzConnectedKubernetes_List1';
+ }
+ if (('Get', 'List', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
+ $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
+ }
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ $scriptCmd = {& $wrappedCmd @PSBoundParameters}
+ $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
+ $steppablePipeline.Begin($PSCmdlet)
+ } catch {
+ throw
+ }
+}
+
+process {
+ try {
+ $steppablePipeline.Process($_)
+ } catch {
+ throw
+ }
+}
+
+end {
+ try {
+ $steppablePipeline.End()
+ } catch {
+ throw
+ }
+}
+}
+
+# ----------------------------------------------------------------------------------
+#
+# Copyright Microsoft Corporation
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ----------------------------------------------------------------------------------
+
+<#
+.Synopsis
+API to register a new K8s cluster and thereby create a tracked resource in ARM
+.Description
+API to register a new K8s cluster and thereby create a tracked resource in ARM
+.Example
+PS C:\> New-AzConnectedKubernetes -ClusterName ps-connaks-t01 -ResourceGroupName connected-aks -Location
+Location Name Type
+-------- ---- ----
+eastus ps-connaks-t01 Microsoft.Kubernetes/connectedClusters
+.Example
+PS C:\> New-AzConnectedKubernetes -ClusterName ps-connaks-t02 -ResourceGroupName connected-aks -Location eastus -KubeConfig $HOME\.kube\config -KubeContext portal-aks-t01
+
+Location Name Type
+-------- ---- ----
+eastus ps-connaks-t02 Microsoft.Kubernetes/connectedClusters
+
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedCluster
+.Link
+https://docs.microsoft.com/en-us/powershell/module/az.connectedkubernetes/new-azconnectedkubernetes
+#>
+function New-AzConnectedKubernetes {
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedCluster])]
+[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
+param(
+ [Parameter(Mandatory)]
+ [Alias('Name')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Path')]
+ [System.String]
+ # The name of the Kubernetes cluster on which get is called.
+ ${ClusterName},
+
+ [Parameter(Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Path')]
+ [System.String]
+ # The name of the resource group to which the kubernetes cluster is registered.
+ ${ResourceGroupName},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
+ [System.String]
+ # The ID of the subscription to which the kubernetes cluster is registered.
+ ${SubscriptionId},
+
+ [Parameter(Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')]
+ [System.String]
+ # Location of the cluster
+ ${Location},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')]
+ [System.String]
+ # Path to the kube config file
+ ${KubeConfig},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')]
+ [System.String]
+ # Kubconfig context from current machine
+ ${KubeContext},
+
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Azure')]
+ [System.Management.Automation.PSObject]
+ # The credentials, account, tenant, and subscription used for communication with Azure.
+ ${DefaultProfile},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Wait for .NET debugger to attach
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline
+ ${HttpPipelinePrepend},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Use the default credentials for the proxy
+ ${ProxyUseDefaultCredentials}
+)
+
+begin {
+ try {
+ $outBuffer = $null
+ if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {
+ $PSBoundParameters['OutBuffer'] = 1
+ }
+ $parameterSet = $PSCmdlet.ParameterSetName
+ $mapping = @{
+ CreateExpanded = 'Az.ConnectedKubernetes.custom\New-AzConnectedKubernetes';
+ }
+ if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
+ $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
+ }
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ $scriptCmd = {& $wrappedCmd @PSBoundParameters}
+ $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
+ $steppablePipeline.Begin($PSCmdlet)
+ } catch {
+ throw
+ }
+}
+
+process {
+ try {
+ $steppablePipeline.Process($_)
+ } catch {
+ throw
+ }
+}
+
+end {
+ try {
+ $steppablePipeline.End()
+ } catch {
+ throw
+ }
+}
+}
+
+# ----------------------------------------------------------------------------------
+#
+# Copyright Microsoft Corporation
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ----------------------------------------------------------------------------------
+
+<#
+.Synopsis
+Delete a connected cluster, removing the tracked resource in Azure Resource Manager (ARM).
+.Description
+Delete a connected cluster, removing the tracked resource in Azure Resource Manager (ARM).
+.Example
+PS C:\> Remove-AzConnectedKubernetes -ResourceGroupName azureps-manual-test -ClusterName ps-connaks-t01
+
+.Example
+PS C:\> $connaks = Get-AzConnectedKubernetes -ResourceGroupName azureps-manual-test -Name ps-connaks-t02
+PS C:\> Remove-AzConnectedKubernetes -InputObject $connaks
+
+
+.Inputs
+Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedKubernetesIdentity
+.Outputs
+System.Boolean
+.Notes
+COMPLEX PARAMETER PROPERTIES
+
+To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables.
+
+INPUTOBJECT : Identity Parameter
+ [ClusterName ]: The name of the Kubernetes cluster on which get is called.
+ [Id ]: Resource identity path
+ [ResourceGroupName ]: The name of the resource group. The name is case insensitive.
+ [SubscriptionId ]: The ID of the target subscription.
+.Link
+https://docs.microsoft.com/en-us/powershell/module/az.connectedkubernetes/remove-azconnectedkubernetes
+#>
+function Remove-AzConnectedKubernetes {
+[OutputType([System.Boolean])]
+[CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
+param(
+ [Parameter(ParameterSetName='Delete', Mandatory)]
+ [Alias('Name')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Path')]
+ [System.String]
+ # The name of the Kubernetes cluster on which get is called.
+ ${ClusterName},
+
+ [Parameter(ParameterSetName='Delete', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Path')]
+ [System.String]
+ # The name of the resource group.
+ # The name is case insensitive.
+ ${ResourceGroupName},
+
+ [Parameter(ParameterSetName='Delete')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
+ [System.String]
+ # The ID of the target subscription.
+ ${SubscriptionId},
+
+ [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedKubernetesIdentity]
+ # Identity Parameter
+ # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
+ ${InputObject},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')]
+ [System.String]
+ # Path to the kube config file
+ ${KubeConfig},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')]
+ [System.String]
+ # Kubconfig context from current machine
+ ${KubeContext},
+
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Azure')]
+ [System.Management.Automation.PSObject]
+ # The credentials, account, tenant, and subscription used for communication with Azure.
+ ${DefaultProfile},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Run the command as a job
+ ${AsJob},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Wait for .NET debugger to attach
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline
+ ${HttpPipelinePrepend},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Run the command asynchronously
+ ${NoWait},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Returns true when the command succeeds
+ ${PassThru},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Use the default credentials for the proxy
+ ${ProxyUseDefaultCredentials}
+)
+
+begin {
+ try {
+ $outBuffer = $null
+ if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {
+ $PSBoundParameters['OutBuffer'] = 1
+ }
+ $parameterSet = $PSCmdlet.ParameterSetName
+ $mapping = @{
+ Delete = 'Az.ConnectedKubernetes.custom\Remove-AzConnectedKubernetes';
+ DeleteViaIdentity = 'Az.ConnectedKubernetes.custom\Remove-AzConnectedKubernetes';
+ }
+ if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
+ $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
+ }
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ $scriptCmd = {& $wrappedCmd @PSBoundParameters}
+ $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
+ $steppablePipeline.Begin($PSCmdlet)
+ } catch {
+ throw
+ }
+}
+
+process {
+ try {
+ $steppablePipeline.Process($_)
+ } catch {
+ throw
+ }
+}
+
+end {
+ try {
+ $steppablePipeline.End()
+ } catch {
+ throw
+ }
+}
+}
+
+# ----------------------------------------------------------------------------------
+#
+# Copyright Microsoft Corporation
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ----------------------------------------------------------------------------------
+
+<#
+.Synopsis
+API to update certain properties of the connected cluster resource.
+.Description
+API to update certain properties of the connected cluster resource.
+.Example
+PS C:\> Update-AzConnectedKubernetes -ResourceGroupName connected-aks -ClusterName ps-connaks-t01 -Tag @{'key'='1'}
+
+Location Name Type
+-------- ---- ----
+eastus ps-connaks-t01 Microsoft.Kubernetes/connectedClusters
+.Example
+PS C:\> $conn = Get-AzConnectedKubernetes -ResourceGroupName connected-aks -ClusterName ps-connaks-t03
+PS C:\> Update-AzConnectedKubernetes -InputObject $conn -Tag @{'key'='2'}
+
+Location Name Type
+-------- ---- ----
+eastus ps-connaks-t03 Microsoft.Kubernetes/connectedClusters
+
+.Inputs
+Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedKubernetesIdentity
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedCluster
+.Notes
+COMPLEX PARAMETER PROPERTIES
+
+To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables.
+
+INPUTOBJECT : Identity Parameter
+ [ClusterName ]: The name of the Kubernetes cluster on which get is called.
+ [Id ]: Resource identity path
+ [ResourceGroupName ]: The name of the resource group. The name is case insensitive.
+ [SubscriptionId ]: The ID of the target subscription.
+.Link
+https://docs.microsoft.com/en-us/powershell/module/az.connectedkubernetes/update-azconnectedkubernetes
+#>
+function Update-AzConnectedKubernetes {
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedCluster])]
+[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
+param(
+ [Parameter(ParameterSetName='UpdateExpanded', Mandatory)]
+ [Alias('Name')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Path')]
+ [System.String]
+ # The name of the Kubernetes cluster on which get is called.
+ ${ClusterName},
+
+ [Parameter(ParameterSetName='UpdateExpanded', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Path')]
+ [System.String]
+ # The name of the resource group.
+ # The name is case insensitive.
+ ${ResourceGroupName},
+
+ [Parameter(ParameterSetName='UpdateExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
+ [System.String]
+ # The ID of the target subscription.
+ ${SubscriptionId},
+
+ [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedKubernetesIdentity]
+ # Identity Parameter
+ # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
+ ${InputObject},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterPatchTags]))]
+ [System.Collections.Hashtable]
+ # Resource tags.
+ ${Tag},
+
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Azure')]
+ [System.Management.Automation.PSObject]
+ # The credentials, account, tenant, and subscription used for communication with Azure.
+ ${DefaultProfile},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Wait for .NET debugger to attach
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline
+ ${HttpPipelinePrepend},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Use the default credentials for the proxy
+ ${ProxyUseDefaultCredentials}
+)
+
+begin {
+ try {
+ $outBuffer = $null
+ if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {
+ $PSBoundParameters['OutBuffer'] = 1
+ }
+ $parameterSet = $PSCmdlet.ParameterSetName
+ $mapping = @{
+ UpdateExpanded = 'Az.ConnectedKubernetes.custom\Update-AzConnectedKubernetes';
+ UpdateViaIdentityExpanded = 'Az.ConnectedKubernetes.custom\Update-AzConnectedKubernetes';
+ }
+ if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
+ $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
+ }
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ $scriptCmd = {& $wrappedCmd @PSBoundParameters}
+ $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
+ $steppablePipeline.Begin($PSCmdlet)
+ } catch {
+ throw
+ }
+}
+
+process {
+ try {
+ $steppablePipeline.Process($_)
+ } catch {
+ throw
+ }
+}
+
+end {
+ try {
+ $steppablePipeline.End()
+ } catch {
+ throw
+ }
+}
+}
diff --git a/src/ConnectedKubernetes/exports/Remove-AzConnectedKubernetes.ps1 b/src/ConnectedKubernetes/exports/Remove-AzConnectedKubernetes.ps1
new file mode 100644
index 000000000000..aa254ae2bc0e
--- /dev/null
+++ b/src/ConnectedKubernetes/exports/Remove-AzConnectedKubernetes.ps1
@@ -0,0 +1,194 @@
+
+# ----------------------------------------------------------------------------------
+#
+# Copyright Microsoft Corporation
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ----------------------------------------------------------------------------------
+
+<#
+.Synopsis
+Delete a connected cluster, removing the tracked resource in Azure Resource Manager (ARM).
+.Description
+Delete a connected cluster, removing the tracked resource in Azure Resource Manager (ARM).
+.Example
+PS C:\> Remove-AzConnectedKubernetes -ResourceGroupName azureps-manual-test -ClusterName ps-connaks-t01
+
+.Example
+PS C:\> $connaks = Get-AzConnectedKubernetes -ResourceGroupName azureps-manual-test -Name ps-connaks-t02
+PS C:\> Remove-AzConnectedKubernetes -InputObject $connaks
+
+
+.Inputs
+Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedKubernetesIdentity
+.Outputs
+System.Boolean
+.Notes
+COMPLEX PARAMETER PROPERTIES
+
+To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables.
+
+INPUTOBJECT : Identity Parameter
+ [ClusterName ]: The name of the Kubernetes cluster on which get is called.
+ [Id ]: Resource identity path
+ [ResourceGroupName ]: The name of the resource group. The name is case insensitive.
+ [SubscriptionId ]: The ID of the target subscription.
+.Link
+https://docs.microsoft.com/en-us/powershell/module/az.connectedkubernetes/remove-azconnectedkubernetes
+#>
+function Remove-AzConnectedKubernetes {
+[OutputType([System.Boolean])]
+[CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
+param(
+ [Parameter(ParameterSetName='Delete', Mandatory)]
+ [Alias('Name')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Path')]
+ [System.String]
+ # The name of the Kubernetes cluster on which get is called.
+ ${ClusterName},
+
+ [Parameter(ParameterSetName='Delete', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Path')]
+ [System.String]
+ # The name of the resource group.
+ # The name is case insensitive.
+ ${ResourceGroupName},
+
+ [Parameter(ParameterSetName='Delete')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
+ [System.String]
+ # The ID of the target subscription.
+ ${SubscriptionId},
+
+ [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedKubernetesIdentity]
+ # Identity Parameter
+ # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
+ ${InputObject},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')]
+ [System.String]
+ # Path to the kube config file
+ ${KubeConfig},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')]
+ [System.String]
+ # Kubconfig context from current machine
+ ${KubeContext},
+
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Azure')]
+ [System.Management.Automation.PSObject]
+ # The credentials, account, tenant, and subscription used for communication with Azure.
+ ${DefaultProfile},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Run the command as a job
+ ${AsJob},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Wait for .NET debugger to attach
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline
+ ${HttpPipelinePrepend},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Run the command asynchronously
+ ${NoWait},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Returns true when the command succeeds
+ ${PassThru},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Use the default credentials for the proxy
+ ${ProxyUseDefaultCredentials}
+)
+
+begin {
+ try {
+ $outBuffer = $null
+ if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {
+ $PSBoundParameters['OutBuffer'] = 1
+ }
+ $parameterSet = $PSCmdlet.ParameterSetName
+ $mapping = @{
+ Delete = 'Az.ConnectedKubernetes.custom\Remove-AzConnectedKubernetes';
+ DeleteViaIdentity = 'Az.ConnectedKubernetes.custom\Remove-AzConnectedKubernetes';
+ }
+ if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
+ $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
+ }
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ $scriptCmd = {& $wrappedCmd @PSBoundParameters}
+ $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
+ $steppablePipeline.Begin($PSCmdlet)
+ } catch {
+ throw
+ }
+}
+
+process {
+ try {
+ $steppablePipeline.Process($_)
+ } catch {
+ throw
+ }
+}
+
+end {
+ try {
+ $steppablePipeline.End()
+ } catch {
+ throw
+ }
+}
+}
diff --git a/src/ConnectedKubernetes/exports/Update-AzConnectedKubernetes.ps1 b/src/ConnectedKubernetes/exports/Update-AzConnectedKubernetes.ps1
new file mode 100644
index 000000000000..be02864d928a
--- /dev/null
+++ b/src/ConnectedKubernetes/exports/Update-AzConnectedKubernetes.ps1
@@ -0,0 +1,177 @@
+
+# ----------------------------------------------------------------------------------
+#
+# Copyright Microsoft Corporation
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ----------------------------------------------------------------------------------
+
+<#
+.Synopsis
+API to update certain properties of the connected cluster resource.
+.Description
+API to update certain properties of the connected cluster resource.
+.Example
+PS C:\> Update-AzConnectedKubernetes -ResourceGroupName connected-aks -ClusterName ps-connaks-t01 -Tag @{'key'='1'}
+
+Location Name Type
+-------- ---- ----
+eastus ps-connaks-t01 Microsoft.Kubernetes/connectedClusters
+.Example
+PS C:\> $conn = Get-AzConnectedKubernetes -ResourceGroupName connected-aks -ClusterName ps-connaks-t03
+PS C:\> Update-AzConnectedKubernetes -InputObject $conn -Tag @{'key'='2'}
+
+Location Name Type
+-------- ---- ----
+eastus ps-connaks-t03 Microsoft.Kubernetes/connectedClusters
+
+.Inputs
+Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedKubernetesIdentity
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedCluster
+.Notes
+COMPLEX PARAMETER PROPERTIES
+
+To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables.
+
+INPUTOBJECT : Identity Parameter
+ [ClusterName ]: The name of the Kubernetes cluster on which get is called.
+ [Id ]: Resource identity path
+ [ResourceGroupName ]: The name of the resource group. The name is case insensitive.
+ [SubscriptionId ]: The ID of the target subscription.
+.Link
+https://docs.microsoft.com/en-us/powershell/module/az.connectedkubernetes/update-azconnectedkubernetes
+#>
+function Update-AzConnectedKubernetes {
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedCluster])]
+[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
+param(
+ [Parameter(ParameterSetName='UpdateExpanded', Mandatory)]
+ [Alias('Name')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Path')]
+ [System.String]
+ # The name of the Kubernetes cluster on which get is called.
+ ${ClusterName},
+
+ [Parameter(ParameterSetName='UpdateExpanded', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Path')]
+ [System.String]
+ # The name of the resource group.
+ # The name is case insensitive.
+ ${ResourceGroupName},
+
+ [Parameter(ParameterSetName='UpdateExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
+ [System.String]
+ # The ID of the target subscription.
+ ${SubscriptionId},
+
+ [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedKubernetesIdentity]
+ # Identity Parameter
+ # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
+ ${InputObject},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterPatchTags]))]
+ [System.Collections.Hashtable]
+ # Resource tags.
+ ${Tag},
+
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Azure')]
+ [System.Management.Automation.PSObject]
+ # The credentials, account, tenant, and subscription used for communication with Azure.
+ ${DefaultProfile},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Wait for .NET debugger to attach
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline
+ ${HttpPipelinePrepend},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Use the default credentials for the proxy
+ ${ProxyUseDefaultCredentials}
+)
+
+begin {
+ try {
+ $outBuffer = $null
+ if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {
+ $PSBoundParameters['OutBuffer'] = 1
+ }
+ $parameterSet = $PSCmdlet.ParameterSetName
+ $mapping = @{
+ UpdateExpanded = 'Az.ConnectedKubernetes.custom\Update-AzConnectedKubernetes';
+ UpdateViaIdentityExpanded = 'Az.ConnectedKubernetes.custom\Update-AzConnectedKubernetes';
+ }
+ if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
+ $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
+ }
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ $scriptCmd = {& $wrappedCmd @PSBoundParameters}
+ $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
+ $steppablePipeline.Begin($PSCmdlet)
+ } catch {
+ throw
+ }
+}
+
+process {
+ try {
+ $steppablePipeline.Process($_)
+ } catch {
+ throw
+ }
+}
+
+end {
+ try {
+ $steppablePipeline.End()
+ } catch {
+ throw
+ }
+}
+}
diff --git a/src/ConnectedKubernetes/exports/readme.md b/src/ConnectedKubernetes/exports/readme.md
new file mode 100644
index 000000000000..bca11480886d
--- /dev/null
+++ b/src/ConnectedKubernetes/exports/readme.md
@@ -0,0 +1,20 @@
+# Exports
+This directory contains the cmdlets *exported by* `Az.ConnectedKubernetes`. No other cmdlets in this repository are directly exported. What that means is the `Az.ConnectedKubernetes` module will run [Export-ModuleMember](https://docs.microsoft.com/en-us/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
+- Generated: all
+- Committed: no
+- Packaged: yes
+
+## Details
+The cmdlets generated here are created every time you run `build-module.ps1`. These cmdlets are a merge of all (excluding `InternalExport`) cmdlets from the private binary (`..\bin\Az.ConnectedKubernetes.private.dll`) and from the `..\custom\Az.ConnectedKubernetes.custom.psm1` module. Cmdlets that are *not merged* from those directories are decorated with the `InternalExport` attribute. This happens when you set the cmdlet to **hide** from configuration. For more information on hiding, see [cmdlet hiding](https://github.com/Azure/autorest/blob/master/docs/powershell/options.md#cmdlet-hiding-exportation-suppression) or the [readme.md](..\internal/readme.md) in the `..\internal` folder.
+
+## Purpose
+We generate script cmdlets out of the binary cmdlets and custom cmdlets. The format of script cmdlets are simplistic; thus, easier to generate at build time. Generating the cmdlets is required as to allow merging of generated binary, hand-written binary, and hand-written custom cmdlets. For Azure cmdlets, having script cmdlets simplifies the mechanism for exporting Azure profiles.
+
+## Structure
+The cmdlets generated here will flat in the directory (no sub-folders) as long as there are no Azure profiles specified for any cmdlets. Azure profiles (the `Profiles` attribute) is only applied when generating with the `--azure` attribute (or `azure: true` in the configuration). When Azure profiles are applied, the folder structure has a folder per profile. Each profile folder has only those cmdlets that apply to that profile.
+
+## Usage
+When `./Az.ConnectedKubernetes.psm1` is loaded, it dynamically exports cmdlets here based on the folder structure and on the selected profile. If there are no sub-folders, it exports all cmdlets at the root of this folder. If there are sub-folders, it checks to see the selected profile. If no profile is selected, it exports the cmdlets in the last sub-folder (alphabetically). If a profile is selected, it exports the cmdlets in the sub-folder that matches the profile name. If there is no sub-folder that matches the profile name, it exports no cmdlets and writes a warning message.
\ No newline at end of file
diff --git a/src/ConnectedKubernetes/generate-help.ps1 b/src/ConnectedKubernetes/generate-help.ps1
new file mode 100644
index 000000000000..f2b817e1640b
--- /dev/null
+++ b/src/ConnectedKubernetes/generate-help.ps1
@@ -0,0 +1,73 @@
+# ----------------------------------------------------------------------------------
+#
+# Copyright Microsoft Corporation
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ----------------------------------------------------------------------------------
+param([switch]$Isolated)
+$ErrorActionPreference = 'Stop'
+
+$pwsh = [System.Diagnostics.Process]::GetCurrentProcess().Path
+if(-not $Isolated) {
+ Write-Host -ForegroundColor Green 'Creating isolated process...'
+ & "$pwsh" -NonInteractive -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -Isolated
+ return
+}
+
+$exportsFolder = Join-Path $PSScriptRoot 'exports'
+if(-not (Test-Path $exportsFolder)) {
+ Write-Error "Exports folder '$exportsFolder' was not found."
+}
+
+$directories = Get-ChildItem -Directory -Path $exportsFolder
+$hasProfiles = ($directories | Measure-Object).Count -gt 0
+if(-not $hasProfiles) {
+ $directories = Get-Item -Path $exportsFolder
+}
+
+$docsFolder = Join-Path $PSScriptRoot 'docs'
+if(Test-Path $docsFolder) {
+ $null = Get-ChildItem -Path $docsFolder -Recurse -Exclude 'readme.md' | Remove-Item -Recurse -ErrorAction SilentlyContinue
+}
+$null = New-Item -ItemType Directory -Force -Path $docsFolder -ErrorAction SilentlyContinue
+$examplesFolder = Join-Path $PSScriptRoot 'examples'
+
+$modulePsd1 = Get-Item -Path (Join-Path $PSScriptRoot './Az.ConnectedKubernetes.psd1')
+$modulePath = $modulePsd1.FullName
+$moduleName = $modulePsd1.BaseName
+
+# Load DLL to use build-time cmdlets
+Import-Module -Name $modulePath
+Import-Module -Name (Join-Path $PSScriptRoot './bin/Az.ConnectedKubernetes.private.dll')
+$instance = [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Module]::Instance
+# Module info is shared per profile
+$moduleInfo = Get-Module -Name $moduleName
+
+foreach($directory in $directories)
+{
+ if($hasProfiles) {
+ Select-AzProfile -Name $directory.Name
+ }
+ # Reload module per profile
+ Import-Module -Name $modulePath -Force
+
+ $cmdletNames = Get-ScriptCmdlet -ScriptFolder $directory.FullName
+ $cmdletHelpInfo = $cmdletNames | ForEach-Object { Get-Help -Name $_ -Full }
+ $cmdletFunctionInfo = Get-ScriptCmdlet -ScriptFolder $directory.FullName -AsFunctionInfo
+
+ $docsPath = Join-Path $docsFolder $directory.Name
+ $null = New-Item -ItemType Directory -Force -Path $docsPath -ErrorAction SilentlyContinue
+ $examplesPath = Join-Path $examplesFolder $directory.Name
+
+ Export-HelpMarkdown -ModuleInfo $moduleInfo -FunctionInfo $cmdletFunctionInfo -HelpInfo $cmdletHelpInfo -DocsFolder $docsPath -ExamplesFolder $examplesPath
+ Write-Host -ForegroundColor Green "Created documentation in '$docsPath'"
+}
+
+Write-Host -ForegroundColor Green '-------------Done-------------'
\ No newline at end of file
diff --git a/src/ConnectedKubernetes/generate-info.json b/src/ConnectedKubernetes/generate-info.json
new file mode 100644
index 000000000000..2550f04b74e6
--- /dev/null
+++ b/src/ConnectedKubernetes/generate-info.json
@@ -0,0 +1,8 @@
+{
+ "swagger_commit": "734319d8284f0bb20ba521808630be3e235ea344",
+ "autorest_core": "3.0.6282",
+ "autorest": "3.0.6187",
+ "node": "v10.16.0",
+ "autorest_remodeler": "2.1.27",
+ "autorest_powershell": "2.1.394"
+}
diff --git a/src/ConnectedKubernetes/generated/Module.cs b/src/ConnectedKubernetes/generated/Module.cs
new file mode 100644
index 000000000000..c755404b17f3
--- /dev/null
+++ b/src/ConnectedKubernetes/generated/Module.cs
@@ -0,0 +1,158 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Extensions;
+ using SendAsyncStepDelegate = global::System.Func, global::System.Threading.Tasks.Task>, global::System.Func, global::System.Threading.Tasks.Task>, global::System.Threading.Tasks.Task>, global::System.Threading.Tasks.Task>;
+ using PipelineChangeDelegate = global::System.Action, global::System.Threading.Tasks.Task>, global::System.Func, global::System.Threading.Tasks.Task>, global::System.Threading.Tasks.Task>, global::System.Threading.Tasks.Task>>;
+ using GetParameterDelegate = global::System.Func;
+ using ModuleLoadPipelineDelegate = global::System.Action, global::System.Threading.Tasks.Task>, global::System.Func, global::System.Threading.Tasks.Task>, global::System.Threading.Tasks.Task>, global::System.Threading.Tasks.Task>>, global::System.Action, global::System.Threading.Tasks.Task>, global::System.Func, global::System.Threading.Tasks.Task>, global::System.Threading.Tasks.Task>, global::System.Threading.Tasks.Task>>>;
+ using NewRequestPipelineDelegate = global::System.Action, global::System.Threading.Tasks.Task>, global::System.Func, global::System.Threading.Tasks.Task>, global::System.Threading.Tasks.Task>, global::System.Threading.Tasks.Task>>, global::System.Action, global::System.Threading.Tasks.Task>, global::System.Func, global::System.Threading.Tasks.Task>, global::System.Threading.Tasks.Task>, global::System.Threading.Tasks.Task>>>;
+ using ArgumentCompleterDelegate = global::System.Func;
+ using SignalDelegate = global::System.Func, global::System.Threading.Tasks.Task>;
+ using EventListenerDelegate = global::System.Func, global::System.Func, global::System.Threading.Tasks.Task>, global::System.Management.Automation.InvocationInfo, string, string, string, global::System.Exception, global::System.Threading.Tasks.Task>;
+ using NextDelegate = global::System.Func, global::System.Threading.Tasks.Task>, global::System.Threading.Tasks.Task>;
+
+ /// A class that contains the module-common code and data.
+ public partial class Module
+ {
+ /// The currently selected profile.
+ public string Profile = global::System.String.Empty;
+
+ public global::System.Net.Http.HttpClientHandler _handler = new global::System.Net.Http.HttpClientHandler();
+
+ /// the ISendAsync pipeline instance
+ private Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.HttpPipeline _pipeline;
+
+ /// the ISendAsync pipeline instance (when proxy is enabled)
+ private Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.HttpPipeline _pipelineWithProxy;
+
+ public global::System.Net.WebProxy _webProxy = new global::System.Net.WebProxy();
+
+ /// Gets completion data for azure specific fields
+ public ArgumentCompleterDelegate ArgumentCompleter { get; set; }
+
+ /// The instance of the Client API
+ public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.ConnectedKubernetes ClientAPI { get; set; }
+
+ /// A delegate that gets called for each signalled event
+ public EventListenerDelegate EventListener { get; set; }
+
+ /// The delegate to call to get parameter data from a common module.
+ public GetParameterDelegate GetParameterValue { get; set; }
+
+ /// Backing field for property.
+ private static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Module _instance;
+
+ /// the singleton of this module class
+ public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Module Instance => Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Module._instance?? (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Module._instance = new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Module());
+
+ /// The Name of this module
+ public string Name => @"Az.ConnectedKubernetes";
+
+ /// The delegate to call when this module is loaded (supporting a commmon module).
+ public ModuleLoadPipelineDelegate OnModuleLoad { get; set; }
+
+ /// The delegate to call before each new request (supporting a commmon module).
+ public NewRequestPipelineDelegate OnNewRequest { get; set; }
+
+ /// The name of the currently selected Azure profile
+ public global::System.String ProfileName { get; set; }
+
+ /// The ResourceID for this module (azure arm).
+ public string ResourceId => @"Az.ConnectedKubernetes";
+
+ /// The from the cmdlet
+ /// The HttpPipeline for the request
+
+ partial void AfterCreatePipeline(global::System.Management.Automation.InvocationInfo invocationInfo, ref Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.HttpPipeline pipeline);
+
+ /// The from the cmdlet
+ /// The HttpPipeline for the request
+
+ partial void BeforeCreatePipeline(global::System.Management.Automation.InvocationInfo invocationInfo, ref Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.HttpPipeline pipeline);
+
+ partial void CustomInit();
+
+ /// Creates an instance of the HttpPipeline for each call.
+ /// The from the cmdlet
+ /// the cmdlet's correlation id.
+ /// the cmdlet's process record correlation id.
+ /// the cmdlet's parameterset name.
+ /// An instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.HttpPipeline for the remote call.
+ public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.HttpPipeline CreatePipeline(global::System.Management.Automation.InvocationInfo invocationInfo, string correlationId, string processRecordId, string parameterSetName = null)
+ {
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.HttpPipeline pipeline = null;
+ BeforeCreatePipeline(invocationInfo, ref pipeline);
+ pipeline = (pipeline ?? (_handler.UseProxy ? _pipelineWithProxy : _pipeline)).Clone();
+ AfterCreatePipeline(invocationInfo, ref pipeline);
+ pipeline.Append(new Runtime.CmdInfoHandler(processRecordId, invocationInfo, parameterSetName).SendAsync);
+ OnNewRequest?.Invoke( invocationInfo, correlationId,processRecordId, (step)=> { pipeline.Prepend(step); } , (step)=> { pipeline.Append(step); } );
+ return pipeline;
+ }
+
+ /// Gets parameters from a common module.
+ /// The from the cmdlet
+ /// the cmdlet's correlation id.
+ /// The name of the parameter to get the value for.
+ ///
+ /// The parameter value from the common module. (Note: this should be type converted on the way back)
+ ///
+ public object GetParameter(global::System.Management.Automation.InvocationInfo invocationInfo, string correlationId, string parameterName) => GetParameterValue?.Invoke( ResourceId, Name, invocationInfo, correlationId,parameterName );
+
+ /// Initialization steps performed after the module is loaded.
+ public void Init()
+ {
+ OnModuleLoad?.Invoke( ResourceId, Name ,(step)=> { _pipeline.Prepend(step); } , (step)=> { _pipeline.Append(step); } );
+ OnModuleLoad?.Invoke( ResourceId, Name ,(step)=> { _pipelineWithProxy.Prepend(step); } , (step)=> { _pipelineWithProxy.Append(step); } );
+ CustomInit();
+ }
+
+ /// Creates the module instance.
+ private Module()
+ {
+ /// constructor
+ ClientAPI = new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.ConnectedKubernetes();
+ _handler.Proxy = _webProxy;
+ _pipeline = new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.HttpPipeline(new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.HttpClientFactory(new global::System.Net.Http.HttpClient()));
+ _pipelineWithProxy = new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.HttpPipeline(new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.HttpClientFactory(new global::System.Net.Http.HttpClient(_handler)));
+ }
+
+ /// The HTTP Proxy to use.
+ /// The HTTP Proxy Credentials
+ /// True if the proxy should use default credentials
+ public void SetProxyConfiguration(global::System.Uri proxy, global::System.Management.Automation.PSCredential proxyCredential, bool proxyUseDefaultCredentials)
+ {
+ // set the proxy configuration
+ _webProxy.Address = proxy;
+ _webProxy.BypassProxyOnLocal = false;
+ _webProxy.Credentials = proxyCredential ?.GetNetworkCredential();
+ _webProxy.UseDefaultCredentials = proxyUseDefaultCredentials;
+ _handler.UseProxy = proxy != null;
+ }
+
+ /// Called to dispatch events to the common module listener
+ /// The ID of the event
+ /// The cancellation token for the event
+ /// A delegate to get the detailed event data
+ /// The callback for the event dispatcher
+ /// The from the cmdlet
+ /// the cmdlet's parameterset name.
+ /// the cmdlet's correlation id.
+ /// the cmdlet's process record correlation id.
+ /// the exception that is being thrown (if available)
+ ///
+ /// A that will be complete when handling of the event is completed.
+ ///
+ public async global::System.Threading.Tasks.Task Signal(string id, global::System.Threading.CancellationToken token, global::System.Func getEventData, SignalDelegate signal, global::System.Management.Automation.InvocationInfo invocationInfo, string parameterSetName, string correlationId, string processRecordId, global::System.Exception exception)
+ {
+ using( NoSynchronizationContext )
+ {
+ await EventListener?.Invoke(id,token,getEventData, signal, invocationInfo, parameterSetName, correlationId,processRecordId,exception);
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/ConnectedKubernetes/generated/api/ConnectedKubernetes.cs b/src/ConnectedKubernetes/generated/api/ConnectedKubernetes.cs
new file mode 100644
index 000000000000..993e81651841
--- /dev/null
+++ b/src/ConnectedKubernetes/generated/api/ConnectedKubernetes.cs
@@ -0,0 +1,1542 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Extensions;
+
+ ///
+ /// Low-level API implementation for the ConnectedKubernetes service.
+ ///
+ public partial class ConnectedKubernetes
+ {
+
+ ///
+ /// API to register a new Kubernetes cluster and create a tracked resource in Azure Resource Manager (ARM).
+ ///
+ /// The ID of the target subscription.
+ /// The name of the resource group. The name is case insensitive.
+ /// The name of the Kubernetes cluster on which get is called.
+ /// Parameters supplied to Create a Connected Cluster.
+ /// 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.ConnectedKubernetes.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 ConnectedClusterCreate(string subscriptionId, string resourceGroupName, string clusterName, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedCluster body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2020-01-01-preview";
+ // Constant Parameters
+ using( NoSynchronizationContext )
+ {
+ // construct URL
+ var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace(
+ "https://management.azure.com/subscriptions/"
+ + global::System.Uri.EscapeDataString(subscriptionId)
+ + "/resourcegroups/"
+ + global::System.Uri.EscapeDataString(resourceGroupName)
+ + "/providers/Microsoft.Kubernetes/connectedClusters/"
+ + global::System.Uri.EscapeDataString(clusterName)
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"));
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ // generate request object
+ var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Method.Put, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.HeaderParametersAdded, _url); 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.ConnectedKubernetes.Runtime.Events.BodyContentSet, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // make the call
+ await this.ConnectedClusterCreate_Call(request,onOk,onDefault,eventListener,sender);
+ }
+ }
+
+ ///
+ /// API to register a new Kubernetes cluster and create a tracked resource in Azure Resource Manager (ARM).
+ ///
+ ///
+ /// Parameters supplied to Create a Connected Cluster.
+ /// 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.ConnectedKubernetes.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 ConnectedClusterCreateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedCluster body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2020-01-01-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.Kubernetes/connectedClusters/(?[^/]+)$", 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.Kubernetes/connectedClusters/{clusterName}'");
+ }
+
+ // replace URI parameters with values from identity
+ var subscriptionId = _match.Groups["subscriptionId"].Value;
+ var resourceGroupName = _match.Groups["resourceGroupName"].Value;
+ var clusterName = _match.Groups["clusterName"].Value;
+ // construct URL
+ var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace(
+ "https://management.azure.com/subscriptions/"
+ + subscriptionId
+ + "/resourcegroups/"
+ + resourceGroupName
+ + "/providers/Microsoft.Kubernetes/connectedClusters/"
+ + clusterName
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"));
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ // generate request object
+ var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Method.Put, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.HeaderParametersAdded, _url); 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.ConnectedKubernetes.Runtime.Events.BodyContentSet, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // make the call
+ await this.ConnectedClusterCreate_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.ConnectedKubernetes.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 ConnectedClusterCreate_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.ConnectedKubernetes.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync sender)
+ {
+ using( NoSynchronizationContext )
+ {
+ global::System.Net.Http.HttpResponseMessage _response = null;
+ try
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
+ _response = await sender.SendAsync(request, eventListener);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // this operation supports x-ms-long-running-operation
+ var _originalUri = request.RequestUri.AbsoluteUri;
+ // declared final-state-via: azure-async-operation
+ var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation");
+ var location = _response.GetFirstHeader(@"Location");
+ while (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted )
+ {
+
+ // get the delay before polling. (default to 30 seconds if not present)
+ int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ // start the delay timer (we'll await later...)
+ var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token );
+
+ // while we wait, let's grab the headers and get ready to poll.
+ if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) {
+ asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation");
+ }
+ if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) {
+ location = _response.GetFirstHeader(@"Location");
+ }
+ var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation;
+ request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Method.Get);
+
+ // and let's look at the current response body and see if we have some information we can give back to the listener
+ var content = await _response.Content.ReadAsStringAsync();
+ await waiting;
+
+ // check for cancellation
+ if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.Polling, $"Polling {_uri}.", _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ // drop the old response
+ _response?.Dispose();
+
+ // make the polling call
+ _response = await sender.SendAsync(request, eventListener);
+
+ // if we got back an OK, take a peek inside and see if it's done
+ if( _response.StatusCode == global::System.Net.HttpStatusCode.OK)
+ {
+ try {
+ if( Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject json)
+ {
+ var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status");
+ if( state is null )
+ {
+ // the body doesn't contain any information that has the state of the LRO
+ // we're going to just get out, and let the consumer have the result
+ break;
+ }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.Polling, $"Polled {_uri} provisioning state {state}.", _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ switch( state?.ToString()?.ToLower() )
+ {
+ case "succeeded":
+ case "failed":
+ case "canceled":
+ // we're done polling.
+ break;
+
+ default:
+ // need to keep polling!
+ _response.StatusCode = global::System.Net.HttpStatusCode.Created;
+ continue;
+ }
+ }
+ } catch {
+ // if we run into a problem peeking into the result,
+ // we really don't want to do anything special.
+ }
+ }
+
+ // check for terminal status code
+ if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted )
+ {
+ continue;
+ }
+ // we are done polling, do a request on final target?
+ // create a new request with the final uri
+ request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Method.Get);
+
+ // drop the old response
+ _response?.Dispose();
+
+ // make the final call
+ _response = await sender.SendAsync(request, eventListener);
+ break;
+ }
+ var _contentType = _response.Content.Headers.ContentType?.MediaType;
+
+ switch ( _response.StatusCode )
+ {
+ case global::System.Net.HttpStatusCode.OK:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.ConnectedCluster.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ break;
+ }
+ default:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ break;
+ }
+ }
+ }
+ finally
+ {
+ // finally statements
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.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 target subscription.
+ /// The name of the resource group. The name is case insensitive.
+ /// The name of the Kubernetes cluster on which get is called.
+ /// Parameters supplied to Create a Connected Cluster.
+ /// 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 ConnectedClusterCreate_Validate(string subscriptionId, string resourceGroupName, string clusterName, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedCluster body, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener)
+ {
+ using( NoSynchronizationContext )
+ {
+ await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId);
+ await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1);
+ await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName);
+ await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1);
+ await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90);
+ await eventListener.AssertRegEx(nameof(resourceGroupName),resourceGroupName,@"^[-\w\._\(\)]+$");
+ await eventListener.AssertNotNull(nameof(clusterName),clusterName);
+ await eventListener.AssertNotNull(nameof(body), body);
+ await eventListener.AssertObjectIsValid(nameof(body), body);
+ }
+ }
+
+ ///
+ /// Delete a connected cluster, removing the tracked resource in Azure Resource Manager (ARM).
+ ///
+ /// The ID of the target subscription.
+ /// The name of the resource group. The name is case insensitive.
+ /// The name of the Kubernetes cluster on which get is called.
+ /// 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.ConnectedKubernetes.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 ConnectedClusterDelete(string subscriptionId, string resourceGroupName, string clusterName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2020-01-01-preview";
+ // Constant Parameters
+ using( NoSynchronizationContext )
+ {
+ // construct URL
+ var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace(
+ "https://management.azure.com/subscriptions/"
+ + global::System.Uri.EscapeDataString(subscriptionId)
+ + "/resourcegroups/"
+ + global::System.Uri.EscapeDataString(resourceGroupName)
+ + "/providers/Microsoft.Kubernetes/connectedClusters/"
+ + global::System.Uri.EscapeDataString(clusterName)
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"));
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ // generate request object
+ var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Method.Delete, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // make the call
+ await this.ConnectedClusterDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender);
+ }
+ }
+
+ ///
+ /// Delete a connected cluster, removing the tracked resource in Azure Resource Manager (ARM).
+ ///
+ ///
+ /// 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.ConnectedKubernetes.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 ConnectedClusterDeleteViaIdentity(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.ConnectedKubernetes.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2020-01-01-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.Kubernetes/connectedClusters/(?[^/]+)$", 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.Kubernetes/connectedClusters/{clusterName}'");
+ }
+
+ // replace URI parameters with values from identity
+ var subscriptionId = _match.Groups["subscriptionId"].Value;
+ var resourceGroupName = _match.Groups["resourceGroupName"].Value;
+ var clusterName = _match.Groups["clusterName"].Value;
+ // construct URL
+ var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace(
+ "https://management.azure.com/subscriptions/"
+ + subscriptionId
+ + "/resourcegroups/"
+ + resourceGroupName
+ + "/providers/Microsoft.Kubernetes/connectedClusters/"
+ + clusterName
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"));
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ // generate request object
+ var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Method.Delete, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // make the call
+ await this.ConnectedClusterDelete_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.ConnectedKubernetes.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 ConnectedClusterDelete_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.ConnectedKubernetes.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync sender)
+ {
+ using( NoSynchronizationContext )
+ {
+ global::System.Net.Http.HttpResponseMessage _response = null;
+ try
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
+ _response = await sender.SendAsync(request, eventListener);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // this operation supports x-ms-long-running-operation
+ var _originalUri = request.RequestUri.AbsoluteUri;
+ // declared final-state-via: location
+ var _finalUri = _response.GetFirstHeader(@"Location");
+ var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation");
+ var location = _response.GetFirstHeader(@"Location");
+ while (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted )
+ {
+
+ // get the delay before polling. (default to 30 seconds if not present)
+ int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ // start the delay timer (we'll await later...)
+ var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token );
+
+ // while we wait, let's grab the headers and get ready to poll.
+ if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) {
+ asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation");
+ }
+ if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) {
+ location = _response.GetFirstHeader(@"Location");
+ }
+ var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation;
+ request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Method.Get);
+
+ // and let's look at the current response body and see if we have some information we can give back to the listener
+ var content = await _response.Content.ReadAsStringAsync();
+ await waiting;
+
+ // check for cancellation
+ if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.Polling, $"Polling {_uri}.", _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ // drop the old response
+ _response?.Dispose();
+
+ // make the polling call
+ _response = await sender.SendAsync(request, eventListener);
+
+ // if we got back an OK, take a peek inside and see if it's done
+ if( _response.StatusCode == global::System.Net.HttpStatusCode.OK)
+ {
+ try {
+ if( Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject json)
+ {
+ var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status");
+ if( state is null )
+ {
+ // the body doesn't contain any information that has the state of the LRO
+ // we're going to just get out, and let the consumer have the result
+ break;
+ }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.Polling, $"Polled {_uri} provisioning state {state}.", _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ switch( state?.ToString()?.ToLower() )
+ {
+ case "succeeded":
+ case "failed":
+ case "canceled":
+ // we're done polling.
+ break;
+
+ default:
+ // need to keep polling!
+ _response.StatusCode = global::System.Net.HttpStatusCode.Created;
+ continue;
+ }
+ }
+ } catch {
+ // if we run into a problem peeking into the result,
+ // we really don't want to do anything special.
+ }
+ }
+
+ // check for terminal status code
+ if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted )
+ {
+ continue;
+ }
+ // we are done polling, do a request on final target?
+ // create a new request with the final uri
+ request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Method.Get);
+
+ // drop the old response
+ _response?.Dispose();
+
+ // make the final call
+ _response = await sender.SendAsync(request, eventListener);
+ break;
+ }
+ var _contentType = _response.Content.Headers.ContentType?.MediaType;
+
+ switch ( _response.StatusCode )
+ {
+ case global::System.Net.HttpStatusCode.OK:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.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.ConnectedKubernetes.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await onNoContent(_response);
+ break;
+ }
+ default:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ break;
+ }
+ }
+ }
+ finally
+ {
+ // finally statements
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.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 target subscription.
+ /// The name of the resource group. The name is case insensitive.
+ /// The name of the Kubernetes cluster on which get is called.
+ /// 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 ConnectedClusterDelete_Validate(string subscriptionId, string resourceGroupName, string clusterName, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener)
+ {
+ using( NoSynchronizationContext )
+ {
+ await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId);
+ await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1);
+ await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName);
+ await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1);
+ await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90);
+ await eventListener.AssertRegEx(nameof(resourceGroupName),resourceGroupName,@"^[-\w\._\(\)]+$");
+ await eventListener.AssertNotNull(nameof(clusterName),clusterName);
+ }
+ }
+
+ ///
+ /// Returns the properties of the specified connected cluster, including name, identity, properties, and additional cluster
+ /// details.
+ ///
+ /// The ID of the target subscription.
+ /// The name of the resource group. The name is case insensitive.
+ /// The name of the Kubernetes cluster on which get is called.
+ /// 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.ConnectedKubernetes.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 ConnectedClusterGet(string subscriptionId, string resourceGroupName, string clusterName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2020-01-01-preview";
+ // Constant Parameters
+ using( NoSynchronizationContext )
+ {
+ // construct URL
+ var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace(
+ "https://management.azure.com/subscriptions/"
+ + global::System.Uri.EscapeDataString(subscriptionId)
+ + "/resourcegroups/"
+ + global::System.Uri.EscapeDataString(resourceGroupName)
+ + "/providers/Microsoft.Kubernetes/connectedClusters/"
+ + global::System.Uri.EscapeDataString(clusterName)
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"));
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ // generate request object
+ var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Method.Get, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // make the call
+ await this.ConnectedClusterGet_Call(request,onOk,onDefault,eventListener,sender);
+ }
+ }
+
+ ///
+ /// Returns the properties of the specified connected cluster, including name, identity, properties, and additional cluster
+ /// details.
+ ///
+ ///
+ /// 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.ConnectedKubernetes.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 ConnectedClusterGetViaIdentity(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.ConnectedKubernetes.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2020-01-01-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.Kubernetes/connectedClusters/(?[^/]+)$", 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.Kubernetes/connectedClusters/{clusterName}'");
+ }
+
+ // replace URI parameters with values from identity
+ var subscriptionId = _match.Groups["subscriptionId"].Value;
+ var resourceGroupName = _match.Groups["resourceGroupName"].Value;
+ var clusterName = _match.Groups["clusterName"].Value;
+ // construct URL
+ var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace(
+ "https://management.azure.com/subscriptions/"
+ + subscriptionId
+ + "/resourcegroups/"
+ + resourceGroupName
+ + "/providers/Microsoft.Kubernetes/connectedClusters/"
+ + clusterName
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"));
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ // generate request object
+ var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Method.Get, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // make the call
+ await this.ConnectedClusterGet_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.ConnectedKubernetes.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 ConnectedClusterGet_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.ConnectedKubernetes.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync sender)
+ {
+ using( NoSynchronizationContext )
+ {
+ global::System.Net.Http.HttpResponseMessage _response = null;
+ try
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
+ _response = await sender.SendAsync(request, eventListener);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.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.ConnectedKubernetes.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.ConnectedCluster.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ break;
+ }
+ default:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ break;
+ }
+ }
+ }
+ finally
+ {
+ // finally statements
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.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 target subscription.
+ /// The name of the resource group. The name is case insensitive.
+ /// The name of the Kubernetes cluster on which get is called.
+ /// 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 ConnectedClusterGet_Validate(string subscriptionId, string resourceGroupName, string clusterName, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener)
+ {
+ using( NoSynchronizationContext )
+ {
+ await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId);
+ await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1);
+ await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName);
+ await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1);
+ await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90);
+ await eventListener.AssertRegEx(nameof(resourceGroupName),resourceGroupName,@"^[-\w\._\(\)]+$");
+ await eventListener.AssertNotNull(nameof(clusterName),clusterName);
+ }
+ }
+
+ /// API to enumerate registered connected K8s clusters under a Resource Group
+ /// The ID of the target subscription.
+ /// The name of the resource group. The name is case insensitive.
+ /// 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.ConnectedKubernetes.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 ConnectedClusterListByResourceGroup(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.ConnectedKubernetes.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2020-01-01-preview";
+ // Constant Parameters
+ using( NoSynchronizationContext )
+ {
+ // construct URL
+ var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace(
+ "https://management.azure.com/subscriptions/"
+ + global::System.Uri.EscapeDataString(subscriptionId)
+ + "/resourcegroups/"
+ + global::System.Uri.EscapeDataString(resourceGroupName)
+ + "/providers/Microsoft.Kubernetes/connectedClusters"
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"));
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ // generate request object
+ var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Method.Get, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // make the call
+ await this.ConnectedClusterListByResourceGroup_Call(request,onOk,onDefault,eventListener,sender);
+ }
+ }
+
+ /// API to enumerate registered connected K8s clusters under a Resource Group
+ ///
+ /// 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.ConnectedKubernetes.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 ConnectedClusterListByResourceGroupViaIdentity(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.ConnectedKubernetes.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2020-01-01-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.Kubernetes/connectedClusters$", 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.Kubernetes/connectedClusters'");
+ }
+
+ // replace URI parameters with values from identity
+ var subscriptionId = _match.Groups["subscriptionId"].Value;
+ var resourceGroupName = _match.Groups["resourceGroupName"].Value;
+ // construct URL
+ var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace(
+ "https://management.azure.com/subscriptions/"
+ + subscriptionId
+ + "/resourcegroups/"
+ + resourceGroupName
+ + "/providers/Microsoft.Kubernetes/connectedClusters"
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"));
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ // generate request object
+ var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Method.Get, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // make the call
+ await this.ConnectedClusterListByResourceGroup_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.ConnectedKubernetes.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 ConnectedClusterListByResourceGroup_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.ConnectedKubernetes.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync sender)
+ {
+ using( NoSynchronizationContext )
+ {
+ global::System.Net.Http.HttpResponseMessage _response = null;
+ try
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
+ _response = await sender.SendAsync(request, eventListener);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.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.ConnectedKubernetes.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.ConnectedClusterList.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ break;
+ }
+ default:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ break;
+ }
+ }
+ }
+ finally
+ {
+ // finally statements
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.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 target subscription.
+ /// The name of the resource group. The name is case insensitive.
+ /// 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 ConnectedClusterListByResourceGroup_Validate(string subscriptionId, string resourceGroupName, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener)
+ {
+ using( NoSynchronizationContext )
+ {
+ await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId);
+ await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1);
+ await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName);
+ await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1);
+ await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90);
+ await eventListener.AssertRegEx(nameof(resourceGroupName),resourceGroupName,@"^[-\w\._\(\)]+$");
+ }
+ }
+
+ /// API to enumerate registered connected K8s clusters under a Subscription
+ /// The ID of the target 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).
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.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 ConnectedClusterListBySubscription(string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2020-01-01-preview";
+ // Constant Parameters
+ using( NoSynchronizationContext )
+ {
+ // construct URL
+ var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace(
+ "https://management.azure.com/subscriptions/"
+ + global::System.Uri.EscapeDataString(subscriptionId)
+ + "/providers/Microsoft.Kubernetes/connectedClusters"
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"));
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ // generate request object
+ var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Method.Get, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // make the call
+ await this.ConnectedClusterListBySubscription_Call(request,onOk,onDefault,eventListener,sender);
+ }
+ }
+
+ /// API to enumerate registered connected K8s clusters under a 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).
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.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 ConnectedClusterListBySubscriptionViaIdentity(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.ConnectedKubernetes.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2020-01-01-preview";
+ // Constant Parameters
+ using( NoSynchronizationContext )
+ {
+ // verify that Identity format is an exact match for uri
+
+ var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Microsoft.Kubernetes/connectedClusters$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity);
+ if (!_match.Success)
+ {
+ throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Microsoft.Kubernetes/connectedClusters'");
+ }
+
+ // replace URI parameters with values from identity
+ var subscriptionId = _match.Groups["subscriptionId"].Value;
+ // construct URL
+ var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace(
+ "https://management.azure.com/subscriptions/"
+ + subscriptionId
+ + "/providers/Microsoft.Kubernetes/connectedClusters"
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"));
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ // generate request object
+ var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Method.Get, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // make the call
+ await this.ConnectedClusterListBySubscription_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.ConnectedKubernetes.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 ConnectedClusterListBySubscription_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.ConnectedKubernetes.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync sender)
+ {
+ using( NoSynchronizationContext )
+ {
+ global::System.Net.Http.HttpResponseMessage _response = null;
+ try
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
+ _response = await sender.SendAsync(request, eventListener);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.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.ConnectedKubernetes.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.ConnectedClusterList.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ break;
+ }
+ default:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ break;
+ }
+ }
+ }
+ finally
+ {
+ // finally statements
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.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 target subscription.
+ /// 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 ConnectedClusterListBySubscription_Validate(string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener)
+ {
+ using( NoSynchronizationContext )
+ {
+ await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId);
+ await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1);
+ }
+ }
+
+ ///
+ /// Gets cluster user credentials of the connected cluster with a specified resource group and name.
+ ///
+ /// The ID of the target subscription.
+ /// The name of the resource group. The name is case insensitive.
+ /// The name of the Kubernetes cluster on which get is called.
+ /// 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.ConnectedKubernetes.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 ConnectedClusterListClusterUserCredentials(string subscriptionId, string resourceGroupName, string clusterName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2020-01-01-preview";
+ // Constant Parameters
+ using( NoSynchronizationContext )
+ {
+ // construct URL
+ var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace(
+ "https://management.azure.com/subscriptions/"
+ + global::System.Uri.EscapeDataString(subscriptionId)
+ + "/resourcegroups/"
+ + global::System.Uri.EscapeDataString(resourceGroupName)
+ + "/providers/Microsoft.Kubernetes/connectedClusters/"
+ + global::System.Uri.EscapeDataString(clusterName)
+ + "/listClusterUserCredentials"
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"));
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ // generate request object
+ var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Method.Post, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // make the call
+ await this.ConnectedClusterListClusterUserCredentials_Call(request,onOk,onDefault,eventListener,sender);
+ }
+ }
+
+ ///
+ /// Gets cluster user credentials of the connected cluster with a specified resource group and name.
+ ///
+ ///
+ /// a delegate that is called when the remote service returns 200 (OK).
+ /// a delegate that is called when the remote service returns default (any response code not handled
+ /// elsewhere).
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.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 ConnectedClusterListClusterUserCredentialsViaIdentity(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.ConnectedKubernetes.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2020-01-01-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.Kubernetes/connectedClusters/(?[^/]+)$", 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.Kubernetes/connectedClusters/{clusterName}/listClusterUserCredentials'");
+ }
+
+ // replace URI parameters with values from identity
+ var subscriptionId = _match.Groups["subscriptionId"].Value;
+ var resourceGroupName = _match.Groups["resourceGroupName"].Value;
+ var clusterName = _match.Groups["clusterName"].Value;
+ // construct URL
+ var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace(
+ "https://management.azure.com/subscriptions/"
+ + subscriptionId
+ + "/resourcegroups/"
+ + resourceGroupName
+ + "/providers/Microsoft.Kubernetes/connectedClusters/"
+ + clusterName
+ + "/listClusterUserCredentials"
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"));
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ // generate request object
+ var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Method.Post, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // make the call
+ await this.ConnectedClusterListClusterUserCredentials_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.ConnectedKubernetes.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 ConnectedClusterListClusterUserCredentials_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.ConnectedKubernetes.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync sender)
+ {
+ using( NoSynchronizationContext )
+ {
+ global::System.Net.Http.HttpResponseMessage _response = null;
+ try
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
+ _response = await sender.SendAsync(request, eventListener);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.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.ConnectedKubernetes.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.CredentialResults.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ break;
+ }
+ default:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ break;
+ }
+ }
+ }
+ finally
+ {
+ // finally statements
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.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 target subscription.
+ /// The name of the resource group. The name is case insensitive.
+ /// The name of the Kubernetes cluster on which get is called.
+ /// 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 ConnectedClusterListClusterUserCredentials_Validate(string subscriptionId, string resourceGroupName, string clusterName, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener)
+ {
+ using( NoSynchronizationContext )
+ {
+ await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId);
+ await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1);
+ await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName);
+ await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1);
+ await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90);
+ await eventListener.AssertRegEx(nameof(resourceGroupName),resourceGroupName,@"^[-\w\._\(\)]+$");
+ await eventListener.AssertNotNull(nameof(clusterName),clusterName);
+ }
+ }
+
+ /// API to update certain properties of the connected cluster resource
+ /// The ID of the target subscription.
+ /// The name of the resource group. The name is case insensitive.
+ /// The name of the Kubernetes cluster on which get is called.
+ /// Parameters supplied to update Connected Cluster.
+ /// 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.ConnectedKubernetes.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 ConnectedClusterUpdate(string subscriptionId, string resourceGroupName, string clusterName, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterPatch body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2020-01-01-preview";
+ // Constant Parameters
+ using( NoSynchronizationContext )
+ {
+ // construct URL
+ var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace(
+ "https://management.azure.com/subscriptions/"
+ + global::System.Uri.EscapeDataString(subscriptionId)
+ + "/resourcegroups/"
+ + global::System.Uri.EscapeDataString(resourceGroupName)
+ + "/providers/Microsoft.Kubernetes/connectedClusters/"
+ + global::System.Uri.EscapeDataString(clusterName)
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"));
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ // generate request object
+ var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Method.Patch, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.HeaderParametersAdded, _url); 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.ConnectedKubernetes.Runtime.Events.BodyContentSet, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // make the call
+ await this.ConnectedClusterUpdate_Call(request,onOk,onDefault,eventListener,sender);
+ }
+ }
+
+ /// API to update certain properties of the connected cluster resource
+ ///
+ /// Parameters supplied to update Connected Cluster.
+ /// 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.ConnectedKubernetes.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 ConnectedClusterUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterPatch body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2020-01-01-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.Kubernetes/connectedClusters/(?[^/]+)$", 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.Kubernetes/connectedClusters/{clusterName}'");
+ }
+
+ // replace URI parameters with values from identity
+ var subscriptionId = _match.Groups["subscriptionId"].Value;
+ var resourceGroupName = _match.Groups["resourceGroupName"].Value;
+ var clusterName = _match.Groups["clusterName"].Value;
+ // construct URL
+ var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace(
+ "https://management.azure.com/subscriptions/"
+ + subscriptionId
+ + "/resourcegroups/"
+ + resourceGroupName
+ + "/providers/Microsoft.Kubernetes/connectedClusters/"
+ + clusterName
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"));
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ // generate request object
+ var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Method.Patch, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.HeaderParametersAdded, _url); 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.ConnectedKubernetes.Runtime.Events.BodyContentSet, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // make the call
+ await this.ConnectedClusterUpdate_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.ConnectedKubernetes.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 ConnectedClusterUpdate_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.ConnectedKubernetes.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync sender)
+ {
+ using( NoSynchronizationContext )
+ {
+ global::System.Net.Http.HttpResponseMessage _response = null;
+ try
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
+ _response = await sender.SendAsync(request, eventListener);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.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.ConnectedKubernetes.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.ConnectedCluster.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ break;
+ }
+ default:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ break;
+ }
+ }
+ }
+ finally
+ {
+ // finally statements
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.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 target subscription.
+ /// The name of the resource group. The name is case insensitive.
+ /// The name of the Kubernetes cluster on which get is called.
+ /// Parameters supplied to update Connected Cluster.
+ /// 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 ConnectedClusterUpdate_Validate(string subscriptionId, string resourceGroupName, string clusterName, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterPatch body, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener)
+ {
+ using( NoSynchronizationContext )
+ {
+ await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId);
+ await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1);
+ await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName);
+ await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1);
+ await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90);
+ await eventListener.AssertRegEx(nameof(resourceGroupName),resourceGroupName,@"^[-\w\._\(\)]+$");
+ await eventListener.AssertNotNull(nameof(clusterName),clusterName);
+ await eventListener.AssertNotNull(nameof(body), body);
+ await eventListener.AssertObjectIsValid(nameof(body), body);
+ }
+ }
+
+ /// Lists all of the available API operations for Connected Cluster 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.ConnectedKubernetes.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 OperationsGet(global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2020-01-01-preview";
+ // Constant Parameters
+ using( NoSynchronizationContext )
+ {
+ // construct URL
+ var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace(
+ "https://management.azure.com/providers/Microsoft.Kubernetes/operations"
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"));
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ // generate request object
+ var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Method.Get, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // make the call
+ await this.OperationsGet_Call(request,onOk,onDefault,eventListener,sender);
+ }
+ }
+
+ /// Lists all of the available API operations for Connected Cluster 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.ConnectedKubernetes.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 OperationsGetViaIdentity(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.ConnectedKubernetes.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2020-01-01-preview";
+ // Constant Parameters
+ using( NoSynchronizationContext )
+ {
+ // verify that Identity format is an exact match for uri
+
+ var _match = new global::System.Text.RegularExpressions.Regex("^/providers/Microsoft.Kubernetes/operations$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity);
+ if (!_match.Success)
+ {
+ throw new global::System.Exception("Invalid identity for URI '/providers/Microsoft.Kubernetes/operations'");
+ }
+
+ // replace URI parameters with values from identity
+ // construct URL
+ var _url = new global::System.Uri(global::System.Text.RegularExpressions.Regex.Replace(
+ "https://management.azure.com/providers/Microsoft.Kubernetes/operations"
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"));
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.URLCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ // generate request object
+ var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Method.Get, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.RequestCreated, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.HeaderParametersAdded, _url); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // make the call
+ await this.OperationsGet_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.ConnectedKubernetes.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 OperationsGet_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.ConnectedKubernetes.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.ISendAsync sender)
+ {
+ using( NoSynchronizationContext )
+ {
+ global::System.Net.Http.HttpResponseMessage _response = null;
+ try
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
+ _response = await sender.SendAsync(request, eventListener);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.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.ConnectedKubernetes.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.OperationList.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ break;
+ }
+ default:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ break;
+ }
+ }
+ }
+ finally
+ {
+ // finally statements
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.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 OperationsGet_Validate(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener)
+ {
+ using( NoSynchronizationContext )
+ {
+
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/ConnectedKubernetes/generated/api/Models/Api10/Resource.PowerShell.cs b/src/ConnectedKubernetes/generated/api/Models/Api10/Resource.PowerShell.cs
new file mode 100644
index 000000000000..3c595fecd119
--- /dev/null
+++ b/src/ConnectedKubernetes/generated/api/Models/Api10/Resource.PowerShell.cs
@@ -0,0 +1,133 @@
+namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell;
+
+ [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);
+
+ ///
+ /// 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.ConnectedKubernetes.Models.Api10.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.ConnectedKubernetes.Models.Api10.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.ConnectedKubernetes.Models.Api10.IResource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.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
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10.IResourceInternal)this).Name, global::System.Convert.ToString);
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10.IResourceInternal)this).Type, global::System.Convert.ToString);
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10.IResourceInternal)this).Id, 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 Resource(global::System.Management.Automation.PSObject content)
+ {
+ bool returnNow = false;
+ BeforeDeserializePSObject(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10.IResourceInternal)this).Name, global::System.Convert.ToString);
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10.IResourceInternal)this).Type, global::System.Convert.ToString);
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10.IResourceInternal)this).Id, 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.ConnectedKubernetes.Runtime.SerializationMode.IncludeAll)?.ToString();
+ }
+ [System.ComponentModel.TypeConverter(typeof(ResourceTypeConverter))]
+ public partial interface IResource
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/src/ConnectedKubernetes/generated/api/Models/Api10/Resource.TypeConverter.cs b/src/ConnectedKubernetes/generated/api/Models/Api10/Resource.TypeConverter.cs
new file mode 100644
index 000000000000..c2517f1a7bd7
--- /dev/null
+++ b/src/ConnectedKubernetes/generated/api/Models/Api10/Resource.TypeConverter.cs
@@ -0,0 +1,142 @@
+namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell;
+
+ ///
+ /// A PowerShell PSTypeConverter to support converting to an instance of
+ ///
+ public partial class ResourceTypeConverter : 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
+ /// parameter.
+ ///
+ /// 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.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.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 to the parameter using and
+ ///
+ /// 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.ConnectedKubernetes.Models.Api10.IResource ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10.IResource).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return Resource.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return Resource.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return Resource.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/ConnectedKubernetes/generated/api/Models/Api10/Resource.cs b/src/ConnectedKubernetes/generated/api/Models/Api10/Resource.cs
new file mode 100644
index 000000000000..94e327b6c0c6
--- /dev/null
+++ b/src/ConnectedKubernetes/generated/api/Models/Api10/Resource.cs
@@ -0,0 +1,98 @@
+namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Extensions;
+
+ public partial class Resource :
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10.IResource,
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10.IResourceInternal
+ {
+
+ /// Backing field for property.
+ private string _id;
+
+ ///
+ /// Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Owned)]
+ public string Id { get => this._id; }
+
+ /// Internal Acessors for Id
+ string Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10.IResourceInternal.Id { get => this._id; set { {_id = value;} } }
+
+ /// Internal Acessors for Name
+ string Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10.IResourceInternal.Name { get => this._name; set { {_name = value;} } }
+
+ /// Internal Acessors for Type
+ string Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10.IResourceInternal.Type { get => this._type; set { {_type = value;} } }
+
+ /// Backing field for property.
+ private string _name;
+
+ /// The name of the resource
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Owned)]
+ public string Name { get => this._name; }
+
+ /// Backing field for property.
+ private string _type;
+
+ ///
+ /// The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Owned)]
+ public string Type { get => this._type; }
+
+ /// Creates an new instance.
+ public Resource()
+ {
+
+ }
+ }
+ public partial interface IResource :
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IJsonSerializable
+ {
+ ///
+ /// Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"Fully qualified resource Id for the resource. Ex - /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.ConnectedKubernetes.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"The name of the resource",
+ SerializedName = @"name",
+ PossibleTypes = new [] { typeof(string) })]
+ string Name { get; }
+ ///
+ /// The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts.",
+ SerializedName = @"type",
+ PossibleTypes = new [] { typeof(string) })]
+ string Type { get; }
+
+ }
+ internal partial interface IResourceInternal
+
+ {
+ ///
+ /// Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
+ ///
+ string Id { get; set; }
+ /// The name of the resource
+ string Name { get; set; }
+ ///
+ /// The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts.
+ ///
+ string Type { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/src/ConnectedKubernetes/generated/api/Models/Api10/Resource.json.cs b/src/ConnectedKubernetes/generated/api/Models/Api10/Resource.json.cs
new file mode 100644
index 000000000000..8a188d957f10
--- /dev/null
+++ b/src/ConnectedKubernetes/generated/api/Models/Api10/Resource.json.cs
@@ -0,0 +1,113 @@
+namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Extensions;
+
+ public partial class Resource
+ {
+
+ ///
+ /// 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.ConnectedKubernetes.Runtime.Json.JsonObject json);
+
+ ///
+ /// AfterToJson will be called after the json erialization 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.ConnectedKubernetes.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.ConnectedKubernetes.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.ConnectedKubernetes.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10.IResource.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10.IResource.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10.IResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject json ? new Resource(json) : null;
+ }
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject instance to deserialize from.
+ internal Resource(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject json)
+ {
+ bool returnNow = false;
+ BeforeFromJson(json, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;}
+ {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)Type;}
+ {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)Id;}
+ 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.ConnectedKubernetes.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject();
+
+ bool returnNow = false;
+ BeforeToJson(ref container, ref returnNow);
+ if (returnNow)
+ {
+ return container;
+ }
+ if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode.IncludeReadOnly))
+ {
+ AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add );
+ }
+ if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode.IncludeReadOnly))
+ {
+ AddIf( null != (((object)this._type)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonString(this._type.ToString()) : null, "type" ,container.Add );
+ }
+ if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode.IncludeReadOnly))
+ {
+ AddIf( null != (((object)this._id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonString(this._id.ToString()) : null, "id" ,container.Add );
+ }
+ AfterToJson(ref container);
+ return container;
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/ConnectedKubernetes/generated/api/Models/Api10/TrackedResource.PowerShell.cs b/src/ConnectedKubernetes/generated/api/Models/Api10/TrackedResource.PowerShell.cs
new file mode 100644
index 000000000000..d4ed8b33f61e
--- /dev/null
+++ b/src/ConnectedKubernetes/generated/api/Models/Api10/TrackedResource.PowerShell.cs
@@ -0,0 +1,139 @@
+namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell;
+
+ /// The resource model definition for a ARM tracked top level resource
+ [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);
+
+ ///
+ /// 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.ConnectedKubernetes.Models.Api10.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.ConnectedKubernetes.Models.Api10.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.ConnectedKubernetes.Models.Api10.ITrackedResource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.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.ConnectedKubernetes.Runtime.SerializationMode.IncludeAll)?.ToString();
+
+ ///
+ /// 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
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10.ITrackedResourceInternal)this).Location, global::System.Convert.ToString);
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10.TrackedResourceTagsTypeConverter.ConvertFrom);
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10.IResourceInternal)this).Name, global::System.Convert.ToString);
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10.IResourceInternal)this).Type, global::System.Convert.ToString);
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10.IResourceInternal)this).Id, 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
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10.ITrackedResourceInternal)this).Location, global::System.Convert.ToString);
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10.TrackedResourceTagsTypeConverter.ConvertFrom);
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10.IResourceInternal)this).Name, global::System.Convert.ToString);
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10.IResourceInternal)this).Type, global::System.Convert.ToString);
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10.IResourceInternal)this).Id, global::System.Convert.ToString);
+ AfterDeserializePSObject(content);
+ }
+ }
+ /// The resource model definition for a ARM tracked top level resource
+ [System.ComponentModel.TypeConverter(typeof(TrackedResourceTypeConverter))]
+ public partial interface ITrackedResource
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/src/ConnectedKubernetes/generated/api/Models/Api10/TrackedResource.TypeConverter.cs b/src/ConnectedKubernetes/generated/api/Models/Api10/TrackedResource.TypeConverter.cs
new file mode 100644
index 000000000000..2e699099ce35
--- /dev/null
+++ b/src/ConnectedKubernetes/generated/api/Models/Api10/TrackedResource.TypeConverter.cs
@@ -0,0 +1,142 @@
+namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell;
+
+ ///
+ /// A PowerShell PSTypeConverter to support converting to an instance of
+ ///
+ public partial class TrackedResourceTypeConverter : 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
+ /// parameter.
+ ///
+ /// 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.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.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 to the parameter using and
+ ///
+ /// 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.ConnectedKubernetes.Models.Api10.ITrackedResource ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10.ITrackedResource).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return TrackedResource.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return TrackedResource.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return TrackedResource.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/ConnectedKubernetes/generated/api/Models/Api10/TrackedResource.cs b/src/ConnectedKubernetes/generated/api/Models/Api10/TrackedResource.cs
new file mode 100644
index 000000000000..4f0dd38f9b19
--- /dev/null
+++ b/src/ConnectedKubernetes/generated/api/Models/Api10/TrackedResource.cs
@@ -0,0 +1,107 @@
+namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Extensions;
+
+ /// The resource model definition for a ARM tracked top level resource
+ public partial class TrackedResource :
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10.ITrackedResource,
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10.ITrackedResourceInternal,
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IValidates
+ {
+ ///
+ /// Backing field for Inherited model
+ ///
+ private Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10.Resource();
+
+ ///
+ /// Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Inherited)]
+ public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10.IResourceInternal)__resource).Id; }
+
+ /// Backing field for property.
+ private string _location;
+
+ /// The geo-location where the resource lives
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Owned)]
+ public string Location { get => this._location; set => this._location = value; }
+
+ /// Internal Acessors for Id
+ string Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10.IResourceInternal)__resource).Id = value; }
+
+ /// Internal Acessors for Name
+ string Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10.IResourceInternal)__resource).Name = value; }
+
+ /// Internal Acessors for Type
+ string Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10.IResourceInternal)__resource).Type = value; }
+
+ /// The name of the resource
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Inherited)]
+ public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10.IResourceInternal)__resource).Name; }
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10.ITrackedResourceTags _tag;
+
+ /// Resource tags.
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Owned)]
+ public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10.ITrackedResourceTags Tag { get => (this._tag = this._tag ?? new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10.TrackedResourceTags()); set => this._tag = value; }
+
+ ///
+ /// The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Inherited)]
+ public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10.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 < see cref = "global::System.Threading.Tasks.Task" /> that will be complete when validation is completed.
+ ///
+ public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener)
+ {
+ await eventListener.AssertNotNull(nameof(__resource), __resource);
+ await eventListener.AssertObjectIsValid(nameof(__resource), __resource);
+ }
+ }
+ /// The resource model definition for a ARM tracked top level resource
+ public partial interface ITrackedResource :
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IJsonSerializable,
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10.IResource
+ {
+ /// The geo-location where the resource lives
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.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.ConnectedKubernetes.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Resource tags.",
+ SerializedName = @"tags",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10.ITrackedResourceTags) })]
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10.ITrackedResourceTags Tag { get; set; }
+
+ }
+ /// The resource model definition for a ARM tracked top level resource
+ internal partial interface ITrackedResourceInternal :
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10.IResourceInternal
+ {
+ /// The geo-location where the resource lives
+ string Location { get; set; }
+ /// Resource tags.
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10.ITrackedResourceTags Tag { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/src/ConnectedKubernetes/generated/api/Models/Api10/TrackedResource.json.cs b/src/ConnectedKubernetes/generated/api/Models/Api10/TrackedResource.json.cs
new file mode 100644
index 000000000000..fd46ac66492e
--- /dev/null
+++ b/src/ConnectedKubernetes/generated/api/Models/Api10/TrackedResource.json.cs
@@ -0,0 +1,105 @@
+namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Extensions;
+
+ /// The resource model definition for a ARM tracked top level resource
+ public partial class TrackedResource
+ {
+
+ ///
+ /// 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.ConnectedKubernetes.Runtime.Json.JsonObject json);
+
+ ///
+ /// AfterToJson will be called after the json erialization 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.ConnectedKubernetes.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.ConnectedKubernetes.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.ConnectedKubernetes.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10.ITrackedResource.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10.ITrackedResource.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10.ITrackedResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject json ? new TrackedResource(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.ConnectedKubernetes.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject();
+
+ bool returnNow = false;
+ BeforeToJson(ref container, ref returnNow);
+ if (returnNow)
+ {
+ return container;
+ }
+ __resource?.ToJson(container, serializationMode);
+ AddIf( null != (((object)this._location)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonString(this._location.ToString()) : null, "location" ,container.Add );
+ AddIf( null != this._tag ? (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode) this._tag.ToJson(null,serializationMode) : null, "tags" ,container.Add );
+ AfterToJson(ref container);
+ return container;
+ }
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject instance to deserialize from.
+ internal TrackedResource(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject json)
+ {
+ bool returnNow = false;
+ BeforeFromJson(json, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ __resource = new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10.Resource(json);
+ {_location = If( json?.PropertyT("location"), out var __jsonLocation) ? (string)__jsonLocation : (string)Location;}
+ {_tag = If( json?.PropertyT("tags"), out var __jsonTags) ? Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10.TrackedResourceTags.FromJson(__jsonTags) : Tag;}
+ AfterFromJson(json);
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/ConnectedKubernetes/generated/api/Models/Api10/TrackedResourceTags.PowerShell.cs b/src/ConnectedKubernetes/generated/api/Models/Api10/TrackedResourceTags.PowerShell.cs
new file mode 100644
index 000000000000..ff5a73da21e4
--- /dev/null
+++ b/src/ConnectedKubernetes/generated/api/Models/Api10/TrackedResourceTags.PowerShell.cs
@@ -0,0 +1,133 @@
+namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell;
+
+ /// Resource tags.
+ [System.ComponentModel.TypeConverter(typeof(TrackedResourceTagsTypeConverter))]
+ public partial class TrackedResourceTags
+ {
+
+ ///
+ /// 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);
+
+ ///
+ /// 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.ConnectedKubernetes.Models.Api10.ITrackedResourceTags DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ {
+ return new TrackedResourceTags(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.ConnectedKubernetes.Models.Api10.ITrackedResourceTags DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ {
+ return new TrackedResourceTags(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.ConnectedKubernetes.Models.Api10.ITrackedResourceTags FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.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.ConnectedKubernetes.Runtime.SerializationMode.IncludeAll)?.ToString();
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ internal TrackedResourceTags(global::System.Collections.IDictionary content)
+ {
+ bool returnNow = false;
+ BeforeDeserializeDictionary(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ // this type is a dictionary; copy elements from source to here.
+ CopyFrom(content);
+ AfterDeserializeDictionary(content);
+ }
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ internal TrackedResourceTags(global::System.Management.Automation.PSObject content)
+ {
+ bool returnNow = false;
+ BeforeDeserializePSObject(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ // this type is a dictionary; copy elements from source to here.
+ CopyFrom(content);
+ AfterDeserializePSObject(content);
+ }
+ }
+ /// Resource tags.
+ [System.ComponentModel.TypeConverter(typeof(TrackedResourceTagsTypeConverter))]
+ public partial interface ITrackedResourceTags
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/src/ConnectedKubernetes/generated/api/Models/Api10/TrackedResourceTags.TypeConverter.cs b/src/ConnectedKubernetes/generated/api/Models/Api10/TrackedResourceTags.TypeConverter.cs
new file mode 100644
index 000000000000..7cf6f2df70b3
--- /dev/null
+++ b/src/ConnectedKubernetes/generated/api/Models/Api10/TrackedResourceTags.TypeConverter.cs
@@ -0,0 +1,142 @@
+namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell;
+
+ ///
+ /// A PowerShell PSTypeConverter to support converting to an instance of
+ ///
+ public partial class TrackedResourceTagsTypeConverter : 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
+ /// parameter.
+ ///
+ /// 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.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.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 to the parameter using and
+ ///
+ /// 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.ConnectedKubernetes.Models.Api10.ITrackedResourceTags ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10.ITrackedResourceTags).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return TrackedResourceTags.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return TrackedResourceTags.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return TrackedResourceTags.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/ConnectedKubernetes/generated/api/Models/Api10/TrackedResourceTags.cs b/src/ConnectedKubernetes/generated/api/Models/Api10/TrackedResourceTags.cs
new file mode 100644
index 000000000000..a6810236396d
--- /dev/null
+++ b/src/ConnectedKubernetes/generated/api/Models/Api10/TrackedResourceTags.cs
@@ -0,0 +1,30 @@
+namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Extensions;
+
+ /// Resource tags.
+ public partial class TrackedResourceTags :
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10.ITrackedResourceTags,
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10.ITrackedResourceTagsInternal
+ {
+
+ /// Creates an new instance.
+ public TrackedResourceTags()
+ {
+
+ }
+ }
+ /// Resource tags.
+ public partial interface ITrackedResourceTags :
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IJsonSerializable,
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IAssociativeArray
+ {
+
+ }
+ /// Resource tags.
+ internal partial interface ITrackedResourceTagsInternal
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/src/ConnectedKubernetes/generated/api/Models/Api10/TrackedResourceTags.dictionary.cs b/src/ConnectedKubernetes/generated/api/Models/Api10/TrackedResourceTags.dictionary.cs
new file mode 100644
index 000000000000..08e360613b56
--- /dev/null
+++ b/src/ConnectedKubernetes/generated/api/Models/Api10/TrackedResourceTags.dictionary.cs
@@ -0,0 +1,70 @@
+namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Extensions;
+
+ public partial class TrackedResourceTags :
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IAssociativeArray
+ {
+ protected global::System.Collections.Generic.Dictionary __additionalProperties = new global::System.Collections.Generic.Dictionary();
+
+ global::System.Collections.Generic.IDictionary Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IAssociativeArray.AdditionalProperties { get => __additionalProperties; }
+
+ int Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IAssociativeArray.Count { get => __additionalProperties.Count; }
+
+ global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IAssociativeArray.Keys { get => __additionalProperties.Keys; }
+
+ global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IAssociativeArray.Values { get => __additionalProperties.Values; }
+
+ public string this[global::System.String index] { get => __additionalProperties[index]; set => __additionalProperties[index] = value; }
+
+ ///
+ ///
+ public void Add(global::System.String key, string value) => __additionalProperties.Add( key, value);
+
+ public void Clear() => __additionalProperties.Clear();
+
+ ///
+ public bool ContainsKey(global::System.String key) => __additionalProperties.ContainsKey( key);
+
+ ///
+ public void CopyFrom(global::System.Collections.IDictionary source)
+ {
+ if (null != source)
+ {
+ foreach( var property in Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell.TypeConverterExtensions.GetFilteredProperties(source, new global::System.Collections.Generic.HashSet() { } ) )
+ {
+ if ((null != property.Key && null != property.Value))
+ {
+ this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value));
+ }
+ }
+ }
+ }
+
+ ///
+ public void CopyFrom(global::System.Management.Automation.PSObject source)
+ {
+ if (null != source)
+ {
+ foreach( var property in Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell.TypeConverterExtensions.GetFilteredProperties(source, new global::System.Collections.Generic.HashSet() { } ) )
+ {
+ if ((null != property.Key && null != property.Value))
+ {
+ this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value));
+ }
+ }
+ }
+ }
+
+ ///
+ public bool Remove(global::System.String key) => __additionalProperties.Remove( key);
+
+ ///
+ ///
+ public bool TryGetValue(global::System.String key, out string value) => __additionalProperties.TryGetValue( key, out value);
+
+ ///
+
+ public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10.TrackedResourceTags source) => source.__additionalProperties;
+ }
+}
\ No newline at end of file
diff --git a/src/ConnectedKubernetes/generated/api/Models/Api10/TrackedResourceTags.json.cs b/src/ConnectedKubernetes/generated/api/Models/Api10/TrackedResourceTags.json.cs
new file mode 100644
index 000000000000..71aad39dd6ed
--- /dev/null
+++ b/src/ConnectedKubernetes/generated/api/Models/Api10/TrackedResourceTags.json.cs
@@ -0,0 +1,102 @@
+namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Extensions;
+
+ /// Resource tags.
+ public partial class TrackedResourceTags
+ {
+
+ ///
+ /// 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.ConnectedKubernetes.Runtime.Json.JsonObject json);
+
+ ///
+ /// AfterToJson will be called after the json erialization 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.ConnectedKubernetes.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.ConnectedKubernetes.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.ConnectedKubernetes.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10.ITrackedResourceTags.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10.ITrackedResourceTags.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10.ITrackedResourceTags FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject json ? new TrackedResourceTags(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.ConnectedKubernetes.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject();
+
+ bool returnNow = false;
+ BeforeToJson(ref container, ref returnNow);
+ if (returnNow)
+ {
+ return container;
+ }
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.JsonSerializable.ToJson( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IAssociativeArray)this).AdditionalProperties, container);
+ AfterToJson(ref container);
+ return container;
+ }
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject instance to deserialize from.
+ ///
+ internal TrackedResourceTags(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject json, global::System.Collections.Generic.HashSet exclusions = null)
+ {
+ bool returnNow = false;
+ BeforeFromJson(json, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.JsonSerializable.FromJson( json, ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IAssociativeArray)this).AdditionalProperties, null ,exclusions );
+ AfterFromJson(json);
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/ConnectedCluster.PowerShell.cs b/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/ConnectedCluster.PowerShell.cs
new file mode 100644
index 000000000000..4ad152b5620b
--- /dev/null
+++ b/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/ConnectedCluster.PowerShell.cs
@@ -0,0 +1,169 @@
+namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell;
+
+ /// Represents a connected cluster.
+ [System.ComponentModel.TypeConverter(typeof(ConnectedClusterTypeConverter))]
+ public partial class ConnectedCluster
+ {
+
+ ///
+ /// 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);
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ internal ConnectedCluster(global::System.Collections.IDictionary content)
+ {
+ bool returnNow = false;
+ BeforeDeserializeDictionary(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterInternal)this).Identity = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterIdentity) content.GetValueForProperty("Identity",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterInternal)this).Identity, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.ConnectedClusterIdentityTypeConverter.ConvertFrom);
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.ConnectedClusterPropertiesTypeConverter.ConvertFrom);
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10.IResourceInternal)this).Name, global::System.Convert.ToString);
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10.IResourceInternal)this).Type, global::System.Convert.ToString);
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10.IResourceInternal)this).Id, global::System.Convert.ToString);
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10.ITrackedResourceInternal)this).Location, global::System.Convert.ToString);
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10.TrackedResourceTagsTypeConverter.ConvertFrom);
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ProvisioningState.CreateFrom);
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterInternal)this).KubernetesVersion = (string) content.GetValueForProperty("KubernetesVersion",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterInternal)this).KubernetesVersion, global::System.Convert.ToString);
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterInternal)this).IdentityTenantId = (string) content.GetValueForProperty("IdentityTenantId",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterInternal)this).IdentityTenantId, global::System.Convert.ToString);
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterInternal)this).AadProfile = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterAadProfile) content.GetValueForProperty("AadProfile",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterInternal)this).AadProfile, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.ConnectedClusterAadProfileTypeConverter.ConvertFrom);
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterInternal)this).AgentPublicKeyCertificate = (string) content.GetValueForProperty("AgentPublicKeyCertificate",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterInternal)this).AgentPublicKeyCertificate, global::System.Convert.ToString);
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterInternal)this).AgentVersion = (string) content.GetValueForProperty("AgentVersion",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterInternal)this).AgentVersion, global::System.Convert.ToString);
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterInternal)this).IdentityPrincipalId = (string) content.GetValueForProperty("IdentityPrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterInternal)this).IdentityPrincipalId, global::System.Convert.ToString);
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterInternal)this).IdentityType = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ResourceIdentityType) content.GetValueForProperty("IdentityType",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterInternal)this).IdentityType, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ResourceIdentityType.CreateFrom);
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterInternal)this).TotalNodeCount = (int?) content.GetValueForProperty("TotalNodeCount",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterInternal)this).TotalNodeCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int)));
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterInternal)this).AadProfileClientAppId = (string) content.GetValueForProperty("AadProfileClientAppId",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterInternal)this).AadProfileClientAppId, global::System.Convert.ToString);
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterInternal)this).AadProfileServerAppId = (string) content.GetValueForProperty("AadProfileServerAppId",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterInternal)this).AadProfileServerAppId, global::System.Convert.ToString);
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterInternal)this).AadProfileTenantId = (string) content.GetValueForProperty("AadProfileTenantId",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterInternal)this).AadProfileTenantId, 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 ConnectedCluster(global::System.Management.Automation.PSObject content)
+ {
+ bool returnNow = false;
+ BeforeDeserializePSObject(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterInternal)this).Identity = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterIdentity) content.GetValueForProperty("Identity",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterInternal)this).Identity, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.ConnectedClusterIdentityTypeConverter.ConvertFrom);
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.ConnectedClusterPropertiesTypeConverter.ConvertFrom);
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10.IResourceInternal)this).Name, global::System.Convert.ToString);
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10.IResourceInternal)this).Type, global::System.Convert.ToString);
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10.IResourceInternal)this).Id, global::System.Convert.ToString);
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10.ITrackedResourceInternal)this).Location, global::System.Convert.ToString);
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10.TrackedResourceTagsTypeConverter.ConvertFrom);
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ProvisioningState.CreateFrom);
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterInternal)this).KubernetesVersion = (string) content.GetValueForProperty("KubernetesVersion",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterInternal)this).KubernetesVersion, global::System.Convert.ToString);
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterInternal)this).IdentityTenantId = (string) content.GetValueForProperty("IdentityTenantId",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterInternal)this).IdentityTenantId, global::System.Convert.ToString);
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterInternal)this).AadProfile = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterAadProfile) content.GetValueForProperty("AadProfile",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterInternal)this).AadProfile, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.ConnectedClusterAadProfileTypeConverter.ConvertFrom);
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterInternal)this).AgentPublicKeyCertificate = (string) content.GetValueForProperty("AgentPublicKeyCertificate",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterInternal)this).AgentPublicKeyCertificate, global::System.Convert.ToString);
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterInternal)this).AgentVersion = (string) content.GetValueForProperty("AgentVersion",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterInternal)this).AgentVersion, global::System.Convert.ToString);
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterInternal)this).IdentityPrincipalId = (string) content.GetValueForProperty("IdentityPrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterInternal)this).IdentityPrincipalId, global::System.Convert.ToString);
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterInternal)this).IdentityType = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ResourceIdentityType) content.GetValueForProperty("IdentityType",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterInternal)this).IdentityType, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ResourceIdentityType.CreateFrom);
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterInternal)this).TotalNodeCount = (int?) content.GetValueForProperty("TotalNodeCount",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterInternal)this).TotalNodeCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int)));
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterInternal)this).AadProfileClientAppId = (string) content.GetValueForProperty("AadProfileClientAppId",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterInternal)this).AadProfileClientAppId, global::System.Convert.ToString);
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterInternal)this).AadProfileServerAppId = (string) content.GetValueForProperty("AadProfileServerAppId",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterInternal)this).AadProfileServerAppId, global::System.Convert.ToString);
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterInternal)this).AadProfileTenantId = (string) content.GetValueForProperty("AadProfileTenantId",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterInternal)this).AadProfileTenantId, global::System.Convert.ToString);
+ AfterDeserializePSObject(content);
+ }
+
+ ///
+ /// Deserializes a into an instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ ///
+ /// an instance of .
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedCluster DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ {
+ return new ConnectedCluster(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.ConnectedKubernetes.Models.Api202001Preview.IConnectedCluster DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ {
+ return new ConnectedCluster(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.ConnectedKubernetes.Models.Api202001Preview.IConnectedCluster FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.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.ConnectedKubernetes.Runtime.SerializationMode.IncludeAll)?.ToString();
+ }
+ /// Represents a connected cluster.
+ [System.ComponentModel.TypeConverter(typeof(ConnectedClusterTypeConverter))]
+ public partial interface IConnectedCluster
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/ConnectedCluster.TypeConverter.cs b/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/ConnectedCluster.TypeConverter.cs
new file mode 100644
index 000000000000..9b4952383071
--- /dev/null
+++ b/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/ConnectedCluster.TypeConverter.cs
@@ -0,0 +1,142 @@
+namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell;
+
+ ///
+ /// A PowerShell PSTypeConverter to support converting to an instance of
+ ///
+ public partial class ConnectedClusterTypeConverter : 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
+ /// parameter.
+ ///
+ /// 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.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.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 to the parameter using and
+ ///
+ /// 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.ConnectedKubernetes.Models.Api202001Preview.IConnectedCluster ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedCluster).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return ConnectedCluster.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return ConnectedCluster.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return ConnectedCluster.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/ConnectedKubernetes/generated/api/Models/Api202001Preview/ConnectedCluster.cs b/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/ConnectedCluster.cs
new file mode 100644
index 000000000000..c21942370230
--- /dev/null
+++ b/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/ConnectedCluster.cs
@@ -0,0 +1,305 @@
+namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Extensions;
+
+ /// Represents a connected cluster.
+ public partial class ConnectedCluster :
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedCluster,
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterInternal,
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IValidates
+ {
+ ///
+ /// Backing field for Inherited model
+ ///
+ private Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10.ITrackedResource __trackedResource = new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10.TrackedResource();
+
+ /// The client app id configured on target K8 cluster
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Inlined)]
+ public string AadProfileClientAppId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterPropertiesInternal)Property).AadProfileClientAppId; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterPropertiesInternal)Property).AadProfileClientAppId = value; }
+
+ /// The server app id to access AD server
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Inlined)]
+ public string AadProfileServerAppId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterPropertiesInternal)Property).AadProfileServerAppId; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterPropertiesInternal)Property).AadProfileServerAppId = value; }
+
+ /// The aad tenant id which is configured on target K8s cluster
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Inlined)]
+ public string AadProfileTenantId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterPropertiesInternal)Property).AadProfileTenantId; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterPropertiesInternal)Property).AadProfileTenantId = value; }
+
+ ///
+ /// Base64 encoded public certificate used by the agent to do the initial handshake to the backend services in Azure.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Inlined)]
+ public string AgentPublicKeyCertificate { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterPropertiesInternal)Property).AgentPublicKeyCertificate; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterPropertiesInternal)Property).AgentPublicKeyCertificate = value; }
+
+ /// Version of the agent running on the connected cluster resource
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Inlined)]
+ public string AgentVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterPropertiesInternal)Property).AgentVersion; }
+
+ ///
+ /// Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Inherited)]
+ public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10.IResourceInternal)__trackedResource).Id; }
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterIdentity _identity;
+
+ /// The identity of the connected cluster.
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Owned)]
+ internal Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterIdentity Identity { get => (this._identity = this._identity ?? new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.ConnectedClusterIdentity()); set => this._identity = value; }
+
+ ///
+ /// The principal id of connected cluster identity. This property will only be provided for a system assigned identity.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Inlined)]
+ public string IdentityPrincipalId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterIdentityInternal)Identity).PrincipalId; }
+
+ ///
+ /// The tenant id associated with the connected cluster. This property will only be provided for a system assigned identity.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Inlined)]
+ public string IdentityTenantId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterIdentityInternal)Identity).TenantId; }
+
+ ///
+ /// The type of identity used for the connected cluster. The type 'SystemAssigned, includes a system created identity. The
+ /// type 'None' means no identity is assigned to the connected cluster.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Inlined)]
+ public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ResourceIdentityType IdentityType { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterIdentityInternal)Identity).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterIdentityInternal)Identity).Type = value; }
+
+ /// The Kubernetes version of the connected cluster resource
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Inlined)]
+ public string KubernetesVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterPropertiesInternal)Property).KubernetesVersion; }
+
+ /// The geo-location where the resource lives
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Inherited)]
+ public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10.ITrackedResourceInternal)__trackedResource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10.ITrackedResourceInternal)__trackedResource).Location = value; }
+
+ /// Internal Acessors for Id
+ string Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10.IResourceInternal)__trackedResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10.IResourceInternal)__trackedResource).Id = value; }
+
+ /// Internal Acessors for Name
+ string Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10.IResourceInternal)__trackedResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10.IResourceInternal)__trackedResource).Name = value; }
+
+ /// Internal Acessors for Type
+ string Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10.IResourceInternal)__trackedResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10.IResourceInternal)__trackedResource).Type = value; }
+
+ /// Internal Acessors for AadProfile
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterAadProfile Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterInternal.AadProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterPropertiesInternal)Property).AadProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterPropertiesInternal)Property).AadProfile = value; }
+
+ /// Internal Acessors for AgentVersion
+ string Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterInternal.AgentVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterPropertiesInternal)Property).AgentVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterPropertiesInternal)Property).AgentVersion = value; }
+
+ /// Internal Acessors for Identity
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterIdentity Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterInternal.Identity { get => (this._identity = this._identity ?? new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.ConnectedClusterIdentity()); set { {_identity = value;} } }
+
+ /// Internal Acessors for IdentityPrincipalId
+ string Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterInternal.IdentityPrincipalId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterIdentityInternal)Identity).PrincipalId; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterIdentityInternal)Identity).PrincipalId = value; }
+
+ /// Internal Acessors for IdentityTenantId
+ string Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterInternal.IdentityTenantId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterIdentityInternal)Identity).TenantId; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterIdentityInternal)Identity).TenantId = value; }
+
+ /// Internal Acessors for KubernetesVersion
+ string Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterInternal.KubernetesVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterPropertiesInternal)Property).KubernetesVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterPropertiesInternal)Property).KubernetesVersion = value; }
+
+ /// Internal Acessors for Property
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterProperties Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.ConnectedClusterProperties()); set { {_property = value;} } }
+
+ /// Internal Acessors for TotalNodeCount
+ int? Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterInternal.TotalNodeCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterPropertiesInternal)Property).TotalNodeCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterPropertiesInternal)Property).TotalNodeCount = value; }
+
+ /// The name of the resource
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Inherited)]
+ public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10.IResourceInternal)__trackedResource).Name; }
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterProperties _property;
+
+ /// Describes the connected cluster resource properties.
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Owned)]
+ internal Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.ConnectedClusterProperties()); set => this._property = value; }
+
+ /// The current deployment state of connectedClusters.
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Inlined)]
+ public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ProvisioningState? ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterPropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterPropertiesInternal)Property).ProvisioningState = value; }
+
+ /// Resource tags.
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Inherited)]
+ public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10.ITrackedResourceTags Tag { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10.ITrackedResourceInternal)__trackedResource).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10.ITrackedResourceInternal)__trackedResource).Tag = value; }
+
+ /// Number of nodes present in the connected cluster resource
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Inlined)]
+ public int? TotalNodeCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterPropertiesInternal)Property).TotalNodeCount; }
+
+ ///
+ /// The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Inherited)]
+ public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10.IResourceInternal)__trackedResource).Type; }
+
+ /// Creates an new instance.
+ public ConnectedCluster()
+ {
+
+ }
+
+ /// Validates that this object meets the validation criteria.
+ /// an instance that will receive validation
+ /// events.
+ ///
+ /// A < see cref = "global::System.Threading.Tasks.Task" /> that will be complete when validation is completed.
+ ///
+ public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener eventListener)
+ {
+ await eventListener.AssertNotNull(nameof(__trackedResource), __trackedResource);
+ await eventListener.AssertObjectIsValid(nameof(__trackedResource), __trackedResource);
+ }
+ }
+ /// Represents a connected cluster.
+ public partial interface IConnectedCluster :
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IJsonSerializable,
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10.ITrackedResource
+ {
+ /// The client app id configured on target K8 cluster
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"The client app id configured on target K8 cluster ",
+ SerializedName = @"clientAppId",
+ PossibleTypes = new [] { typeof(string) })]
+ string AadProfileClientAppId { get; set; }
+ /// The server app id to access AD server
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"The server app id to access AD server",
+ SerializedName = @"serverAppId",
+ PossibleTypes = new [] { typeof(string) })]
+ string AadProfileServerAppId { get; set; }
+ /// The aad tenant id which is configured on target K8s cluster
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"The aad tenant id which is configured on target K8s cluster",
+ SerializedName = @"tenantId",
+ PossibleTypes = new [] { typeof(string) })]
+ string AadProfileTenantId { get; set; }
+ ///
+ /// Base64 encoded public certificate used by the agent to do the initial handshake to the backend services in Azure.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info(
+ Required = true,
+ ReadOnly = false,
+ Description = @"Base64 encoded public certificate used by the agent to do the initial handshake to the backend services in Azure.",
+ SerializedName = @"agentPublicKeyCertificate",
+ PossibleTypes = new [] { typeof(string) })]
+ string AgentPublicKeyCertificate { get; set; }
+ /// Version of the agent running on the connected cluster resource
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"Version of the agent running on the connected cluster resource",
+ SerializedName = @"agentVersion",
+ PossibleTypes = new [] { typeof(string) })]
+ string AgentVersion { get; }
+ ///
+ /// The principal id of connected cluster identity. This property will only be provided for a system assigned identity.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"The principal id of connected cluster identity. This property will only be provided for a system assigned identity.",
+ SerializedName = @"principalId",
+ PossibleTypes = new [] { typeof(string) })]
+ string IdentityPrincipalId { get; }
+ ///
+ /// The tenant id associated with the connected cluster. This property will only be provided for a system assigned identity.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"The tenant id associated with the connected cluster. This property will only be provided for a system assigned identity.",
+ SerializedName = @"tenantId",
+ PossibleTypes = new [] { typeof(string) })]
+ string IdentityTenantId { get; }
+ ///
+ /// The type of identity used for the connected cluster. The type 'SystemAssigned, includes a system created identity. The
+ /// type 'None' means no identity is assigned to the connected cluster.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info(
+ Required = true,
+ ReadOnly = false,
+ Description = @"The type of identity used for the connected cluster. The type 'SystemAssigned, includes a system created identity. The type 'None' means no identity is assigned to the connected cluster.",
+ SerializedName = @"type",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ResourceIdentityType) })]
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ResourceIdentityType IdentityType { get; set; }
+ /// The Kubernetes version of the connected cluster resource
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"The Kubernetes version of the connected cluster resource",
+ SerializedName = @"kubernetesVersion",
+ PossibleTypes = new [] { typeof(string) })]
+ string KubernetesVersion { get; }
+ /// The current deployment state of connectedClusters.
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"The current deployment state of connectedClusters.",
+ SerializedName = @"provisioningState",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ProvisioningState) })]
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ProvisioningState? ProvisioningState { get; set; }
+ /// Number of nodes present in the connected cluster resource
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"Number of nodes present in the connected cluster resource",
+ SerializedName = @"totalNodeCount",
+ PossibleTypes = new [] { typeof(int) })]
+ int? TotalNodeCount { get; }
+
+ }
+ /// Represents a connected cluster.
+ internal partial interface IConnectedClusterInternal :
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10.ITrackedResourceInternal
+ {
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterAadProfile AadProfile { get; set; }
+ /// The client app id configured on target K8 cluster
+ string AadProfileClientAppId { get; set; }
+ /// The server app id to access AD server
+ string AadProfileServerAppId { get; set; }
+ /// The aad tenant id which is configured on target K8s cluster
+ string AadProfileTenantId { get; set; }
+ ///
+ /// Base64 encoded public certificate used by the agent to do the initial handshake to the backend services in Azure.
+ ///
+ string AgentPublicKeyCertificate { get; set; }
+ /// Version of the agent running on the connected cluster resource
+ string AgentVersion { get; set; }
+ /// The identity of the connected cluster.
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterIdentity Identity { get; set; }
+ ///
+ /// The principal id of connected cluster identity. This property will only be provided for a system assigned identity.
+ ///
+ string IdentityPrincipalId { get; set; }
+ ///
+ /// The tenant id associated with the connected cluster. This property will only be provided for a system assigned identity.
+ ///
+ string IdentityTenantId { get; set; }
+ ///
+ /// The type of identity used for the connected cluster. The type 'SystemAssigned, includes a system created identity. The
+ /// type 'None' means no identity is assigned to the connected cluster.
+ ///
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ResourceIdentityType IdentityType { get; set; }
+ /// The Kubernetes version of the connected cluster resource
+ string KubernetesVersion { get; set; }
+ /// Describes the connected cluster resource properties.
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterProperties Property { get; set; }
+ /// The current deployment state of connectedClusters.
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ProvisioningState? ProvisioningState { get; set; }
+ /// Number of nodes present in the connected cluster resource
+ int? TotalNodeCount { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/ConnectedCluster.json.cs b/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/ConnectedCluster.json.cs
new file mode 100644
index 000000000000..b707232a7af1
--- /dev/null
+++ b/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/ConnectedCluster.json.cs
@@ -0,0 +1,105 @@
+namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Extensions;
+
+ /// Represents a connected cluster.
+ public partial class ConnectedCluster
+ {
+
+ ///
+ /// 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.ConnectedKubernetes.Runtime.Json.JsonObject json);
+
+ ///
+ /// AfterToJson will be called after the json erialization 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.ConnectedKubernetes.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.ConnectedKubernetes.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.ConnectedKubernetes.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject instance to deserialize from.
+ internal ConnectedCluster(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject json)
+ {
+ bool returnNow = false;
+ BeforeFromJson(json, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ __trackedResource = new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api10.TrackedResource(json);
+ {_identity = If( json?.PropertyT("identity"), out var __jsonIdentity) ? Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.ConnectedClusterIdentity.FromJson(__jsonIdentity) : Identity;}
+ {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.ConnectedClusterProperties.FromJson(__jsonProperties) : Property;}
+ AfterFromJson(json);
+ }
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedCluster.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedCluster.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedCluster FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject json ? new ConnectedCluster(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.ConnectedKubernetes.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject();
+
+ bool returnNow = false;
+ BeforeToJson(ref container, ref returnNow);
+ if (returnNow)
+ {
+ return container;
+ }
+ __trackedResource?.ToJson(container, serializationMode);
+ AddIf( null != this._identity ? (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode) this._identity.ToJson(null,serializationMode) : null, "identity" ,container.Add );
+ AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.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/ConnectedKubernetes/generated/api/Models/Api202001Preview/ConnectedClusterAadProfile.PowerShell.cs b/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/ConnectedClusterAadProfile.PowerShell.cs
new file mode 100644
index 000000000000..bba1c3d90330
--- /dev/null
+++ b/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/ConnectedClusterAadProfile.PowerShell.cs
@@ -0,0 +1,135 @@
+namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell;
+
+ [System.ComponentModel.TypeConverter(typeof(ConnectedClusterAadProfileTypeConverter))]
+ public partial class ConnectedClusterAadProfile
+ {
+
+ ///
+ /// 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);
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ internal ConnectedClusterAadProfile(global::System.Collections.IDictionary content)
+ {
+ bool returnNow = false;
+ BeforeDeserializeDictionary(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterAadProfileInternal)this).ClientAppId = (string) content.GetValueForProperty("ClientAppId",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterAadProfileInternal)this).ClientAppId, global::System.Convert.ToString);
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterAadProfileInternal)this).ServerAppId = (string) content.GetValueForProperty("ServerAppId",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterAadProfileInternal)this).ServerAppId, global::System.Convert.ToString);
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterAadProfileInternal)this).TenantId = (string) content.GetValueForProperty("TenantId",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterAadProfileInternal)this).TenantId, 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 ConnectedClusterAadProfile(global::System.Management.Automation.PSObject content)
+ {
+ bool returnNow = false;
+ BeforeDeserializePSObject(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterAadProfileInternal)this).ClientAppId = (string) content.GetValueForProperty("ClientAppId",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterAadProfileInternal)this).ClientAppId, global::System.Convert.ToString);
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterAadProfileInternal)this).ServerAppId = (string) content.GetValueForProperty("ServerAppId",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterAadProfileInternal)this).ServerAppId, global::System.Convert.ToString);
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterAadProfileInternal)this).TenantId = (string) content.GetValueForProperty("TenantId",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterAadProfileInternal)this).TenantId, global::System.Convert.ToString);
+ AfterDeserializePSObject(content);
+ }
+
+ ///
+ /// Deserializes a into an instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ ///
+ /// an instance of .
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterAadProfile DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ {
+ return new ConnectedClusterAadProfile(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.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterAadProfile DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ {
+ return new ConnectedClusterAadProfile(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.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterAadProfile FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.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.ConnectedKubernetes.Runtime.SerializationMode.IncludeAll)?.ToString();
+ }
+ [System.ComponentModel.TypeConverter(typeof(ConnectedClusterAadProfileTypeConverter))]
+ public partial interface IConnectedClusterAadProfile
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/ConnectedClusterAadProfile.TypeConverter.cs b/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/ConnectedClusterAadProfile.TypeConverter.cs
new file mode 100644
index 000000000000..c6bc3c24f8bf
--- /dev/null
+++ b/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/ConnectedClusterAadProfile.TypeConverter.cs
@@ -0,0 +1,142 @@
+namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell;
+
+ ///
+ /// A PowerShell PSTypeConverter to support converting to an instance of
+ ///
+ public partial class ConnectedClusterAadProfileTypeConverter : 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
+ /// parameter.
+ ///
+ /// 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.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.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 to the parameter using and
+ ///
+ /// 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.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterAadProfile ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterAadProfile).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return ConnectedClusterAadProfile.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return ConnectedClusterAadProfile.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return ConnectedClusterAadProfile.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/ConnectedKubernetes/generated/api/Models/Api202001Preview/ConnectedClusterAadProfile.cs b/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/ConnectedClusterAadProfile.cs
new file mode 100644
index 000000000000..e76e820c6585
--- /dev/null
+++ b/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/ConnectedClusterAadProfile.cs
@@ -0,0 +1,77 @@
+namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Extensions;
+
+ public partial class ConnectedClusterAadProfile :
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterAadProfile,
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterAadProfileInternal
+ {
+
+ /// Backing field for property.
+ private string _clientAppId;
+
+ /// The client app id configured on target K8 cluster
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Owned)]
+ public string ClientAppId { get => this._clientAppId; set => this._clientAppId = value; }
+
+ /// Backing field for property.
+ private string _serverAppId;
+
+ /// The server app id to access AD server
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Owned)]
+ public string ServerAppId { get => this._serverAppId; set => this._serverAppId = value; }
+
+ /// Backing field for property.
+ private string _tenantId;
+
+ /// The aad tenant id which is configured on target K8s cluster
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Owned)]
+ public string TenantId { get => this._tenantId; set => this._tenantId = value; }
+
+ /// Creates an new instance.
+ public ConnectedClusterAadProfile()
+ {
+
+ }
+ }
+ public partial interface IConnectedClusterAadProfile :
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IJsonSerializable
+ {
+ /// The client app id configured on target K8 cluster
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"The client app id configured on target K8 cluster ",
+ SerializedName = @"clientAppId",
+ PossibleTypes = new [] { typeof(string) })]
+ string ClientAppId { get; set; }
+ /// The server app id to access AD server
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"The server app id to access AD server",
+ SerializedName = @"serverAppId",
+ PossibleTypes = new [] { typeof(string) })]
+ string ServerAppId { get; set; }
+ /// The aad tenant id which is configured on target K8s cluster
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"The aad tenant id which is configured on target K8s cluster",
+ SerializedName = @"tenantId",
+ PossibleTypes = new [] { typeof(string) })]
+ string TenantId { get; set; }
+
+ }
+ internal partial interface IConnectedClusterAadProfileInternal
+
+ {
+ /// The client app id configured on target K8 cluster
+ string ClientAppId { get; set; }
+ /// The server app id to access AD server
+ string ServerAppId { get; set; }
+ /// The aad tenant id which is configured on target K8s cluster
+ string TenantId { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/ConnectedClusterAadProfile.json.cs b/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/ConnectedClusterAadProfile.json.cs
new file mode 100644
index 000000000000..b90956bbecd4
--- /dev/null
+++ b/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/ConnectedClusterAadProfile.json.cs
@@ -0,0 +1,104 @@
+namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Extensions;
+
+ public partial class ConnectedClusterAadProfile
+ {
+
+ ///
+ /// 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.ConnectedKubernetes.Runtime.Json.JsonObject json);
+
+ ///
+ /// AfterToJson will be called after the json erialization 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.ConnectedKubernetes.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.ConnectedKubernetes.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.ConnectedKubernetes.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject instance to deserialize from.
+ internal ConnectedClusterAadProfile(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject json)
+ {
+ bool returnNow = false;
+ BeforeFromJson(json, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ {_clientAppId = If( json?.PropertyT("clientAppId"), out var __jsonClientAppId) ? (string)__jsonClientAppId : (string)ClientAppId;}
+ {_serverAppId = If( json?.PropertyT("serverAppId"), out var __jsonServerAppId) ? (string)__jsonServerAppId : (string)ServerAppId;}
+ {_tenantId = If( json?.PropertyT("tenantId"), out var __jsonTenantId) ? (string)__jsonTenantId : (string)TenantId;}
+ AfterFromJson(json);
+ }
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterAadProfile.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterAadProfile.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterAadProfile FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject json ? new ConnectedClusterAadProfile(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.ConnectedKubernetes.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject();
+
+ bool returnNow = false;
+ BeforeToJson(ref container, ref returnNow);
+ if (returnNow)
+ {
+ return container;
+ }
+ AddIf( null != (((object)this._clientAppId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonString(this._clientAppId.ToString()) : null, "clientAppId" ,container.Add );
+ AddIf( null != (((object)this._serverAppId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonString(this._serverAppId.ToString()) : null, "serverAppId" ,container.Add );
+ AddIf( null != (((object)this._tenantId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonString(this._tenantId.ToString()) : null, "tenantId" ,container.Add );
+ AfterToJson(ref container);
+ return container;
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/ConnectedClusterIdentity.PowerShell.cs b/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/ConnectedClusterIdentity.PowerShell.cs
new file mode 100644
index 000000000000..72fd650926fe
--- /dev/null
+++ b/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/ConnectedClusterIdentity.PowerShell.cs
@@ -0,0 +1,137 @@
+namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell;
+
+ /// Identity for the connected cluster.
+ [System.ComponentModel.TypeConverter(typeof(ConnectedClusterIdentityTypeConverter))]
+ public partial class ConnectedClusterIdentity
+ {
+
+ ///
+ /// 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);
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ internal ConnectedClusterIdentity(global::System.Collections.IDictionary content)
+ {
+ bool returnNow = false;
+ BeforeDeserializeDictionary(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterIdentityInternal)this).Type = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ResourceIdentityType) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterIdentityInternal)this).Type, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ResourceIdentityType.CreateFrom);
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterIdentityInternal)this).PrincipalId = (string) content.GetValueForProperty("PrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterIdentityInternal)this).PrincipalId, global::System.Convert.ToString);
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterIdentityInternal)this).TenantId = (string) content.GetValueForProperty("TenantId",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterIdentityInternal)this).TenantId, 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 ConnectedClusterIdentity(global::System.Management.Automation.PSObject content)
+ {
+ bool returnNow = false;
+ BeforeDeserializePSObject(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterIdentityInternal)this).Type = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ResourceIdentityType) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterIdentityInternal)this).Type, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ResourceIdentityType.CreateFrom);
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterIdentityInternal)this).PrincipalId = (string) content.GetValueForProperty("PrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterIdentityInternal)this).PrincipalId, global::System.Convert.ToString);
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterIdentityInternal)this).TenantId = (string) content.GetValueForProperty("TenantId",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterIdentityInternal)this).TenantId, global::System.Convert.ToString);
+ AfterDeserializePSObject(content);
+ }
+
+ ///
+ /// Deserializes a into an instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ ///
+ /// an instance of .
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterIdentity DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ {
+ return new ConnectedClusterIdentity(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.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterIdentity DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ {
+ return new ConnectedClusterIdentity(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.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterIdentity FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.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.ConnectedKubernetes.Runtime.SerializationMode.IncludeAll)?.ToString();
+ }
+ /// Identity for the connected cluster.
+ [System.ComponentModel.TypeConverter(typeof(ConnectedClusterIdentityTypeConverter))]
+ public partial interface IConnectedClusterIdentity
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/ConnectedClusterIdentity.TypeConverter.cs b/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/ConnectedClusterIdentity.TypeConverter.cs
new file mode 100644
index 000000000000..edcbca0c9c13
--- /dev/null
+++ b/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/ConnectedClusterIdentity.TypeConverter.cs
@@ -0,0 +1,142 @@
+namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell;
+
+ ///
+ /// A PowerShell PSTypeConverter to support converting to an instance of
+ ///
+ public partial class ConnectedClusterIdentityTypeConverter : 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
+ /// parameter.
+ ///
+ /// 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.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.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 to the parameter using and
+ ///
+ /// 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.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterIdentity ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterIdentity).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return ConnectedClusterIdentity.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return ConnectedClusterIdentity.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return ConnectedClusterIdentity.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/ConnectedKubernetes/generated/api/Models/Api202001Preview/ConnectedClusterIdentity.cs b/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/ConnectedClusterIdentity.cs
new file mode 100644
index 000000000000..2b8cee36bbfe
--- /dev/null
+++ b/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/ConnectedClusterIdentity.cs
@@ -0,0 +1,107 @@
+namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Extensions;
+
+ /// Identity for the connected cluster.
+ public partial class ConnectedClusterIdentity :
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterIdentity,
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterIdentityInternal
+ {
+
+ /// Internal Acessors for PrincipalId
+ string Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterIdentityInternal.PrincipalId { get => this._principalId; set { {_principalId = value;} } }
+
+ /// Internal Acessors for TenantId
+ string Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterIdentityInternal.TenantId { get => this._tenantId; set { {_tenantId = value;} } }
+
+ /// Backing field for property.
+ private string _principalId;
+
+ ///
+ /// The principal id of connected cluster identity. This property will only be provided for a system assigned identity.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Owned)]
+ public string PrincipalId { get => this._principalId; }
+
+ /// Backing field for property.
+ private string _tenantId;
+
+ ///
+ /// The tenant id associated with the connected cluster. This property will only be provided for a system assigned identity.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Owned)]
+ public string TenantId { get => this._tenantId; }
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ResourceIdentityType _type;
+
+ ///
+ /// The type of identity used for the connected cluster. The type 'SystemAssigned, includes a system created identity. The
+ /// type 'None' means no identity is assigned to the connected cluster.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Owned)]
+ public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ResourceIdentityType Type { get => this._type; set => this._type = value; }
+
+ /// Creates an new instance.
+ public ConnectedClusterIdentity()
+ {
+
+ }
+ }
+ /// Identity for the connected cluster.
+ public partial interface IConnectedClusterIdentity :
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IJsonSerializable
+ {
+ ///
+ /// The principal id of connected cluster identity. This property will only be provided for a system assigned identity.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"The principal id of connected cluster identity. This property will only be provided for a system assigned identity.",
+ SerializedName = @"principalId",
+ PossibleTypes = new [] { typeof(string) })]
+ string PrincipalId { get; }
+ ///
+ /// The tenant id associated with the connected cluster. This property will only be provided for a system assigned identity.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"The tenant id associated with the connected cluster. This property will only be provided for a system assigned identity.",
+ SerializedName = @"tenantId",
+ PossibleTypes = new [] { typeof(string) })]
+ string TenantId { get; }
+ ///
+ /// The type of identity used for the connected cluster. The type 'SystemAssigned, includes a system created identity. The
+ /// type 'None' means no identity is assigned to the connected cluster.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info(
+ Required = true,
+ ReadOnly = false,
+ Description = @"The type of identity used for the connected cluster. The type 'SystemAssigned, includes a system created identity. The type 'None' means no identity is assigned to the connected cluster.",
+ SerializedName = @"type",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ResourceIdentityType) })]
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ResourceIdentityType Type { get; set; }
+
+ }
+ /// Identity for the connected cluster.
+ internal partial interface IConnectedClusterIdentityInternal
+
+ {
+ ///
+ /// The principal id of connected cluster identity. This property will only be provided for a system assigned identity.
+ ///
+ string PrincipalId { get; set; }
+ ///
+ /// The tenant id associated with the connected cluster. This property will only be provided for a system assigned identity.
+ ///
+ string TenantId { get; set; }
+ ///
+ /// The type of identity used for the connected cluster. The type 'SystemAssigned, includes a system created identity. The
+ /// type 'None' means no identity is assigned to the connected cluster.
+ ///
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ResourceIdentityType Type { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/ConnectedClusterIdentity.json.cs b/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/ConnectedClusterIdentity.json.cs
new file mode 100644
index 000000000000..9ff0c63a255c
--- /dev/null
+++ b/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/ConnectedClusterIdentity.json.cs
@@ -0,0 +1,111 @@
+namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Extensions;
+
+ /// Identity for the connected cluster.
+ public partial class ConnectedClusterIdentity
+ {
+
+ ///
+ /// 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.ConnectedKubernetes.Runtime.Json.JsonObject json);
+
+ ///
+ /// AfterToJson will be called after the json erialization 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.ConnectedKubernetes.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.ConnectedKubernetes.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.ConnectedKubernetes.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject instance to deserialize from.
+ internal ConnectedClusterIdentity(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject json)
+ {
+ bool returnNow = false;
+ BeforeFromJson(json, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)Type;}
+ {_principalId = If( json?.PropertyT("principalId"), out var __jsonPrincipalId) ? (string)__jsonPrincipalId : (string)PrincipalId;}
+ {_tenantId = If( json?.PropertyT("tenantId"), out var __jsonTenantId) ? (string)__jsonTenantId : (string)TenantId;}
+ AfterFromJson(json);
+ }
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterIdentity.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterIdentity.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterIdentity FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject json ? new ConnectedClusterIdentity(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.ConnectedKubernetes.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject();
+
+ bool returnNow = false;
+ BeforeToJson(ref container, ref returnNow);
+ if (returnNow)
+ {
+ return container;
+ }
+ AddIf( null != (((object)this._type)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonString(this._type.ToString()) : null, "type" ,container.Add );
+ if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode.IncludeReadOnly))
+ {
+ AddIf( null != (((object)this._principalId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonString(this._principalId.ToString()) : null, "principalId" ,container.Add );
+ }
+ if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode.IncludeReadOnly))
+ {
+ AddIf( null != (((object)this._tenantId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonString(this._tenantId.ToString()) : null, "tenantId" ,container.Add );
+ }
+ AfterToJson(ref container);
+ return container;
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/ConnectedClusterList.PowerShell.cs b/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/ConnectedClusterList.PowerShell.cs
new file mode 100644
index 000000000000..5fdaed3bf80a
--- /dev/null
+++ b/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/ConnectedClusterList.PowerShell.cs
@@ -0,0 +1,135 @@
+namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell;
+
+ /// The paginated list of connected Clusters
+ [System.ComponentModel.TypeConverter(typeof(ConnectedClusterListTypeConverter))]
+ public partial class ConnectedClusterList
+ {
+
+ ///
+ /// 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);
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ internal ConnectedClusterList(global::System.Collections.IDictionary content)
+ {
+ bool returnNow = false;
+ BeforeDeserializeDictionary(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterListInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterListInternal)this).NextLink, global::System.Convert.ToString);
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterListInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedCluster[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterListInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.ConnectedClusterTypeConverter.ConvertFrom));
+ AfterDeserializeDictionary(content);
+ }
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ internal ConnectedClusterList(global::System.Management.Automation.PSObject content)
+ {
+ bool returnNow = false;
+ BeforeDeserializePSObject(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterListInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterListInternal)this).NextLink, global::System.Convert.ToString);
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterListInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedCluster[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterListInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.ConnectedClusterTypeConverter.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.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterList DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ {
+ return new ConnectedClusterList(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.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterList DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ {
+ return new ConnectedClusterList(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.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterList FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.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.ConnectedKubernetes.Runtime.SerializationMode.IncludeAll)?.ToString();
+ }
+ /// The paginated list of connected Clusters
+ [System.ComponentModel.TypeConverter(typeof(ConnectedClusterListTypeConverter))]
+ public partial interface IConnectedClusterList
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/ConnectedClusterList.TypeConverter.cs b/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/ConnectedClusterList.TypeConverter.cs
new file mode 100644
index 000000000000..c3a09841265f
--- /dev/null
+++ b/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/ConnectedClusterList.TypeConverter.cs
@@ -0,0 +1,142 @@
+namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell;
+
+ ///
+ /// A PowerShell PSTypeConverter to support converting to an instance of
+ ///
+ public partial class ConnectedClusterListTypeConverter : 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
+ /// parameter.
+ ///
+ /// 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.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.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 to the parameter using and
+ ///
+ /// 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.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterList ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterList).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return ConnectedClusterList.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return ConnectedClusterList.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return ConnectedClusterList.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/ConnectedKubernetes/generated/api/Models/Api202001Preview/ConnectedClusterList.cs b/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/ConnectedClusterList.cs
new file mode 100644
index 000000000000..d5380dcf0f7b
--- /dev/null
+++ b/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/ConnectedClusterList.cs
@@ -0,0 +1,63 @@
+namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Extensions;
+
+ /// The paginated list of connected Clusters
+ public partial class ConnectedClusterList :
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterList,
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterListInternal
+ {
+
+ /// Backing field for property.
+ private string _nextLink;
+
+ /// The link to fetch the next page of connected cluster
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Owned)]
+ public string NextLink { get => this._nextLink; set => this._nextLink = value; }
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedCluster[] _value;
+
+ /// The list of connected clusters
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Owned)]
+ public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedCluster[] Value { get => this._value; set => this._value = value; }
+
+ /// Creates an new instance.
+ public ConnectedClusterList()
+ {
+
+ }
+ }
+ /// The paginated list of connected Clusters
+ public partial interface IConnectedClusterList :
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IJsonSerializable
+ {
+ /// The link to fetch the next page of connected cluster
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"The link to fetch the next page of connected cluster",
+ SerializedName = @"nextLink",
+ PossibleTypes = new [] { typeof(string) })]
+ string NextLink { get; set; }
+ /// The list of connected clusters
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"The list of connected clusters",
+ SerializedName = @"value",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedCluster) })]
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedCluster[] Value { get; set; }
+
+ }
+ /// The paginated list of connected Clusters
+ internal partial interface IConnectedClusterListInternal
+
+ {
+ /// The link to fetch the next page of connected cluster
+ string NextLink { get; set; }
+ /// The list of connected clusters
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedCluster[] Value { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/ConnectedClusterList.json.cs b/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/ConnectedClusterList.json.cs
new file mode 100644
index 000000000000..75d7b1922391
--- /dev/null
+++ b/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/ConnectedClusterList.json.cs
@@ -0,0 +1,111 @@
+namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Extensions;
+
+ /// The paginated list of connected Clusters
+ public partial class ConnectedClusterList
+ {
+
+ ///
+ /// 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.ConnectedKubernetes.Runtime.Json.JsonObject json);
+
+ ///
+ /// AfterToJson will be called after the json erialization 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.ConnectedKubernetes.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.ConnectedKubernetes.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.ConnectedKubernetes.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject instance to deserialize from.
+ internal ConnectedClusterList(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject json)
+ {
+ bool returnNow = false;
+ BeforeFromJson(json, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;}
+ {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.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.ConnectedKubernetes.Models.Api202001Preview.IConnectedCluster) (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.ConnectedCluster.FromJson(__u) )) ))() : null : Value;}
+ AfterFromJson(json);
+ }
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterList.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterList.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterList FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject json ? new ConnectedClusterList(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.ConnectedKubernetes.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject();
+
+ bool returnNow = false;
+ BeforeToJson(ref container, ref returnNow);
+ if (returnNow)
+ {
+ return container;
+ }
+ AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink" ,container.Add );
+ if (null != this._value)
+ {
+ var __w = new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.XNodeArray();
+ foreach( var __x in this._value )
+ {
+ AddIf(__x?.ToJson(null, serializationMode) ,__w.Add);
+ }
+ container.Add("value",__w);
+ }
+ AfterToJson(ref container);
+ return container;
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/ConnectedClusterPatch.PowerShell.cs b/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/ConnectedClusterPatch.PowerShell.cs
new file mode 100644
index 000000000000..62eca5bf63c7
--- /dev/null
+++ b/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/ConnectedClusterPatch.PowerShell.cs
@@ -0,0 +1,137 @@
+namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell;
+
+ /// Object containing updates for patch operations.
+ [System.ComponentModel.TypeConverter(typeof(ConnectedClusterPatchTypeConverter))]
+ public partial class ConnectedClusterPatch
+ {
+
+ ///
+ /// 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);
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ internal ConnectedClusterPatch(global::System.Collections.IDictionary content)
+ {
+ bool returnNow = false;
+ BeforeDeserializeDictionary(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterPatchInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterPatchProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterPatchInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.ConnectedClusterPatchPropertiesTypeConverter.ConvertFrom);
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterPatchInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterPatchTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterPatchInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.ConnectedClusterPatchTagsTypeConverter.ConvertFrom);
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterPatchInternal)this).AgentPublicKeyCertificate = (string) content.GetValueForProperty("AgentPublicKeyCertificate",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterPatchInternal)this).AgentPublicKeyCertificate, 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 ConnectedClusterPatch(global::System.Management.Automation.PSObject content)
+ {
+ bool returnNow = false;
+ BeforeDeserializePSObject(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterPatchInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterPatchProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterPatchInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.ConnectedClusterPatchPropertiesTypeConverter.ConvertFrom);
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterPatchInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterPatchTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterPatchInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.ConnectedClusterPatchTagsTypeConverter.ConvertFrom);
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterPatchInternal)this).AgentPublicKeyCertificate = (string) content.GetValueForProperty("AgentPublicKeyCertificate",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterPatchInternal)this).AgentPublicKeyCertificate, global::System.Convert.ToString);
+ AfterDeserializePSObject(content);
+ }
+
+ ///
+ /// Deserializes a into an instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ ///
+ /// an instance of .
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterPatch DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ {
+ return new ConnectedClusterPatch(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.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterPatch DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ {
+ return new ConnectedClusterPatch(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.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterPatch FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.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.ConnectedKubernetes.Runtime.SerializationMode.IncludeAll)?.ToString();
+ }
+ /// Object containing updates for patch operations.
+ [System.ComponentModel.TypeConverter(typeof(ConnectedClusterPatchTypeConverter))]
+ public partial interface IConnectedClusterPatch
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/ConnectedClusterPatch.TypeConverter.cs b/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/ConnectedClusterPatch.TypeConverter.cs
new file mode 100644
index 000000000000..a8d2d105d558
--- /dev/null
+++ b/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/ConnectedClusterPatch.TypeConverter.cs
@@ -0,0 +1,142 @@
+namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell;
+
+ ///
+ /// A PowerShell PSTypeConverter to support converting to an instance of
+ ///
+ public partial class ConnectedClusterPatchTypeConverter : 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
+ /// parameter.
+ ///
+ /// 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.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.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 to the parameter using and
+ ///
+ /// 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.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterPatch ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterPatch).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return ConnectedClusterPatch.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return ConnectedClusterPatch.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return ConnectedClusterPatch.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/ConnectedKubernetes/generated/api/Models/Api202001Preview/ConnectedClusterPatch.cs b/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/ConnectedClusterPatch.cs
new file mode 100644
index 000000000000..e4c88f75bb9a
--- /dev/null
+++ b/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/ConnectedClusterPatch.cs
@@ -0,0 +1,82 @@
+namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Extensions;
+
+ /// Object containing updates for patch operations.
+ public partial class ConnectedClusterPatch :
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterPatch,
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterPatchInternal
+ {
+
+ ///
+ /// Base64 encoded public certificate used by the agent to do the initial handshake to the backend services in Azure.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Inlined)]
+ public string AgentPublicKeyCertificate { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterPatchPropertiesInternal)Property).AgentPublicKeyCertificate; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterPatchPropertiesInternal)Property).AgentPublicKeyCertificate = value; }
+
+ /// Internal Acessors for Property
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterPatchProperties Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterPatchInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.ConnectedClusterPatchProperties()); set { {_property = value;} } }
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterPatchProperties _property;
+
+ ///
+ /// Describes the connected cluster resource properties that can be updated during PATCH operation.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Owned)]
+ internal Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterPatchProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.ConnectedClusterPatchProperties()); set => this._property = value; }
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterPatchTags _tag;
+
+ /// Resource tags.
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Owned)]
+ public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterPatchTags Tag { get => (this._tag = this._tag ?? new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.ConnectedClusterPatchTags()); set => this._tag = value; }
+
+ /// Creates an new instance.
+ public ConnectedClusterPatch()
+ {
+
+ }
+ }
+ /// Object containing updates for patch operations.
+ public partial interface IConnectedClusterPatch :
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IJsonSerializable
+ {
+ ///
+ /// Base64 encoded public certificate used by the agent to do the initial handshake to the backend services in Azure.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Base64 encoded public certificate used by the agent to do the initial handshake to the backend services in Azure.",
+ SerializedName = @"agentPublicKeyCertificate",
+ PossibleTypes = new [] { typeof(string) })]
+ string AgentPublicKeyCertificate { get; set; }
+ /// Resource tags.
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Resource tags.",
+ SerializedName = @"tags",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterPatchTags) })]
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterPatchTags Tag { get; set; }
+
+ }
+ /// Object containing updates for patch operations.
+ internal partial interface IConnectedClusterPatchInternal
+
+ {
+ ///
+ /// Base64 encoded public certificate used by the agent to do the initial handshake to the backend services in Azure.
+ ///
+ string AgentPublicKeyCertificate { get; set; }
+ ///
+ /// Describes the connected cluster resource properties that can be updated during PATCH operation.
+ ///
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterPatchProperties Property { get; set; }
+ /// Resource tags.
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterPatchTags Tag { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/ConnectedClusterPatch.json.cs b/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/ConnectedClusterPatch.json.cs
new file mode 100644
index 000000000000..32aa034f70f7
--- /dev/null
+++ b/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/ConnectedClusterPatch.json.cs
@@ -0,0 +1,103 @@
+namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Extensions;
+
+ /// Object containing updates for patch operations.
+ public partial class ConnectedClusterPatch
+ {
+
+ ///
+ /// 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.ConnectedKubernetes.Runtime.Json.JsonObject json);
+
+ ///
+ /// AfterToJson will be called after the json erialization 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.ConnectedKubernetes.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.ConnectedKubernetes.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.ConnectedKubernetes.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject instance to deserialize from.
+ internal ConnectedClusterPatch(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject json)
+ {
+ bool returnNow = false;
+ BeforeFromJson(json, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.ConnectedClusterPatchProperties.FromJson(__jsonProperties) : Property;}
+ {_tag = If( json?.PropertyT("tags"), out var __jsonTags) ? Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.ConnectedClusterPatchTags.FromJson(__jsonTags) : Tag;}
+ AfterFromJson(json);
+ }
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterPatch.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterPatch.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterPatch FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject json ? new ConnectedClusterPatch(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.ConnectedKubernetes.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject();
+
+ bool returnNow = false;
+ BeforeToJson(ref container, ref returnNow);
+ if (returnNow)
+ {
+ return container;
+ }
+ AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add );
+ AddIf( null != this._tag ? (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.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/ConnectedKubernetes/generated/api/Models/Api202001Preview/ConnectedClusterPatchProperties.PowerShell.cs b/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/ConnectedClusterPatchProperties.PowerShell.cs
new file mode 100644
index 000000000000..578f14699556
--- /dev/null
+++ b/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/ConnectedClusterPatchProperties.PowerShell.cs
@@ -0,0 +1,131 @@
+namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell;
+
+ [System.ComponentModel.TypeConverter(typeof(ConnectedClusterPatchPropertiesTypeConverter))]
+ public partial class ConnectedClusterPatchProperties
+ {
+
+ ///
+ /// 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);
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ internal ConnectedClusterPatchProperties(global::System.Collections.IDictionary content)
+ {
+ bool returnNow = false;
+ BeforeDeserializeDictionary(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterPatchPropertiesInternal)this).AgentPublicKeyCertificate = (string) content.GetValueForProperty("AgentPublicKeyCertificate",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterPatchPropertiesInternal)this).AgentPublicKeyCertificate, 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 ConnectedClusterPatchProperties(global::System.Management.Automation.PSObject content)
+ {
+ bool returnNow = false;
+ BeforeDeserializePSObject(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterPatchPropertiesInternal)this).AgentPublicKeyCertificate = (string) content.GetValueForProperty("AgentPublicKeyCertificate",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterPatchPropertiesInternal)this).AgentPublicKeyCertificate, global::System.Convert.ToString);
+ AfterDeserializePSObject(content);
+ }
+
+ ///
+ /// Deserializes a into an instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ ///
+ /// an instance of .
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterPatchProperties DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ {
+ return new ConnectedClusterPatchProperties(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.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterPatchProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ {
+ return new ConnectedClusterPatchProperties(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.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterPatchProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.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.ConnectedKubernetes.Runtime.SerializationMode.IncludeAll)?.ToString();
+ }
+ [System.ComponentModel.TypeConverter(typeof(ConnectedClusterPatchPropertiesTypeConverter))]
+ public partial interface IConnectedClusterPatchProperties
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/ConnectedClusterPatchProperties.TypeConverter.cs b/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/ConnectedClusterPatchProperties.TypeConverter.cs
new file mode 100644
index 000000000000..1316a8d3d49b
--- /dev/null
+++ b/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/ConnectedClusterPatchProperties.TypeConverter.cs
@@ -0,0 +1,142 @@
+namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell;
+
+ ///
+ /// A PowerShell PSTypeConverter to support converting to an instance of
+ ///
+ public partial class ConnectedClusterPatchPropertiesTypeConverter : 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
+ /// parameter.
+ ///
+ /// 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.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.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 to the parameter using and
+ ///
+ /// 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.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterPatchProperties ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterPatchProperties).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return ConnectedClusterPatchProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return ConnectedClusterPatchProperties.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return ConnectedClusterPatchProperties.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/ConnectedKubernetes/generated/api/Models/Api202001Preview/ConnectedClusterPatchProperties.cs b/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/ConnectedClusterPatchProperties.cs
new file mode 100644
index 000000000000..dfd1f840201d
--- /dev/null
+++ b/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/ConnectedClusterPatchProperties.cs
@@ -0,0 +1,49 @@
+namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Extensions;
+
+ public partial class ConnectedClusterPatchProperties :
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterPatchProperties,
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterPatchPropertiesInternal
+ {
+
+ /// Backing field for property.
+ private string _agentPublicKeyCertificate;
+
+ ///
+ /// Base64 encoded public certificate used by the agent to do the initial handshake to the backend services in Azure.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Owned)]
+ public string AgentPublicKeyCertificate { get => this._agentPublicKeyCertificate; set => this._agentPublicKeyCertificate = value; }
+
+ /// Creates an new instance.
+ public ConnectedClusterPatchProperties()
+ {
+
+ }
+ }
+ public partial interface IConnectedClusterPatchProperties :
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IJsonSerializable
+ {
+ ///
+ /// Base64 encoded public certificate used by the agent to do the initial handshake to the backend services in Azure.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Base64 encoded public certificate used by the agent to do the initial handshake to the backend services in Azure.",
+ SerializedName = @"agentPublicKeyCertificate",
+ PossibleTypes = new [] { typeof(string) })]
+ string AgentPublicKeyCertificate { get; set; }
+
+ }
+ internal partial interface IConnectedClusterPatchPropertiesInternal
+
+ {
+ ///
+ /// Base64 encoded public certificate used by the agent to do the initial handshake to the backend services in Azure.
+ ///
+ string AgentPublicKeyCertificate { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/ConnectedClusterPatchProperties.json.cs b/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/ConnectedClusterPatchProperties.json.cs
new file mode 100644
index 000000000000..9833389c7649
--- /dev/null
+++ b/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/ConnectedClusterPatchProperties.json.cs
@@ -0,0 +1,100 @@
+namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Extensions;
+
+ public partial class ConnectedClusterPatchProperties
+ {
+
+ ///
+ /// 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.ConnectedKubernetes.Runtime.Json.JsonObject json);
+
+ ///
+ /// AfterToJson will be called after the json erialization 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.ConnectedKubernetes.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.ConnectedKubernetes.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.ConnectedKubernetes.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject instance to deserialize from.
+ internal ConnectedClusterPatchProperties(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject json)
+ {
+ bool returnNow = false;
+ BeforeFromJson(json, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ {_agentPublicKeyCertificate = If( json?.PropertyT("agentPublicKeyCertificate"), out var __jsonAgentPublicKeyCertificate) ? (string)__jsonAgentPublicKeyCertificate : (string)AgentPublicKeyCertificate;}
+ AfterFromJson(json);
+ }
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterPatchProperties.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterPatchProperties.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterPatchProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject json ? new ConnectedClusterPatchProperties(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.ConnectedKubernetes.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject();
+
+ bool returnNow = false;
+ BeforeToJson(ref container, ref returnNow);
+ if (returnNow)
+ {
+ return container;
+ }
+ AddIf( null != (((object)this._agentPublicKeyCertificate)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonString(this._agentPublicKeyCertificate.ToString()) : null, "agentPublicKeyCertificate" ,container.Add );
+ AfterToJson(ref container);
+ return container;
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/ConnectedClusterPatchTags.PowerShell.cs b/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/ConnectedClusterPatchTags.PowerShell.cs
new file mode 100644
index 000000000000..3ffb3066a7a5
--- /dev/null
+++ b/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/ConnectedClusterPatchTags.PowerShell.cs
@@ -0,0 +1,135 @@
+namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell;
+
+ /// Resource tags.
+ [System.ComponentModel.TypeConverter(typeof(ConnectedClusterPatchTagsTypeConverter))]
+ public partial class ConnectedClusterPatchTags
+ {
+
+ ///
+ /// 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);
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ internal ConnectedClusterPatchTags(global::System.Collections.IDictionary content)
+ {
+ bool returnNow = false;
+ BeforeDeserializeDictionary(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ // this type is a dictionary; copy elements from source to here.
+ CopyFrom(content);
+ AfterDeserializeDictionary(content);
+ }
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ internal ConnectedClusterPatchTags(global::System.Management.Automation.PSObject content)
+ {
+ bool returnNow = false;
+ BeforeDeserializePSObject(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ // this type is a dictionary; copy elements from source to here.
+ CopyFrom(content);
+ AfterDeserializePSObject(content);
+ }
+
+ ///
+ /// 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.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterPatchTags DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ {
+ return new ConnectedClusterPatchTags(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.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterPatchTags DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ {
+ return new ConnectedClusterPatchTags(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.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterPatchTags FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.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.ConnectedKubernetes.Runtime.SerializationMode.IncludeAll)?.ToString();
+ }
+ /// Resource tags.
+ [System.ComponentModel.TypeConverter(typeof(ConnectedClusterPatchTagsTypeConverter))]
+ public partial interface IConnectedClusterPatchTags
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/ConnectedClusterPatchTags.TypeConverter.cs b/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/ConnectedClusterPatchTags.TypeConverter.cs
new file mode 100644
index 000000000000..0ea40e82f2b3
--- /dev/null
+++ b/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/ConnectedClusterPatchTags.TypeConverter.cs
@@ -0,0 +1,142 @@
+namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell;
+
+ ///
+ /// A PowerShell PSTypeConverter to support converting to an instance of
+ ///
+ public partial class ConnectedClusterPatchTagsTypeConverter : 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
+ /// parameter.
+ ///
+ /// 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.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.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 to the parameter using and
+ ///
+ /// 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.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterPatchTags ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterPatchTags).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return ConnectedClusterPatchTags.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return ConnectedClusterPatchTags.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return ConnectedClusterPatchTags.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/ConnectedKubernetes/generated/api/Models/Api202001Preview/ConnectedClusterPatchTags.cs b/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/ConnectedClusterPatchTags.cs
new file mode 100644
index 000000000000..1b7ea6eb8f22
--- /dev/null
+++ b/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/ConnectedClusterPatchTags.cs
@@ -0,0 +1,30 @@
+namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Extensions;
+
+ /// Resource tags.
+ public partial class ConnectedClusterPatchTags :
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterPatchTags,
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterPatchTagsInternal
+ {
+
+ /// Creates an new instance.
+ public ConnectedClusterPatchTags()
+ {
+
+ }
+ }
+ /// Resource tags.
+ public partial interface IConnectedClusterPatchTags :
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IJsonSerializable,
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IAssociativeArray
+ {
+
+ }
+ /// Resource tags.
+ internal partial interface IConnectedClusterPatchTagsInternal
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/ConnectedClusterPatchTags.dictionary.cs b/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/ConnectedClusterPatchTags.dictionary.cs
new file mode 100644
index 000000000000..76c7d202ac97
--- /dev/null
+++ b/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/ConnectedClusterPatchTags.dictionary.cs
@@ -0,0 +1,70 @@
+namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Extensions;
+
+ public partial class ConnectedClusterPatchTags :
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IAssociativeArray
+ {
+ protected global::System.Collections.Generic.Dictionary __additionalProperties = new global::System.Collections.Generic.Dictionary();
+
+ global::System.Collections.Generic.IDictionary Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IAssociativeArray.AdditionalProperties { get => __additionalProperties; }
+
+ int Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IAssociativeArray.Count { get => __additionalProperties.Count; }
+
+ global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IAssociativeArray.Keys { get => __additionalProperties.Keys; }
+
+ global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IAssociativeArray.Values { get => __additionalProperties.Values; }
+
+ public string this[global::System.String index] { get => __additionalProperties[index]; set => __additionalProperties[index] = value; }
+
+ ///
+ ///
+ public void Add(global::System.String key, string value) => __additionalProperties.Add( key, value);
+
+ public void Clear() => __additionalProperties.Clear();
+
+ ///
+ public bool ContainsKey(global::System.String key) => __additionalProperties.ContainsKey( key);
+
+ ///
+ public void CopyFrom(global::System.Collections.IDictionary source)
+ {
+ if (null != source)
+ {
+ foreach( var property in Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell.TypeConverterExtensions.GetFilteredProperties(source, new global::System.Collections.Generic.HashSet() { } ) )
+ {
+ if ((null != property.Key && null != property.Value))
+ {
+ this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value));
+ }
+ }
+ }
+ }
+
+ ///
+ public void CopyFrom(global::System.Management.Automation.PSObject source)
+ {
+ if (null != source)
+ {
+ foreach( var property in Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell.TypeConverterExtensions.GetFilteredProperties(source, new global::System.Collections.Generic.HashSet() { } ) )
+ {
+ if ((null != property.Key && null != property.Value))
+ {
+ this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value));
+ }
+ }
+ }
+ }
+
+ ///
+ public bool Remove(global::System.String key) => __additionalProperties.Remove( key);
+
+ ///
+ ///
+ public bool TryGetValue(global::System.String key, out string value) => __additionalProperties.TryGetValue( key, out value);
+
+ ///
+
+ public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.ConnectedClusterPatchTags source) => source.__additionalProperties;
+ }
+}
\ No newline at end of file
diff --git a/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/ConnectedClusterPatchTags.json.cs b/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/ConnectedClusterPatchTags.json.cs
new file mode 100644
index 000000000000..5ec51cc42669
--- /dev/null
+++ b/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/ConnectedClusterPatchTags.json.cs
@@ -0,0 +1,102 @@
+namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Extensions;
+
+ /// Resource tags.
+ public partial class ConnectedClusterPatchTags
+ {
+
+ ///
+ /// 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.ConnectedKubernetes.Runtime.Json.JsonObject json);
+
+ ///
+ /// AfterToJson will be called after the json erialization 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.ConnectedKubernetes.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.ConnectedKubernetes.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.ConnectedKubernetes.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject instance to deserialize from.
+ ///
+ internal ConnectedClusterPatchTags(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject json, global::System.Collections.Generic.HashSet exclusions = null)
+ {
+ bool returnNow = false;
+ BeforeFromJson(json, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.JsonSerializable.FromJson( json, ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IAssociativeArray)this).AdditionalProperties, null ,exclusions );
+ AfterFromJson(json);
+ }
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterPatchTags.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterPatchTags.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterPatchTags FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject json ? new ConnectedClusterPatchTags(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.ConnectedKubernetes.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject();
+
+ bool returnNow = false;
+ BeforeToJson(ref container, ref returnNow);
+ if (returnNow)
+ {
+ return container;
+ }
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.JsonSerializable.ToJson( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IAssociativeArray)this).AdditionalProperties, container);
+ AfterToJson(ref container);
+ return container;
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/ConnectedClusterProperties.PowerShell.cs b/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/ConnectedClusterProperties.PowerShell.cs
new file mode 100644
index 000000000000..e70de58b03b4
--- /dev/null
+++ b/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/ConnectedClusterProperties.PowerShell.cs
@@ -0,0 +1,147 @@
+namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell;
+
+ [System.ComponentModel.TypeConverter(typeof(ConnectedClusterPropertiesTypeConverter))]
+ public partial class ConnectedClusterProperties
+ {
+
+ ///
+ /// 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);
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ internal ConnectedClusterProperties(global::System.Collections.IDictionary content)
+ {
+ bool returnNow = false;
+ BeforeDeserializeDictionary(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterPropertiesInternal)this).AadProfile = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterAadProfile) content.GetValueForProperty("AadProfile",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterPropertiesInternal)this).AadProfile, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.ConnectedClusterAadProfileTypeConverter.ConvertFrom);
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterPropertiesInternal)this).AgentPublicKeyCertificate = (string) content.GetValueForProperty("AgentPublicKeyCertificate",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterPropertiesInternal)this).AgentPublicKeyCertificate, global::System.Convert.ToString);
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterPropertiesInternal)this).AgentVersion = (string) content.GetValueForProperty("AgentVersion",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterPropertiesInternal)this).AgentVersion, global::System.Convert.ToString);
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterPropertiesInternal)this).KubernetesVersion = (string) content.GetValueForProperty("KubernetesVersion",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterPropertiesInternal)this).KubernetesVersion, global::System.Convert.ToString);
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterPropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterPropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ProvisioningState.CreateFrom);
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterPropertiesInternal)this).TotalNodeCount = (int?) content.GetValueForProperty("TotalNodeCount",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterPropertiesInternal)this).TotalNodeCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int)));
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterPropertiesInternal)this).AadProfileClientAppId = (string) content.GetValueForProperty("AadProfileClientAppId",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterPropertiesInternal)this).AadProfileClientAppId, global::System.Convert.ToString);
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterPropertiesInternal)this).AadProfileServerAppId = (string) content.GetValueForProperty("AadProfileServerAppId",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterPropertiesInternal)this).AadProfileServerAppId, global::System.Convert.ToString);
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterPropertiesInternal)this).AadProfileTenantId = (string) content.GetValueForProperty("AadProfileTenantId",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterPropertiesInternal)this).AadProfileTenantId, 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 ConnectedClusterProperties(global::System.Management.Automation.PSObject content)
+ {
+ bool returnNow = false;
+ BeforeDeserializePSObject(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterPropertiesInternal)this).AadProfile = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterAadProfile) content.GetValueForProperty("AadProfile",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterPropertiesInternal)this).AadProfile, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.ConnectedClusterAadProfileTypeConverter.ConvertFrom);
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterPropertiesInternal)this).AgentPublicKeyCertificate = (string) content.GetValueForProperty("AgentPublicKeyCertificate",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterPropertiesInternal)this).AgentPublicKeyCertificate, global::System.Convert.ToString);
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterPropertiesInternal)this).AgentVersion = (string) content.GetValueForProperty("AgentVersion",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterPropertiesInternal)this).AgentVersion, global::System.Convert.ToString);
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterPropertiesInternal)this).KubernetesVersion = (string) content.GetValueForProperty("KubernetesVersion",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterPropertiesInternal)this).KubernetesVersion, global::System.Convert.ToString);
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterPropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterPropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ProvisioningState.CreateFrom);
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterPropertiesInternal)this).TotalNodeCount = (int?) content.GetValueForProperty("TotalNodeCount",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterPropertiesInternal)this).TotalNodeCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int)));
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterPropertiesInternal)this).AadProfileClientAppId = (string) content.GetValueForProperty("AadProfileClientAppId",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterPropertiesInternal)this).AadProfileClientAppId, global::System.Convert.ToString);
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterPropertiesInternal)this).AadProfileServerAppId = (string) content.GetValueForProperty("AadProfileServerAppId",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterPropertiesInternal)this).AadProfileServerAppId, global::System.Convert.ToString);
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterPropertiesInternal)this).AadProfileTenantId = (string) content.GetValueForProperty("AadProfileTenantId",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterPropertiesInternal)this).AadProfileTenantId, global::System.Convert.ToString);
+ AfterDeserializePSObject(content);
+ }
+
+ ///
+ /// Deserializes a into an instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ ///
+ /// an instance of .
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterProperties DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ {
+ return new ConnectedClusterProperties(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.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ {
+ return new ConnectedClusterProperties(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.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.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.ConnectedKubernetes.Runtime.SerializationMode.IncludeAll)?.ToString();
+ }
+ [System.ComponentModel.TypeConverter(typeof(ConnectedClusterPropertiesTypeConverter))]
+ public partial interface IConnectedClusterProperties
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/ConnectedClusterProperties.TypeConverter.cs b/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/ConnectedClusterProperties.TypeConverter.cs
new file mode 100644
index 000000000000..615486231841
--- /dev/null
+++ b/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/ConnectedClusterProperties.TypeConverter.cs
@@ -0,0 +1,142 @@
+namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell;
+
+ ///
+ /// A PowerShell PSTypeConverter to support converting to an instance of
+ ///
+ public partial class ConnectedClusterPropertiesTypeConverter : 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
+ /// parameter.
+ ///
+ /// 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.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.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 to the parameter using and
+ ///
+ /// 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.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterProperties ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterProperties).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return ConnectedClusterProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return ConnectedClusterProperties.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return ConnectedClusterProperties.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/ConnectedKubernetes/generated/api/Models/Api202001Preview/ConnectedClusterProperties.cs b/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/ConnectedClusterProperties.cs
new file mode 100644
index 000000000000..643dea4fda92
--- /dev/null
+++ b/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/ConnectedClusterProperties.cs
@@ -0,0 +1,178 @@
+namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Extensions;
+
+ public partial class ConnectedClusterProperties :
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterProperties,
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterPropertiesInternal
+ {
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterAadProfile _aadProfile;
+
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Owned)]
+ internal Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterAadProfile AadProfile { get => (this._aadProfile = this._aadProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.ConnectedClusterAadProfile()); set => this._aadProfile = value; }
+
+ /// The client app id configured on target K8 cluster
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Inlined)]
+ public string AadProfileClientAppId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterAadProfileInternal)AadProfile).ClientAppId; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterAadProfileInternal)AadProfile).ClientAppId = value; }
+
+ /// The server app id to access AD server
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Inlined)]
+ public string AadProfileServerAppId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterAadProfileInternal)AadProfile).ServerAppId; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterAadProfileInternal)AadProfile).ServerAppId = value; }
+
+ /// The aad tenant id which is configured on target K8s cluster
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Inlined)]
+ public string AadProfileTenantId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterAadProfileInternal)AadProfile).TenantId; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterAadProfileInternal)AadProfile).TenantId = value; }
+
+ /// Backing field for property.
+ private string _agentPublicKeyCertificate;
+
+ ///
+ /// Base64 encoded public certificate used by the agent to do the initial handshake to the backend services in Azure.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Owned)]
+ public string AgentPublicKeyCertificate { get => this._agentPublicKeyCertificate; set => this._agentPublicKeyCertificate = value; }
+
+ /// Backing field for property.
+ private string _agentVersion;
+
+ /// Version of the agent running on the connected cluster resource
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Owned)]
+ public string AgentVersion { get => this._agentVersion; }
+
+ /// Backing field for property.
+ private string _kubernetesVersion;
+
+ /// The Kubernetes version of the connected cluster resource
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Owned)]
+ public string KubernetesVersion { get => this._kubernetesVersion; }
+
+ /// Internal Acessors for AadProfile
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterAadProfile Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterPropertiesInternal.AadProfile { get => (this._aadProfile = this._aadProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.ConnectedClusterAadProfile()); set { {_aadProfile = value;} } }
+
+ /// Internal Acessors for AgentVersion
+ string Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterPropertiesInternal.AgentVersion { get => this._agentVersion; set { {_agentVersion = value;} } }
+
+ /// Internal Acessors for KubernetesVersion
+ string Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterPropertiesInternal.KubernetesVersion { get => this._kubernetesVersion; set { {_kubernetesVersion = value;} } }
+
+ /// Internal Acessors for TotalNodeCount
+ int? Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterPropertiesInternal.TotalNodeCount { get => this._totalNodeCount; set { {_totalNodeCount = value;} } }
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ProvisioningState? _provisioningState;
+
+ /// The current deployment state of connectedClusters.
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Owned)]
+ public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ProvisioningState? ProvisioningState { get => this._provisioningState; set => this._provisioningState = value; }
+
+ /// Backing field for property.
+ private int? _totalNodeCount;
+
+ /// Number of nodes present in the connected cluster resource
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Owned)]
+ public int? TotalNodeCount { get => this._totalNodeCount; }
+
+ /// Creates an new instance.
+ public ConnectedClusterProperties()
+ {
+
+ }
+ }
+ public partial interface IConnectedClusterProperties :
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IJsonSerializable
+ {
+ /// The client app id configured on target K8 cluster
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"The client app id configured on target K8 cluster ",
+ SerializedName = @"clientAppId",
+ PossibleTypes = new [] { typeof(string) })]
+ string AadProfileClientAppId { get; set; }
+ /// The server app id to access AD server
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"The server app id to access AD server",
+ SerializedName = @"serverAppId",
+ PossibleTypes = new [] { typeof(string) })]
+ string AadProfileServerAppId { get; set; }
+ /// The aad tenant id which is configured on target K8s cluster
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"The aad tenant id which is configured on target K8s cluster",
+ SerializedName = @"tenantId",
+ PossibleTypes = new [] { typeof(string) })]
+ string AadProfileTenantId { get; set; }
+ ///
+ /// Base64 encoded public certificate used by the agent to do the initial handshake to the backend services in Azure.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info(
+ Required = true,
+ ReadOnly = false,
+ Description = @"Base64 encoded public certificate used by the agent to do the initial handshake to the backend services in Azure.",
+ SerializedName = @"agentPublicKeyCertificate",
+ PossibleTypes = new [] { typeof(string) })]
+ string AgentPublicKeyCertificate { get; set; }
+ /// Version of the agent running on the connected cluster resource
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"Version of the agent running on the connected cluster resource",
+ SerializedName = @"agentVersion",
+ PossibleTypes = new [] { typeof(string) })]
+ string AgentVersion { get; }
+ /// The Kubernetes version of the connected cluster resource
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"The Kubernetes version of the connected cluster resource",
+ SerializedName = @"kubernetesVersion",
+ PossibleTypes = new [] { typeof(string) })]
+ string KubernetesVersion { get; }
+ /// The current deployment state of connectedClusters.
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"The current deployment state of connectedClusters.",
+ SerializedName = @"provisioningState",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ProvisioningState) })]
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ProvisioningState? ProvisioningState { get; set; }
+ /// Number of nodes present in the connected cluster resource
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"Number of nodes present in the connected cluster resource",
+ SerializedName = @"totalNodeCount",
+ PossibleTypes = new [] { typeof(int) })]
+ int? TotalNodeCount { get; }
+
+ }
+ internal partial interface IConnectedClusterPropertiesInternal
+
+ {
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterAadProfile AadProfile { get; set; }
+ /// The client app id configured on target K8 cluster
+ string AadProfileClientAppId { get; set; }
+ /// The server app id to access AD server
+ string AadProfileServerAppId { get; set; }
+ /// The aad tenant id which is configured on target K8s cluster
+ string AadProfileTenantId { get; set; }
+ ///
+ /// Base64 encoded public certificate used by the agent to do the initial handshake to the backend services in Azure.
+ ///
+ string AgentPublicKeyCertificate { get; set; }
+ /// Version of the agent running on the connected cluster resource
+ string AgentVersion { get; set; }
+ /// The Kubernetes version of the connected cluster resource
+ string KubernetesVersion { get; set; }
+ /// The current deployment state of connectedClusters.
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ProvisioningState? ProvisioningState { get; set; }
+ /// Number of nodes present in the connected cluster resource
+ int? TotalNodeCount { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/ConnectedClusterProperties.json.cs b/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/ConnectedClusterProperties.json.cs
new file mode 100644
index 000000000000..b0079cc0a516
--- /dev/null
+++ b/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/ConnectedClusterProperties.json.cs
@@ -0,0 +1,119 @@
+namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Extensions;
+
+ public partial class ConnectedClusterProperties
+ {
+
+ ///
+ /// 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.ConnectedKubernetes.Runtime.Json.JsonObject json);
+
+ ///
+ /// AfterToJson will be called after the json erialization 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.ConnectedKubernetes.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.ConnectedKubernetes.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.ConnectedKubernetes.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject instance to deserialize from.
+ internal ConnectedClusterProperties(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject json)
+ {
+ bool returnNow = false;
+ BeforeFromJson(json, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ {_aadProfile = If( json?.PropertyT("aadProfile"), out var __jsonAadProfile) ? Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.ConnectedClusterAadProfile.FromJson(__jsonAadProfile) : AadProfile;}
+ {_agentPublicKeyCertificate = If( json?.PropertyT("agentPublicKeyCertificate"), out var __jsonAgentPublicKeyCertificate) ? (string)__jsonAgentPublicKeyCertificate : (string)AgentPublicKeyCertificate;}
+ {_agentVersion = If( json?.PropertyT("agentVersion"), out var __jsonAgentVersion) ? (string)__jsonAgentVersion : (string)AgentVersion;}
+ {_kubernetesVersion = If( json?.PropertyT("kubernetesVersion"), out var __jsonKubernetesVersion) ? (string)__jsonKubernetesVersion : (string)KubernetesVersion;}
+ {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)ProvisioningState;}
+ {_totalNodeCount = If( json?.PropertyT("totalNodeCount"), out var __jsonTotalNodeCount) ? (int?)__jsonTotalNodeCount : TotalNodeCount;}
+ AfterFromJson(json);
+ }
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterProperties.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterProperties.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedClusterProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject json ? new ConnectedClusterProperties(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.ConnectedKubernetes.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject();
+
+ bool returnNow = false;
+ BeforeToJson(ref container, ref returnNow);
+ if (returnNow)
+ {
+ return container;
+ }
+ AddIf( null != this._aadProfile ? (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode) this._aadProfile.ToJson(null,serializationMode) : null, "aadProfile" ,container.Add );
+ AddIf( null != (((object)this._agentPublicKeyCertificate)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonString(this._agentPublicKeyCertificate.ToString()) : null, "agentPublicKeyCertificate" ,container.Add );
+ if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode.IncludeReadOnly))
+ {
+ AddIf( null != (((object)this._agentVersion)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonString(this._agentVersion.ToString()) : null, "agentVersion" ,container.Add );
+ }
+ if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode.IncludeReadOnly))
+ {
+ AddIf( null != (((object)this._kubernetesVersion)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonString(this._kubernetesVersion.ToString()) : null, "kubernetesVersion" ,container.Add );
+ }
+ AddIf( null != (((object)this._provisioningState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonString(this._provisioningState.ToString()) : null, "provisioningState" ,container.Add );
+ if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode.IncludeReadOnly))
+ {
+ AddIf( null != this._totalNodeCount ? (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNumber((int)this._totalNodeCount) : null, "totalNodeCount" ,container.Add );
+ }
+ AfterToJson(ref container);
+ return container;
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/CredentialResult.PowerShell.cs b/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/CredentialResult.PowerShell.cs
new file mode 100644
index 000000000000..39a0d6a4efb5
--- /dev/null
+++ b/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/CredentialResult.PowerShell.cs
@@ -0,0 +1,135 @@
+namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell;
+
+ /// The credential result response.
+ [System.ComponentModel.TypeConverter(typeof(CredentialResultTypeConverter))]
+ public partial class CredentialResult
+ {
+
+ ///
+ /// 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);
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ internal CredentialResult(global::System.Collections.IDictionary content)
+ {
+ bool returnNow = false;
+ BeforeDeserializeDictionary(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.ICredentialResultInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.ICredentialResultInternal)this).Name, global::System.Convert.ToString);
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.ICredentialResultInternal)this).Value = (byte[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.ICredentialResultInternal)this).Value, i => i);
+ AfterDeserializeDictionary(content);
+ }
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ internal CredentialResult(global::System.Management.Automation.PSObject content)
+ {
+ bool returnNow = false;
+ BeforeDeserializePSObject(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.ICredentialResultInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.ICredentialResultInternal)this).Name, global::System.Convert.ToString);
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.ICredentialResultInternal)this).Value = (byte[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.ICredentialResultInternal)this).Value, i => i);
+ 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.ConnectedKubernetes.Models.Api202001Preview.ICredentialResult DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ {
+ return new CredentialResult(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.ConnectedKubernetes.Models.Api202001Preview.ICredentialResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ {
+ return new CredentialResult(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.ConnectedKubernetes.Models.Api202001Preview.ICredentialResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.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.ConnectedKubernetes.Runtime.SerializationMode.IncludeAll)?.ToString();
+ }
+ /// The credential result response.
+ [System.ComponentModel.TypeConverter(typeof(CredentialResultTypeConverter))]
+ public partial interface ICredentialResult
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/CredentialResult.TypeConverter.cs b/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/CredentialResult.TypeConverter.cs
new file mode 100644
index 000000000000..f72d09a47fbe
--- /dev/null
+++ b/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/CredentialResult.TypeConverter.cs
@@ -0,0 +1,142 @@
+namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell;
+
+ ///
+ /// A PowerShell PSTypeConverter to support converting to an instance of
+ ///
+ public partial class CredentialResultTypeConverter : 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
+ /// parameter.
+ ///
+ /// 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.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.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 to the parameter using and
+ ///
+ /// 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.ConnectedKubernetes.Models.Api202001Preview.ICredentialResult ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.ICredentialResult).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return CredentialResult.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return CredentialResult.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return CredentialResult.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/ConnectedKubernetes/generated/api/Models/Api202001Preview/CredentialResult.cs b/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/CredentialResult.cs
new file mode 100644
index 000000000000..a4d6e4739194
--- /dev/null
+++ b/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/CredentialResult.cs
@@ -0,0 +1,69 @@
+namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Extensions;
+
+ /// The credential result response.
+ public partial class CredentialResult :
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.ICredentialResult,
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.ICredentialResultInternal
+ {
+
+ /// Internal Acessors for Name
+ string Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.ICredentialResultInternal.Name { get => this._name; set { {_name = value;} } }
+
+ /// Internal Acessors for Value
+ byte[] Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.ICredentialResultInternal.Value { get => this._value; set { {_value = value;} } }
+
+ /// Backing field for property.
+ private string _name;
+
+ /// The name of the credential.
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Owned)]
+ public string Name { get => this._name; }
+
+ /// Backing field for property.
+ private byte[] _value;
+
+ /// Base64-encoded Kubernetes configuration file.
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Owned)]
+ public byte[] Value { get => this._value; }
+
+ /// Creates an new instance.
+ public CredentialResult()
+ {
+
+ }
+ }
+ /// The credential result response.
+ public partial interface ICredentialResult :
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IJsonSerializable
+ {
+ /// The name of the credential.
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"The name of the credential.",
+ SerializedName = @"name",
+ PossibleTypes = new [] { typeof(string) })]
+ string Name { get; }
+ /// Base64-encoded Kubernetes configuration file.
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"Base64-encoded Kubernetes configuration file.",
+ SerializedName = @"value",
+ PossibleTypes = new [] { typeof(byte[]) })]
+ byte[] Value { get; }
+
+ }
+ /// The credential result response.
+ internal partial interface ICredentialResultInternal
+
+ {
+ /// The name of the credential.
+ string Name { get; set; }
+ /// Base64-encoded Kubernetes configuration file.
+ byte[] Value { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/CredentialResult.json.cs b/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/CredentialResult.json.cs
new file mode 100644
index 000000000000..6ae44a836dbf
--- /dev/null
+++ b/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/CredentialResult.json.cs
@@ -0,0 +1,109 @@
+namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Extensions;
+
+ /// The credential result response.
+ public partial class CredentialResult
+ {
+
+ ///
+ /// 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.ConnectedKubernetes.Runtime.Json.JsonObject json);
+
+ ///
+ /// AfterToJson will be called after the json erialization 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.ConnectedKubernetes.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.ConnectedKubernetes.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.ConnectedKubernetes.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject instance to deserialize from.
+ internal CredentialResult(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject json)
+ {
+ bool returnNow = false;
+ BeforeFromJson(json, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;}
+ {_value = If( json?.PropertyT("value"), out var __w) ? System.Convert.FromBase64String( ((string)__w).Replace("_","/").Replace("-","+").PadRight( ((string)__w).Length + ((string)__w).Length * 3 % 4, '=') ) : null;}
+ AfterFromJson(json);
+ }
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.ICredentialResult.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.ICredentialResult.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.ICredentialResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject json ? new CredentialResult(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.ConnectedKubernetes.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject();
+
+ bool returnNow = false;
+ BeforeToJson(ref container, ref returnNow);
+ if (returnNow)
+ {
+ return container;
+ }
+ if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode.IncludeReadOnly))
+ {
+ AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add );
+ }
+ if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode.IncludeReadOnly))
+ {
+ AddIf( null != this._value ? global::System.Convert.ToBase64String( this._value) : null ,(v)=> container.Add( "value",v) );
+ }
+ AfterToJson(ref container);
+ return container;
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/CredentialResults.PowerShell.cs b/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/CredentialResults.PowerShell.cs
new file mode 100644
index 000000000000..5f64c9f9da00
--- /dev/null
+++ b/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/CredentialResults.PowerShell.cs
@@ -0,0 +1,133 @@
+namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell;
+
+ /// The list of credential result response.
+ [System.ComponentModel.TypeConverter(typeof(CredentialResultsTypeConverter))]
+ public partial class CredentialResults
+ {
+
+ ///
+ /// 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);
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ internal CredentialResults(global::System.Collections.IDictionary content)
+ {
+ bool returnNow = false;
+ BeforeDeserializeDictionary(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.ICredentialResultsInternal)this).Kubeconfig = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.ICredentialResult[]) content.GetValueForProperty("Kubeconfig",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.ICredentialResultsInternal)this).Kubeconfig, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.CredentialResultTypeConverter.ConvertFrom));
+ AfterDeserializeDictionary(content);
+ }
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ internal CredentialResults(global::System.Management.Automation.PSObject content)
+ {
+ bool returnNow = false;
+ BeforeDeserializePSObject(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.ICredentialResultsInternal)this).Kubeconfig = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.ICredentialResult[]) content.GetValueForProperty("Kubeconfig",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.ICredentialResultsInternal)this).Kubeconfig, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.CredentialResultTypeConverter.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.ConnectedKubernetes.Models.Api202001Preview.ICredentialResults DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ {
+ return new CredentialResults(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.ConnectedKubernetes.Models.Api202001Preview.ICredentialResults DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ {
+ return new CredentialResults(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.ConnectedKubernetes.Models.Api202001Preview.ICredentialResults FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.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.ConnectedKubernetes.Runtime.SerializationMode.IncludeAll)?.ToString();
+ }
+ /// The list of credential result response.
+ [System.ComponentModel.TypeConverter(typeof(CredentialResultsTypeConverter))]
+ public partial interface ICredentialResults
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/CredentialResults.TypeConverter.cs b/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/CredentialResults.TypeConverter.cs
new file mode 100644
index 000000000000..28b8348267ef
--- /dev/null
+++ b/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/CredentialResults.TypeConverter.cs
@@ -0,0 +1,142 @@
+namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell;
+
+ ///
+ /// A PowerShell PSTypeConverter to support converting to an instance of
+ ///
+ public partial class CredentialResultsTypeConverter : 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
+ /// parameter.
+ ///
+ /// 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.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.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 to the parameter using and
+ ///
+ /// 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.ConnectedKubernetes.Models.Api202001Preview.ICredentialResults ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.ICredentialResults).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return CredentialResults.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return CredentialResults.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return CredentialResults.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/ConnectedKubernetes/generated/api/Models/Api202001Preview/CredentialResults.cs b/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/CredentialResults.cs
new file mode 100644
index 000000000000..26b25adefec3
--- /dev/null
+++ b/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/CredentialResults.cs
@@ -0,0 +1,49 @@
+namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Extensions;
+
+ /// The list of credential result response.
+ public partial class CredentialResults :
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.ICredentialResults,
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.ICredentialResultsInternal
+ {
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.ICredentialResult[] _kubeconfig;
+
+ /// Base64-encoded Kubernetes configuration file.
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Owned)]
+ public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.ICredentialResult[] Kubeconfig { get => this._kubeconfig; }
+
+ /// Internal Acessors for Kubeconfig
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.ICredentialResult[] Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.ICredentialResultsInternal.Kubeconfig { get => this._kubeconfig; set { {_kubeconfig = value;} } }
+
+ /// Creates an new instance.
+ public CredentialResults()
+ {
+
+ }
+ }
+ /// The list of credential result response.
+ public partial interface ICredentialResults :
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IJsonSerializable
+ {
+ /// Base64-encoded Kubernetes configuration file.
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"Base64-encoded Kubernetes configuration file.",
+ SerializedName = @"kubeconfigs",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.ICredentialResult) })]
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.ICredentialResult[] Kubeconfig { get; }
+
+ }
+ /// The list of credential result response.
+ internal partial interface ICredentialResultsInternal
+
+ {
+ /// Base64-encoded Kubernetes configuration file.
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.ICredentialResult[] Kubeconfig { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/CredentialResults.json.cs b/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/CredentialResults.json.cs
new file mode 100644
index 000000000000..4fab27f08b03
--- /dev/null
+++ b/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/CredentialResults.json.cs
@@ -0,0 +1,112 @@
+namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Extensions;
+
+ /// The list of credential result response.
+ public partial class CredentialResults
+ {
+
+ ///
+ /// 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.ConnectedKubernetes.Runtime.Json.JsonObject json);
+
+ ///
+ /// AfterToJson will be called after the json erialization 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.ConnectedKubernetes.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.ConnectedKubernetes.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.ConnectedKubernetes.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject instance to deserialize from.
+ internal CredentialResults(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject json)
+ {
+ bool returnNow = false;
+ BeforeFromJson(json, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ {_kubeconfig = If( json?.PropertyT("kubeconfigs"), out var __jsonKubeconfigs) ? If( __jsonKubeconfigs as Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.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.ConnectedKubernetes.Models.Api202001Preview.ICredentialResult) (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.CredentialResult.FromJson(__u) )) ))() : null : Kubeconfig;}
+ AfterFromJson(json);
+ }
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.ICredentialResults.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.ICredentialResults.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.ICredentialResults FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject json ? new CredentialResults(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.ConnectedKubernetes.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject();
+
+ bool returnNow = false;
+ BeforeToJson(ref container, ref returnNow);
+ if (returnNow)
+ {
+ return container;
+ }
+ if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode.IncludeReadOnly))
+ {
+ if (null != this._kubeconfig)
+ {
+ var __w = new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.XNodeArray();
+ foreach( var __x in this._kubeconfig )
+ {
+ AddIf(__x?.ToJson(null, serializationMode) ,__w.Add);
+ }
+ container.Add("kubeconfigs",__w);
+ }
+ }
+ AfterToJson(ref container);
+ return container;
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/ErrorDetails.PowerShell.cs b/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/ErrorDetails.PowerShell.cs
new file mode 100644
index 000000000000..356b38f0d2ae
--- /dev/null
+++ b/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/ErrorDetails.PowerShell.cs
@@ -0,0 +1,135 @@
+namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell;
+
+ /// The error response details containing error code and error message
+ [System.ComponentModel.TypeConverter(typeof(ErrorDetailsTypeConverter))]
+ public partial class ErrorDetails
+ {
+
+ ///
+ /// 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);
+
+ ///
+ /// 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.ConnectedKubernetes.Models.Api202001Preview.IErrorDetails DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ {
+ return new ErrorDetails(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.ConnectedKubernetes.Models.Api202001Preview.IErrorDetails DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ {
+ return new ErrorDetails(content);
+ }
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ internal ErrorDetails(global::System.Collections.IDictionary content)
+ {
+ bool returnNow = false;
+ BeforeDeserializeDictionary(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IErrorDetailsInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IErrorDetailsInternal)this).Code, global::System.Convert.ToString);
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IErrorDetailsInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IErrorDetailsInternal)this).Message, 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 ErrorDetails(global::System.Management.Automation.PSObject content)
+ {
+ bool returnNow = false;
+ BeforeDeserializePSObject(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IErrorDetailsInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IErrorDetailsInternal)this).Code, global::System.Convert.ToString);
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IErrorDetailsInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IErrorDetailsInternal)this).Message, 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.ConnectedKubernetes.Models.Api202001Preview.IErrorDetails FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.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.ConnectedKubernetes.Runtime.SerializationMode.IncludeAll)?.ToString();
+ }
+ /// The error response details containing error code and error message
+ [System.ComponentModel.TypeConverter(typeof(ErrorDetailsTypeConverter))]
+ public partial interface IErrorDetails
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/ErrorDetails.TypeConverter.cs b/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/ErrorDetails.TypeConverter.cs
new file mode 100644
index 000000000000..a7811e31ad3f
--- /dev/null
+++ b/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/ErrorDetails.TypeConverter.cs
@@ -0,0 +1,142 @@
+namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell;
+
+ ///
+ /// A PowerShell PSTypeConverter to support converting to an instance of
+ ///
+ public partial class ErrorDetailsTypeConverter : 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
+ /// parameter.
+ ///
+ /// 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.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.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 to the parameter using and
+ ///
+ /// 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.ConnectedKubernetes.Models.Api202001Preview.IErrorDetails ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IErrorDetails).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return ErrorDetails.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return ErrorDetails.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return ErrorDetails.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/ConnectedKubernetes/generated/api/Models/Api202001Preview/ErrorDetails.cs b/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/ErrorDetails.cs
new file mode 100644
index 000000000000..9dc3f79c9db2
--- /dev/null
+++ b/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/ErrorDetails.cs
@@ -0,0 +1,69 @@
+namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Extensions;
+
+ /// The error response details containing error code and error message
+ public partial class ErrorDetails :
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IErrorDetails,
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IErrorDetailsInternal
+ {
+
+ /// Backing field for property.
+ private string _code;
+
+ /// The error code.
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Owned)]
+ public string Code { get => this._code; }
+
+ /// Backing field for property.
+ private string _message;
+
+ /// The error message.
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Owned)]
+ public string Message { get => this._message; }
+
+ /// Internal Acessors for Code
+ string Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IErrorDetailsInternal.Code { get => this._code; set { {_code = value;} } }
+
+ /// Internal Acessors for Message
+ string Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IErrorDetailsInternal.Message { get => this._message; set { {_message = value;} } }
+
+ /// Creates an new instance.
+ public ErrorDetails()
+ {
+
+ }
+ }
+ /// The error response details containing error code and error message
+ public partial interface IErrorDetails :
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IJsonSerializable
+ {
+ /// The error code.
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"The error code.",
+ SerializedName = @"code",
+ PossibleTypes = new [] { typeof(string) })]
+ string Code { get; }
+ /// The error message.
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"The error message.",
+ SerializedName = @"message",
+ PossibleTypes = new [] { typeof(string) })]
+ string Message { get; }
+
+ }
+ /// The error response details containing error code and error message
+ internal partial interface IErrorDetailsInternal
+
+ {
+ /// The error code.
+ string Code { get; set; }
+ /// The error message.
+ string Message { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/ErrorDetails.json.cs b/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/ErrorDetails.json.cs
new file mode 100644
index 000000000000..1229ccc67fb2
--- /dev/null
+++ b/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/ErrorDetails.json.cs
@@ -0,0 +1,109 @@
+namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Extensions;
+
+ /// The error response details containing error code and error message
+ public partial class ErrorDetails
+ {
+
+ ///
+ /// 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.ConnectedKubernetes.Runtime.Json.JsonObject json);
+
+ ///
+ /// AfterToJson will be called after the json erialization 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.ConnectedKubernetes.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.ConnectedKubernetes.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.ConnectedKubernetes.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject instance to deserialize from.
+ internal ErrorDetails(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.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;}
+ AfterFromJson(json);
+ }
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IErrorDetails.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IErrorDetails.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IErrorDetails FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject json ? new ErrorDetails(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.ConnectedKubernetes.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject();
+
+ bool returnNow = false;
+ BeforeToJson(ref container, ref returnNow);
+ if (returnNow)
+ {
+ return container;
+ }
+ if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode.IncludeReadOnly))
+ {
+ AddIf( null != (((object)this._code)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonString(this._code.ToString()) : null, "code" ,container.Add );
+ }
+ if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode.IncludeReadOnly))
+ {
+ AddIf( null != (((object)this._message)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonString(this._message.ToString()) : null, "message" ,container.Add );
+ }
+ AfterToJson(ref container);
+ return container;
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/ErrorResponse.PowerShell.cs b/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/ErrorResponse.PowerShell.cs
new file mode 100644
index 000000000000..9a144e92f461
--- /dev/null
+++ b/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/ErrorResponse.PowerShell.cs
@@ -0,0 +1,137 @@
+namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell;
+
+ /// The error response that indicates why an operation has failed.
+ [System.ComponentModel.TypeConverter(typeof(ErrorResponseTypeConverter))]
+ public partial class ErrorResponse
+ {
+
+ ///
+ /// 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);
+
+ ///
+ /// 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.ConnectedKubernetes.Models.Api202001Preview.IErrorResponse DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ {
+ return new ErrorResponse(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.ConnectedKubernetes.Models.Api202001Preview.IErrorResponse DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ {
+ return new ErrorResponse(content);
+ }
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ internal ErrorResponse(global::System.Collections.IDictionary content)
+ {
+ bool returnNow = false;
+ BeforeDeserializeDictionary(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IErrorResponseInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IErrorDetails) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IErrorResponseInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.ErrorDetailsTypeConverter.ConvertFrom);
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IErrorResponseInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IErrorResponseInternal)this).Code, global::System.Convert.ToString);
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IErrorResponseInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IErrorResponseInternal)this).Message, 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 ErrorResponse(global::System.Management.Automation.PSObject content)
+ {
+ bool returnNow = false;
+ BeforeDeserializePSObject(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IErrorResponseInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IErrorDetails) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IErrorResponseInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.ErrorDetailsTypeConverter.ConvertFrom);
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IErrorResponseInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IErrorResponseInternal)this).Code, global::System.Convert.ToString);
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IErrorResponseInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IErrorResponseInternal)this).Message, 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.ConnectedKubernetes.Models.Api202001Preview.IErrorResponse FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.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.ConnectedKubernetes.Runtime.SerializationMode.IncludeAll)?.ToString();
+ }
+ /// The error response that indicates why an operation has failed.
+ [System.ComponentModel.TypeConverter(typeof(ErrorResponseTypeConverter))]
+ public partial interface IErrorResponse
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/ErrorResponse.TypeConverter.cs b/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/ErrorResponse.TypeConverter.cs
new file mode 100644
index 000000000000..43596acd295a
--- /dev/null
+++ b/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/ErrorResponse.TypeConverter.cs
@@ -0,0 +1,142 @@
+namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell;
+
+ ///
+ /// A PowerShell PSTypeConverter to support converting to an instance of
+ ///
+ public partial class ErrorResponseTypeConverter : 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
+ /// parameter.
+ ///
+ /// 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.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.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 to the parameter using and
+ ///
+ /// 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.ConnectedKubernetes.Models.Api202001Preview.IErrorResponse ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IErrorResponse).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return ErrorResponse.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return ErrorResponse.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return ErrorResponse.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/ConnectedKubernetes/generated/api/Models/Api202001Preview/ErrorResponse.cs b/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/ErrorResponse.cs
new file mode 100644
index 000000000000..780f7eddede7
--- /dev/null
+++ b/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/ErrorResponse.cs
@@ -0,0 +1,75 @@
+namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Extensions;
+
+ /// The error response that indicates why an operation has failed.
+ public partial class ErrorResponse :
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IErrorResponse,
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IErrorResponseInternal
+ {
+
+ /// The error code.
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Inlined)]
+ public string Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IErrorDetailsInternal)Error).Code; }
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IErrorDetails _error;
+
+ /// The error response details containing error code and error message
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Owned)]
+ internal Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IErrorDetails Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.ErrorDetails()); set => this._error = value; }
+
+ /// The error message.
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Inlined)]
+ public string Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IErrorDetailsInternal)Error).Message; }
+
+ /// Internal Acessors for Code
+ string Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IErrorResponseInternal.Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IErrorDetailsInternal)Error).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IErrorDetailsInternal)Error).Code = value; }
+
+ /// Internal Acessors for Error
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IErrorDetails Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IErrorResponseInternal.Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.ErrorDetails()); set { {_error = value;} } }
+
+ /// Internal Acessors for Message
+ string Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IErrorResponseInternal.Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IErrorDetailsInternal)Error).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IErrorDetailsInternal)Error).Message = value; }
+
+ /// Creates an new instance.
+ public ErrorResponse()
+ {
+
+ }
+ }
+ /// The error response that indicates why an operation has failed.
+ public partial interface IErrorResponse :
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IJsonSerializable
+ {
+ /// The error code.
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"The error code.",
+ SerializedName = @"code",
+ PossibleTypes = new [] { typeof(string) })]
+ string Code { get; }
+ /// The error message.
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"The error message.",
+ SerializedName = @"message",
+ PossibleTypes = new [] { typeof(string) })]
+ string Message { get; }
+
+ }
+ /// The error response that indicates why an operation has failed.
+ internal partial interface IErrorResponseInternal
+
+ {
+ /// The error code.
+ string Code { get; set; }
+ /// The error response details containing error code and error message
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IErrorDetails Error { get; set; }
+ /// The error message.
+ string Message { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/ErrorResponse.json.cs b/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/ErrorResponse.json.cs
new file mode 100644
index 000000000000..389b94163065
--- /dev/null
+++ b/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/ErrorResponse.json.cs
@@ -0,0 +1,101 @@
+namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Extensions;
+
+ /// The error response that indicates why an operation has failed.
+ public partial class ErrorResponse
+ {
+
+ ///
+ /// 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.ConnectedKubernetes.Runtime.Json.JsonObject json);
+
+ ///
+ /// AfterToJson will be called after the json erialization 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.ConnectedKubernetes.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.ConnectedKubernetes.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.ConnectedKubernetes.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject instance to deserialize from.
+ internal ErrorResponse(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.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.ConnectedKubernetes.Models.Api202001Preview.ErrorDetails.FromJson(__jsonError) : Error;}
+ AfterFromJson(json);
+ }
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IErrorResponse.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IErrorResponse.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IErrorResponse FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject json ? new ErrorResponse(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.ConnectedKubernetes.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject();
+
+ bool returnNow = false;
+ BeforeToJson(ref container, ref returnNow);
+ if (returnNow)
+ {
+ return container;
+ }
+ AddIf( null != this._error ? (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.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/ConnectedKubernetes/generated/api/Models/Api202001Preview/Operation.PowerShell.cs b/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/Operation.PowerShell.cs
new file mode 100644
index 000000000000..618ce5bbed61
--- /dev/null
+++ b/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/Operation.PowerShell.cs
@@ -0,0 +1,141 @@
+namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell;
+
+ /// The Connected cluster API operation
+ [System.ComponentModel.TypeConverter(typeof(OperationTypeConverter))]
+ public partial class Operation
+ {
+
+ ///
+ /// 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);
+
+ ///
+ /// 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.ConnectedKubernetes.Models.Api202001Preview.IOperation DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ {
+ return new Operation(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.ConnectedKubernetes.Models.Api202001Preview.IOperation DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ {
+ return new Operation(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.ConnectedKubernetes.Models.Api202001Preview.IOperation FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(jsonText));
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ internal Operation(global::System.Collections.IDictionary content)
+ {
+ bool returnNow = false;
+ BeforeDeserializeDictionary(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IOperationInternal)this).Display = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IOperationDisplay) content.GetValueForProperty("Display",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IOperationInternal)this).Display, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.OperationDisplayTypeConverter.ConvertFrom);
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IOperationInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IOperationInternal)this).Name, global::System.Convert.ToString);
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IOperationInternal)this).DisplayDescription = (string) content.GetValueForProperty("DisplayDescription",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IOperationInternal)this).DisplayDescription, global::System.Convert.ToString);
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IOperationInternal)this).DisplayOperation = (string) content.GetValueForProperty("DisplayOperation",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IOperationInternal)this).DisplayOperation, global::System.Convert.ToString);
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IOperationInternal)this).DisplayProvider = (string) content.GetValueForProperty("DisplayProvider",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IOperationInternal)this).DisplayProvider, global::System.Convert.ToString);
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IOperationInternal)this).DisplayResource = (string) content.GetValueForProperty("DisplayResource",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IOperationInternal)this).DisplayResource, 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 Operation(global::System.Management.Automation.PSObject content)
+ {
+ bool returnNow = false;
+ BeforeDeserializePSObject(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IOperationInternal)this).Display = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IOperationDisplay) content.GetValueForProperty("Display",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IOperationInternal)this).Display, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.OperationDisplayTypeConverter.ConvertFrom);
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IOperationInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IOperationInternal)this).Name, global::System.Convert.ToString);
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IOperationInternal)this).DisplayDescription = (string) content.GetValueForProperty("DisplayDescription",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IOperationInternal)this).DisplayDescription, global::System.Convert.ToString);
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IOperationInternal)this).DisplayOperation = (string) content.GetValueForProperty("DisplayOperation",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IOperationInternal)this).DisplayOperation, global::System.Convert.ToString);
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IOperationInternal)this).DisplayProvider = (string) content.GetValueForProperty("DisplayProvider",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IOperationInternal)this).DisplayProvider, global::System.Convert.ToString);
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IOperationInternal)this).DisplayResource = (string) content.GetValueForProperty("DisplayResource",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IOperationInternal)this).DisplayResource, 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.ConnectedKubernetes.Runtime.SerializationMode.IncludeAll)?.ToString();
+ }
+ /// The Connected cluster API operation
+ [System.ComponentModel.TypeConverter(typeof(OperationTypeConverter))]
+ public partial interface IOperation
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/Operation.TypeConverter.cs b/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/Operation.TypeConverter.cs
new file mode 100644
index 000000000000..ca6900d4a649
--- /dev/null
+++ b/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/Operation.TypeConverter.cs
@@ -0,0 +1,142 @@
+namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell;
+
+ ///
+ /// A PowerShell PSTypeConverter to support converting to an instance of
+ ///
+ public partial class OperationTypeConverter : 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
+ /// parameter.
+ ///
+ /// 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.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.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 to the parameter using and
+ ///
+ /// 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.ConnectedKubernetes.Models.Api202001Preview.IOperation ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IOperation).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return Operation.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return Operation.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return Operation.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/ConnectedKubernetes/generated/api/Models/Api202001Preview/Operation.cs b/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/Operation.cs
new file mode 100644
index 000000000000..6b703a5c1431
--- /dev/null
+++ b/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/Operation.cs
@@ -0,0 +1,117 @@
+namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Extensions;
+
+ /// The Connected cluster API operation
+ public partial class Operation :
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IOperation,
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IOperationInternal
+ {
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IOperationDisplay _display;
+
+ /// The object that represents the operation.
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Owned)]
+ internal Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IOperationDisplay Display { get => (this._display = this._display ?? new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.OperationDisplay()); }
+
+ /// Description of the operation.
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Inlined)]
+ public string DisplayDescription { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IOperationDisplayInternal)Display).Description; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IOperationDisplayInternal)Display).Description = value; }
+
+ /// Operation type: Read, write, delete, etc.
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Inlined)]
+ public string DisplayOperation { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IOperationDisplayInternal)Display).Operation; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IOperationDisplayInternal)Display).Operation = value; }
+
+ /// Service provider: Microsoft.connectedClusters
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Inlined)]
+ public string DisplayProvider { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IOperationDisplayInternal)Display).Provider; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IOperationDisplayInternal)Display).Provider = value; }
+
+ /// Connected Cluster Resource on which the operation is performed
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Inlined)]
+ public string DisplayResource { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IOperationDisplayInternal)Display).Resource; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IOperationDisplayInternal)Display).Resource = value; }
+
+ /// Internal Acessors for Display
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IOperationDisplay Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IOperationInternal.Display { get => (this._display = this._display ?? new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.OperationDisplay()); set { {_display = value;} } }
+
+ /// Internal Acessors for Name
+ string Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IOperationInternal.Name { get => this._name; set { {_name = value;} } }
+
+ /// Backing field for property.
+ private string _name;
+
+ /// Operation name: {Microsoft.Kubernetes}/{resource}/{operation}
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Owned)]
+ public string Name { get => this._name; }
+
+ /// Creates an new instance.
+ public Operation()
+ {
+
+ }
+ }
+ /// The Connected cluster API operation
+ public partial interface IOperation :
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IJsonSerializable
+ {
+ /// Description of the operation.
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Description of the operation.",
+ SerializedName = @"description",
+ PossibleTypes = new [] { typeof(string) })]
+ string DisplayDescription { get; set; }
+ /// Operation type: Read, write, delete, etc.
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Operation type: Read, write, delete, etc.",
+ SerializedName = @"operation",
+ PossibleTypes = new [] { typeof(string) })]
+ string DisplayOperation { get; set; }
+ /// Service provider: Microsoft.connectedClusters
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Service provider: Microsoft.connectedClusters",
+ SerializedName = @"provider",
+ PossibleTypes = new [] { typeof(string) })]
+ string DisplayProvider { get; set; }
+ /// Connected Cluster Resource on which the operation is performed
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Connected Cluster Resource on which the operation is performed",
+ SerializedName = @"resource",
+ PossibleTypes = new [] { typeof(string) })]
+ string DisplayResource { get; set; }
+ /// Operation name: {Microsoft.Kubernetes}/{resource}/{operation}
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"Operation name: {Microsoft.Kubernetes}/{resource}/{operation}",
+ SerializedName = @"name",
+ PossibleTypes = new [] { typeof(string) })]
+ string Name { get; }
+
+ }
+ /// The Connected cluster API operation
+ internal partial interface IOperationInternal
+
+ {
+ /// The object that represents the operation.
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IOperationDisplay Display { get; set; }
+ /// Description of the operation.
+ string DisplayDescription { get; set; }
+ /// Operation type: Read, write, delete, etc.
+ string DisplayOperation { get; set; }
+ /// Service provider: Microsoft.connectedClusters
+ string DisplayProvider { get; set; }
+ /// Connected Cluster Resource on which the operation is performed
+ string DisplayResource { get; set; }
+ /// Operation name: {Microsoft.Kubernetes}/{resource}/{operation}
+ string Name { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/Operation.json.cs b/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/Operation.json.cs
new file mode 100644
index 000000000000..039bcc605bf3
--- /dev/null
+++ b/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/Operation.json.cs
@@ -0,0 +1,109 @@
+namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Extensions;
+
+ /// The Connected cluster API operation
+ public partial class Operation
+ {
+
+ ///
+ /// 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.ConnectedKubernetes.Runtime.Json.JsonObject json);
+
+ ///
+ /// AfterToJson will be called after the json erialization 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.ConnectedKubernetes.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.ConnectedKubernetes.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.ConnectedKubernetes.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IOperation.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IOperation.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IOperation FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject json ? new Operation(json) : null;
+ }
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject instance to deserialize from.
+ internal Operation(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject json)
+ {
+ bool returnNow = false;
+ BeforeFromJson(json, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ {_display = If( json?.PropertyT("display"), out var __jsonDisplay) ? Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.OperationDisplay.FromJson(__jsonDisplay) : Display;}
+ {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;}
+ 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.ConnectedKubernetes.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject();
+
+ bool returnNow = false;
+ BeforeToJson(ref container, ref returnNow);
+ if (returnNow)
+ {
+ return container;
+ }
+ if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode.IncludeReadOnly))
+ {
+ AddIf( null != this._display ? (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode) this._display.ToJson(null,serializationMode) : null, "display" ,container.Add );
+ }
+ if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode.IncludeReadOnly))
+ {
+ AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add );
+ }
+ AfterToJson(ref container);
+ return container;
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/OperationDisplay.PowerShell.cs b/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/OperationDisplay.PowerShell.cs
new file mode 100644
index 000000000000..51a65879601b
--- /dev/null
+++ b/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/OperationDisplay.PowerShell.cs
@@ -0,0 +1,139 @@
+namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell;
+
+ /// The object that represents the operation.
+ [System.ComponentModel.TypeConverter(typeof(OperationDisplayTypeConverter))]
+ public partial class OperationDisplay
+ {
+
+ ///
+ /// 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);
+
+ ///
+ /// 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.ConnectedKubernetes.Models.Api202001Preview.IOperationDisplay DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ {
+ return new OperationDisplay(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.ConnectedKubernetes.Models.Api202001Preview.IOperationDisplay DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ {
+ return new OperationDisplay(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.ConnectedKubernetes.Models.Api202001Preview.IOperationDisplay FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(jsonText));
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ internal OperationDisplay(global::System.Collections.IDictionary content)
+ {
+ bool returnNow = false;
+ BeforeDeserializeDictionary(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IOperationDisplayInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IOperationDisplayInternal)this).Description, global::System.Convert.ToString);
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IOperationDisplayInternal)this).Operation = (string) content.GetValueForProperty("Operation",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IOperationDisplayInternal)this).Operation, global::System.Convert.ToString);
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IOperationDisplayInternal)this).Provider = (string) content.GetValueForProperty("Provider",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IOperationDisplayInternal)this).Provider, global::System.Convert.ToString);
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IOperationDisplayInternal)this).Resource = (string) content.GetValueForProperty("Resource",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IOperationDisplayInternal)this).Resource, 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 OperationDisplay(global::System.Management.Automation.PSObject content)
+ {
+ bool returnNow = false;
+ BeforeDeserializePSObject(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IOperationDisplayInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IOperationDisplayInternal)this).Description, global::System.Convert.ToString);
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IOperationDisplayInternal)this).Operation = (string) content.GetValueForProperty("Operation",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IOperationDisplayInternal)this).Operation, global::System.Convert.ToString);
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IOperationDisplayInternal)this).Provider = (string) content.GetValueForProperty("Provider",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IOperationDisplayInternal)this).Provider, global::System.Convert.ToString);
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IOperationDisplayInternal)this).Resource = (string) content.GetValueForProperty("Resource",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IOperationDisplayInternal)this).Resource, 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.ConnectedKubernetes.Runtime.SerializationMode.IncludeAll)?.ToString();
+ }
+ /// The object that represents the operation.
+ [System.ComponentModel.TypeConverter(typeof(OperationDisplayTypeConverter))]
+ public partial interface IOperationDisplay
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/OperationDisplay.TypeConverter.cs b/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/OperationDisplay.TypeConverter.cs
new file mode 100644
index 000000000000..a9923ddc491f
--- /dev/null
+++ b/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/OperationDisplay.TypeConverter.cs
@@ -0,0 +1,142 @@
+namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell;
+
+ ///
+ /// A PowerShell PSTypeConverter to support converting to an instance of
+ ///
+ public partial class OperationDisplayTypeConverter : 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
+ /// parameter.
+ ///
+ /// 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.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.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 to the parameter using and
+ ///
+ /// 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.ConnectedKubernetes.Models.Api202001Preview.IOperationDisplay ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IOperationDisplay).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return OperationDisplay.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return OperationDisplay.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return OperationDisplay.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/ConnectedKubernetes/generated/api/Models/Api202001Preview/OperationDisplay.cs b/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/OperationDisplay.cs
new file mode 100644
index 000000000000..659d7f86bd32
--- /dev/null
+++ b/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/OperationDisplay.cs
@@ -0,0 +1,97 @@
+namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Extensions;
+
+ /// The object that represents the operation.
+ public partial class OperationDisplay :
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IOperationDisplay,
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IOperationDisplayInternal
+ {
+
+ /// Backing field for property.
+ private string _description;
+
+ /// Description of the operation.
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Owned)]
+ public string Description { get => this._description; set => this._description = value; }
+
+ /// Backing field for property.
+ private string _operation;
+
+ /// Operation type: Read, write, delete, etc.
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Owned)]
+ public string Operation { get => this._operation; set => this._operation = value; }
+
+ /// Backing field for property.
+ private string _provider;
+
+ /// Service provider: Microsoft.connectedClusters
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Owned)]
+ public string Provider { get => this._provider; set => this._provider = value; }
+
+ /// Backing field for property.
+ private string _resource;
+
+ /// Connected Cluster Resource on which the operation is performed
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Owned)]
+ public string Resource { get => this._resource; set => this._resource = value; }
+
+ /// Creates an new instance.
+ public OperationDisplay()
+ {
+
+ }
+ }
+ /// The object that represents the operation.
+ public partial interface IOperationDisplay :
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IJsonSerializable
+ {
+ /// Description of the operation.
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Description of the operation.",
+ SerializedName = @"description",
+ PossibleTypes = new [] { typeof(string) })]
+ string Description { get; set; }
+ /// Operation type: Read, write, delete, etc.
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Operation type: Read, write, delete, etc.",
+ SerializedName = @"operation",
+ PossibleTypes = new [] { typeof(string) })]
+ string Operation { get; set; }
+ /// Service provider: Microsoft.connectedClusters
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Service provider: Microsoft.connectedClusters",
+ SerializedName = @"provider",
+ PossibleTypes = new [] { typeof(string) })]
+ string Provider { get; set; }
+ /// Connected Cluster Resource on which the operation is performed
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Connected Cluster Resource on which the operation is performed",
+ SerializedName = @"resource",
+ PossibleTypes = new [] { typeof(string) })]
+ string Resource { get; set; }
+
+ }
+ /// The object that represents the operation.
+ internal partial interface IOperationDisplayInternal
+
+ {
+ /// Description of the operation.
+ string Description { get; set; }
+ /// Operation type: Read, write, delete, etc.
+ string Operation { get; set; }
+ /// Service provider: Microsoft.connectedClusters
+ string Provider { get; set; }
+ /// Connected Cluster Resource on which the operation is performed
+ string Resource { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/OperationDisplay.json.cs b/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/OperationDisplay.json.cs
new file mode 100644
index 000000000000..6e9610cca541
--- /dev/null
+++ b/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/OperationDisplay.json.cs
@@ -0,0 +1,107 @@
+namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Extensions;
+
+ /// The object that represents the operation.
+ public partial class OperationDisplay
+ {
+
+ ///
+ /// 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.ConnectedKubernetes.Runtime.Json.JsonObject json);
+
+ ///
+ /// AfterToJson will be called after the json erialization 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.ConnectedKubernetes.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.ConnectedKubernetes.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.ConnectedKubernetes.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IOperationDisplay.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IOperationDisplay.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IOperationDisplay FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject json ? new OperationDisplay(json) : null;
+ }
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject instance to deserialize from.
+ internal OperationDisplay(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject json)
+ {
+ bool returnNow = false;
+ BeforeFromJson(json, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ {_description = If( json?.PropertyT("description"), out var __jsonDescription) ? (string)__jsonDescription : (string)Description;}
+ {_operation = If( json?.PropertyT("operation"), out var __jsonOperation) ? (string)__jsonOperation : (string)Operation;}
+ {_provider = If( json?.PropertyT("provider"), out var __jsonProvider) ? (string)__jsonProvider : (string)Provider;}
+ {_resource = If( json?.PropertyT("resource"), out var __jsonResource) ? (string)__jsonResource : (string)Resource;}
+ 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.ConnectedKubernetes.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject();
+
+ bool returnNow = false;
+ BeforeToJson(ref container, ref returnNow);
+ if (returnNow)
+ {
+ return container;
+ }
+ AddIf( null != (((object)this._description)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonString(this._description.ToString()) : null, "description" ,container.Add );
+ AddIf( null != (((object)this._operation)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonString(this._operation.ToString()) : null, "operation" ,container.Add );
+ AddIf( null != (((object)this._provider)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonString(this._provider.ToString()) : null, "provider" ,container.Add );
+ AddIf( null != (((object)this._resource)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonString(this._resource.ToString()) : null, "resource" ,container.Add );
+ AfterToJson(ref container);
+ return container;
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/OperationList.PowerShell.cs b/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/OperationList.PowerShell.cs
new file mode 100644
index 000000000000..31cdcec40876
--- /dev/null
+++ b/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/OperationList.PowerShell.cs
@@ -0,0 +1,135 @@
+namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell;
+
+ /// The paginated list of connected cluster API operations.
+ [System.ComponentModel.TypeConverter(typeof(OperationListTypeConverter))]
+ public partial class OperationList
+ {
+
+ ///
+ /// 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);
+
+ ///
+ /// 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.ConnectedKubernetes.Models.Api202001Preview.IOperationList DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ {
+ return new OperationList(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.ConnectedKubernetes.Models.Api202001Preview.IOperationList DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ {
+ return new OperationList(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.ConnectedKubernetes.Models.Api202001Preview.IOperationList FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(jsonText));
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ internal OperationList(global::System.Collections.IDictionary content)
+ {
+ bool returnNow = false;
+ BeforeDeserializeDictionary(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IOperationListInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IOperationListInternal)this).NextLink, global::System.Convert.ToString);
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IOperationListInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IOperation[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IOperationListInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.OperationTypeConverter.ConvertFrom));
+ AfterDeserializeDictionary(content);
+ }
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ internal OperationList(global::System.Management.Automation.PSObject content)
+ {
+ bool returnNow = false;
+ BeforeDeserializePSObject(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IOperationListInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IOperationListInternal)this).NextLink, global::System.Convert.ToString);
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IOperationListInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IOperation[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IOperationListInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.OperationTypeConverter.ConvertFrom));
+ AfterDeserializePSObject(content);
+ }
+
+ /// Serializes this instance to a json string.
+
+ /// a containing this model serialized to JSON text.
+ public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode.IncludeAll)?.ToString();
+ }
+ /// The paginated list of connected cluster API operations.
+ [System.ComponentModel.TypeConverter(typeof(OperationListTypeConverter))]
+ public partial interface IOperationList
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/OperationList.TypeConverter.cs b/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/OperationList.TypeConverter.cs
new file mode 100644
index 000000000000..3f73b663d0e9
--- /dev/null
+++ b/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/OperationList.TypeConverter.cs
@@ -0,0 +1,142 @@
+namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell;
+
+ ///
+ /// A PowerShell PSTypeConverter to support converting to an instance of
+ ///
+ public partial class OperationListTypeConverter : 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
+ /// parameter.
+ ///
+ /// 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.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.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 to the parameter using and
+ ///
+ /// 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.ConnectedKubernetes.Models.Api202001Preview.IOperationList ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IOperationList).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return OperationList.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return OperationList.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return OperationList.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/ConnectedKubernetes/generated/api/Models/Api202001Preview/OperationList.cs b/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/OperationList.cs
new file mode 100644
index 000000000000..2a70d17cb039
--- /dev/null
+++ b/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/OperationList.cs
@@ -0,0 +1,66 @@
+namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Extensions;
+
+ /// The paginated list of connected cluster API operations.
+ public partial class OperationList :
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IOperationList,
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IOperationListInternal
+ {
+
+ /// Internal Acessors for Value
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IOperation[] Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IOperationListInternal.Value { get => this._value; set { {_value = value;} } }
+
+ /// Backing field for property.
+ private string _nextLink;
+
+ /// The link to fetch the next page of connected cluster API operations.
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Owned)]
+ public string NextLink { get => this._nextLink; set => this._nextLink = value; }
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IOperation[] _value;
+
+ /// The list of connected cluster API operations.
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Owned)]
+ public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IOperation[] Value { get => this._value; }
+
+ /// Creates an new instance.
+ public OperationList()
+ {
+
+ }
+ }
+ /// The paginated list of connected cluster API operations.
+ public partial interface IOperationList :
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IJsonSerializable
+ {
+ /// The link to fetch the next page of connected cluster API operations.
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"The link to fetch the next page of connected cluster API operations.",
+ SerializedName = @"nextLink",
+ PossibleTypes = new [] { typeof(string) })]
+ string NextLink { get; set; }
+ /// The list of connected cluster API operations.
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"The list of connected cluster API operations.",
+ SerializedName = @"value",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IOperation) })]
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IOperation[] Value { get; }
+
+ }
+ /// The paginated list of connected cluster API operations.
+ internal partial interface IOperationListInternal
+
+ {
+ /// The link to fetch the next page of connected cluster API operations.
+ string NextLink { get; set; }
+ /// The list of connected cluster API operations.
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IOperation[] Value { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/OperationList.json.cs b/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/OperationList.json.cs
new file mode 100644
index 000000000000..978774c2fd7e
--- /dev/null
+++ b/src/ConnectedKubernetes/generated/api/Models/Api202001Preview/OperationList.json.cs
@@ -0,0 +1,114 @@
+namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Extensions;
+
+ /// The paginated list of connected cluster API operations.
+ public partial class OperationList
+ {
+
+ ///
+ /// 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.ConnectedKubernetes.Runtime.Json.JsonObject json);
+
+ ///
+ /// AfterToJson will be called after the json erialization 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.ConnectedKubernetes.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.ConnectedKubernetes.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.ConnectedKubernetes.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IOperationList.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IOperationList.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IOperationList FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject json ? new OperationList(json) : null;
+ }
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject instance to deserialize from.
+ internal OperationList(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject json)
+ {
+ bool returnNow = false;
+ BeforeFromJson(json, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;}
+ {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.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.ConnectedKubernetes.Models.Api202001Preview.IOperation) (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.Operation.FromJson(__u) )) ))() : null : Value;}
+ 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.ConnectedKubernetes.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject();
+
+ bool returnNow = false;
+ BeforeToJson(ref container, ref returnNow);
+ if (returnNow)
+ {
+ return container;
+ }
+ AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink" ,container.Add );
+ if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode.IncludeReadOnly))
+ {
+ if (null != this._value)
+ {
+ var __w = new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.XNodeArray();
+ foreach( var __x in this._value )
+ {
+ AddIf(__x?.ToJson(null, serializationMode) ,__w.Add);
+ }
+ container.Add("value",__w);
+ }
+ }
+ AfterToJson(ref container);
+ return container;
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/ConnectedKubernetes/generated/api/Models/ConnectedKubernetesIdentity.PowerShell.cs b/src/ConnectedKubernetes/generated/api/Models/ConnectedKubernetesIdentity.PowerShell.cs
new file mode 100644
index 000000000000..38c65da0e865
--- /dev/null
+++ b/src/ConnectedKubernetes/generated/api/Models/ConnectedKubernetesIdentity.PowerShell.cs
@@ -0,0 +1,142 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell;
+
+ [System.ComponentModel.TypeConverter(typeof(ConnectedKubernetesIdentityTypeConverter))]
+ public partial class ConnectedKubernetesIdentity
+ {
+
+ ///
+ /// 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);
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ internal ConnectedKubernetesIdentity(global::System.Collections.IDictionary content)
+ {
+ bool returnNow = false;
+ BeforeDeserializeDictionary(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedKubernetesIdentityInternal)this).ClusterName = (string) content.GetValueForProperty("ClusterName",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedKubernetesIdentityInternal)this).ClusterName, global::System.Convert.ToString);
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedKubernetesIdentityInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedKubernetesIdentityInternal)this).Id, global::System.Convert.ToString);
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedKubernetesIdentityInternal)this).ResourceGroupName = (string) content.GetValueForProperty("ResourceGroupName",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedKubernetesIdentityInternal)this).ResourceGroupName, global::System.Convert.ToString);
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedKubernetesIdentityInternal)this).SubscriptionId = (string) content.GetValueForProperty("SubscriptionId",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedKubernetesIdentityInternal)this).SubscriptionId, 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 ConnectedKubernetesIdentity(global::System.Management.Automation.PSObject content)
+ {
+ bool returnNow = false;
+ BeforeDeserializePSObject(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedKubernetesIdentityInternal)this).ClusterName = (string) content.GetValueForProperty("ClusterName",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedKubernetesIdentityInternal)this).ClusterName, global::System.Convert.ToString);
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedKubernetesIdentityInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedKubernetesIdentityInternal)this).Id, global::System.Convert.ToString);
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedKubernetesIdentityInternal)this).ResourceGroupName = (string) content.GetValueForProperty("ResourceGroupName",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedKubernetesIdentityInternal)this).ResourceGroupName, global::System.Convert.ToString);
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedKubernetesIdentityInternal)this).SubscriptionId = (string) content.GetValueForProperty("SubscriptionId",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedKubernetesIdentityInternal)this).SubscriptionId, global::System.Convert.ToString);
+ AfterDeserializePSObject(content);
+ }
+
+ ///
+ /// Deserializes a into an instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ ///
+ /// an instance of .
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedKubernetesIdentity DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ {
+ return new ConnectedKubernetesIdentity(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.ConnectedKubernetes.Models.IConnectedKubernetesIdentity DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ {
+ return new ConnectedKubernetesIdentity(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.ConnectedKubernetes.Models.IConnectedKubernetesIdentity FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.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.ConnectedKubernetes.Runtime.SerializationMode.IncludeAll)?.ToString();
+ }
+ [System.ComponentModel.TypeConverter(typeof(ConnectedKubernetesIdentityTypeConverter))]
+ public partial interface IConnectedKubernetesIdentity
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/src/ConnectedKubernetes/generated/api/Models/ConnectedKubernetesIdentity.TypeConverter.cs b/src/ConnectedKubernetes/generated/api/Models/ConnectedKubernetesIdentity.TypeConverter.cs
new file mode 100644
index 000000000000..e3efe8f9bdce
--- /dev/null
+++ b/src/ConnectedKubernetes/generated/api/Models/ConnectedKubernetesIdentity.TypeConverter.cs
@@ -0,0 +1,157 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell;
+
+ ///
+ /// A PowerShell PSTypeConverter to support converting to an instance of
+ ///
+ public partial class ConnectedKubernetesIdentityTypeConverter : 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
+ /// parameter.
+ ///
+ /// 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();
+ // we allow string conversion too.
+ if (type == typeof(global::System.String))
+ {
+ return true;
+ }
+ 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.ConnectedKubernetes.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.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 to the parameter using and
+ ///
+ /// 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.ConnectedKubernetes.Models.IConnectedKubernetesIdentity ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ // support direct string to id type conversion.
+ if (type == typeof(global::System.String))
+ {
+ return new ConnectedKubernetesIdentity { Id = sourceValue };
+ }
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedKubernetesIdentity).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return ConnectedKubernetesIdentity.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return ConnectedKubernetesIdentity.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return ConnectedKubernetesIdentity.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/ConnectedKubernetes/generated/api/Models/ConnectedKubernetesIdentity.cs b/src/ConnectedKubernetes/generated/api/Models/ConnectedKubernetesIdentity.cs
new file mode 100644
index 000000000000..5eeab3a9b73b
--- /dev/null
+++ b/src/ConnectedKubernetes/generated/api/Models/ConnectedKubernetesIdentity.cs
@@ -0,0 +1,99 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Extensions;
+
+ public partial class ConnectedKubernetesIdentity :
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedKubernetesIdentity,
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedKubernetesIdentityInternal
+ {
+
+ /// Backing field for property.
+ private string _clusterName;
+
+ /// The name of the Kubernetes cluster on which get is called.
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Owned)]
+ public string ClusterName { get => this._clusterName; set => this._clusterName = value; }
+
+ /// Backing field for property.
+ private string _id;
+
+ /// Resource identity path
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Owned)]
+ public string Id { get => this._id; set => this._id = value; }
+
+ /// Backing field for property.
+ private string _resourceGroupName;
+
+ /// The name of the resource group. The name is case insensitive.
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Owned)]
+ public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; }
+
+ /// Backing field for property.
+ private string _subscriptionId;
+
+ /// The ID of the target subscription.
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.PropertyOrigin.Owned)]
+ public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; }
+
+ /// Creates an new instance.
+ public ConnectedKubernetesIdentity()
+ {
+
+ }
+ }
+ public partial interface IConnectedKubernetesIdentity :
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IJsonSerializable
+ {
+ /// The name of the Kubernetes cluster on which get is called.
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"The name of the Kubernetes cluster on which get is called.",
+ SerializedName = @"clusterName",
+ PossibleTypes = new [] { typeof(string) })]
+ string ClusterName { get; set; }
+ /// Resource identity path
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Resource identity path",
+ SerializedName = @"id",
+ PossibleTypes = new [] { typeof(string) })]
+ string Id { get; set; }
+ /// The name of the resource group. The name is case insensitive.
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"The name of the resource group. The name is case insensitive.",
+ SerializedName = @"resourceGroupName",
+ PossibleTypes = new [] { typeof(string) })]
+ string ResourceGroupName { get; set; }
+ /// The ID of the target subscription.
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"The ID of the target subscription.",
+ SerializedName = @"subscriptionId",
+ PossibleTypes = new [] { typeof(string) })]
+ string SubscriptionId { get; set; }
+
+ }
+ internal partial interface IConnectedKubernetesIdentityInternal
+
+ {
+ /// The name of the Kubernetes cluster on which get is called.
+ string ClusterName { get; set; }
+ /// Resource identity path
+ string Id { get; set; }
+ /// The name of the resource group. The name is case insensitive.
+ string ResourceGroupName { get; set; }
+ /// The ID of the target subscription.
+ string SubscriptionId { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/src/ConnectedKubernetes/generated/api/Models/ConnectedKubernetesIdentity.json.cs b/src/ConnectedKubernetes/generated/api/Models/ConnectedKubernetesIdentity.json.cs
new file mode 100644
index 000000000000..62d8253df4c9
--- /dev/null
+++ b/src/ConnectedKubernetes/generated/api/Models/ConnectedKubernetesIdentity.json.cs
@@ -0,0 +1,111 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Extensions;
+
+ public partial class ConnectedKubernetesIdentity
+ {
+
+ ///
+ /// 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.ConnectedKubernetes.Runtime.Json.JsonObject json);
+
+ ///
+ /// AfterToJson will be called after the json erialization 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.ConnectedKubernetes.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.ConnectedKubernetes.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.ConnectedKubernetes.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject instance to deserialize from.
+ internal ConnectedKubernetesIdentity(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject json)
+ {
+ bool returnNow = false;
+ BeforeFromJson(json, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ {_clusterName = If( json?.PropertyT("clusterName"), out var __jsonClusterName) ? (string)__jsonClusterName : (string)ClusterName;}
+ {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)Id;}
+ {_resourceGroupName = If( json?.PropertyT("resourceGroupName"), out var __jsonResourceGroupName) ? (string)__jsonResourceGroupName : (string)ResourceGroupName;}
+ {_subscriptionId = If( json?.PropertyT("subscriptionId"), out var __jsonSubscriptionId) ? (string)__jsonSubscriptionId : (string)SubscriptionId;}
+ AfterFromJson(json);
+ }
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedKubernetesIdentity.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedKubernetesIdentity.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedKubernetesIdentity FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject json ? new ConnectedKubernetesIdentity(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.ConnectedKubernetes.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonObject();
+
+ bool returnNow = false;
+ BeforeToJson(ref container, ref returnNow);
+ if (returnNow)
+ {
+ return container;
+ }
+ AddIf( null != (((object)this._clusterName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonString(this._clusterName.ToString()) : null, "clusterName" ,container.Add );
+ AddIf( null != (((object)this._id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonString(this._id.ToString()) : null, "id" ,container.Add );
+ AddIf( null != (((object)this._resourceGroupName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonString(this._resourceGroupName.ToString()) : null, "resourceGroupName" ,container.Add );
+ AddIf( null != (((object)this._subscriptionId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Json.JsonString(this._subscriptionId.ToString()) : null, "subscriptionId" ,container.Add );
+ AfterToJson(ref container);
+ return container;
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/ConnectedKubernetes/generated/api/Support/ProvisioningState.Completer.cs b/src/ConnectedKubernetes/generated/api/Support/ProvisioningState.Completer.cs
new file mode 100644
index 000000000000..02ac0481d157
--- /dev/null
+++ b/src/ConnectedKubernetes/generated/api/Support/ProvisioningState.Completer.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.ConnectedKubernetes.Support
+{
+
+ /// Argument completer implementation for ProvisioningState.
+ [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ProvisioningStateTypeConverter))]
+ public partial struct ProvisioningState :
+ System.Management.Automation.IArgumentCompleter
+ {
+
+ ///
+ /// Implementations of this function are called by PowerShell to complete arguments.
+ ///
+ /// The name of the command that needs argument completion.
+ /// The name of the parameter that needs argument completion.
+ /// The (possibly empty) word being completed.
+ /// The command ast in case it is needed for completion.
+ /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot
+ /// or will not attempt to evaluate an argument, in which case you may need to use commandAst.
+ ///
+ /// A collection of completion results, most like with ResultType set to ParameterValue.
+ ///
+ public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters)
+ {
+ if (global::System.String.IsNullOrEmpty(wordToComplete) || "Succeeded".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase))
+ {
+ yield return new global::System.Management.Automation.CompletionResult("Succeeded", "Succeeded", global::System.Management.Automation.CompletionResultType.ParameterValue, "Succeeded");
+ }
+ if (global::System.String.IsNullOrEmpty(wordToComplete) || "Failed".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase))
+ {
+ yield return new global::System.Management.Automation.CompletionResult("Failed", "Failed", global::System.Management.Automation.CompletionResultType.ParameterValue, "Failed");
+ }
+ if (global::System.String.IsNullOrEmpty(wordToComplete) || "Canceled".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase))
+ {
+ yield return new global::System.Management.Automation.CompletionResult("Canceled", "Canceled", global::System.Management.Automation.CompletionResultType.ParameterValue, "Canceled");
+ }
+ if (global::System.String.IsNullOrEmpty(wordToComplete) || "Provisioning".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase))
+ {
+ yield return new global::System.Management.Automation.CompletionResult("Provisioning", "Provisioning", global::System.Management.Automation.CompletionResultType.ParameterValue, "Provisioning");
+ }
+ if (global::System.String.IsNullOrEmpty(wordToComplete) || "Updating".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase))
+ {
+ yield return new global::System.Management.Automation.CompletionResult("Updating", "Updating", global::System.Management.Automation.CompletionResultType.ParameterValue, "Updating");
+ }
+ if (global::System.String.IsNullOrEmpty(wordToComplete) || "Deleting".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase))
+ {
+ yield return new global::System.Management.Automation.CompletionResult("Deleting", "Deleting", global::System.Management.Automation.CompletionResultType.ParameterValue, "Deleting");
+ }
+ if (global::System.String.IsNullOrEmpty(wordToComplete) || "Accepted".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase))
+ {
+ yield return new global::System.Management.Automation.CompletionResult("Accepted", "Accepted", global::System.Management.Automation.CompletionResultType.ParameterValue, "Accepted");
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/ConnectedKubernetes/generated/api/Support/ProvisioningState.TypeConverter.cs b/src/ConnectedKubernetes/generated/api/Support/ProvisioningState.TypeConverter.cs
new file mode 100644
index 000000000000..ac734a27fba6
--- /dev/null
+++ b/src/ConnectedKubernetes/generated/api/Support/ProvisioningState.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.ConnectedKubernetes.Support
+{
+
+ /// TypeConverter implementation for ProvisioningState.
+ public partial class ProvisioningStateTypeConverter :
+ global::System.Management.Automation.PSTypeConverter
+ {
+
+ ///
+ /// Determines if the converter can convert the parameter to the
+ /// parameter.
+ ///
+ /// the to convert from
+ /// the to convert to
+ ///
+ /// true if the converter can convert the parameter to the
+ /// parameter, otherwise false.
+ ///
+ public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true;
+
+ ///
+ /// Determines if the converter can convert the parameter to the
+ /// parameter.
+ ///
+ /// the to convert from
+ /// the to convert to
+ ///
+ /// true if the converter can convert the parameter to the
+ /// parameter, otherwise false.
+ ///
+ public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false;
+
+ ///
+ /// Converts the parameter to the parameter using and
+ ///
+ /// the to convert from
+ /// the to convert to
+ /// not used by this TypeConverter.
+ /// when set to true, will ignore the case when converting.
+ ///
+ /// an instance of , or null if there is no suitable conversion.
+ ///
+ public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ProvisioningState.CreateFrom(sourceValue);
+
+ /// NotImplemented -- this will return null
+ /// the to convert from
+ /// the to convert to
+ /// not used by this TypeConverter.
+ /// when set to true, will ignore the case when converting.
+ /// will always return null.
+ public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null;
+ }
+}
\ No newline at end of file
diff --git a/src/ConnectedKubernetes/generated/api/Support/ProvisioningState.cs b/src/ConnectedKubernetes/generated/api/Support/ProvisioningState.cs
new file mode 100644
index 000000000000..ec5f157ce9c9
--- /dev/null
+++ b/src/ConnectedKubernetes/generated/api/Support/ProvisioningState.cs
@@ -0,0 +1,107 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support
+{
+
+ public partial struct ProvisioningState :
+ System.IEquatable
+ {
+ public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ProvisioningState Accepted = @"Accepted";
+
+ public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ProvisioningState Canceled = @"Canceled";
+
+ public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ProvisioningState Deleting = @"Deleting";
+
+ public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ProvisioningState Failed = @"Failed";
+
+ public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ProvisioningState Provisioning = @"Provisioning";
+
+ public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ProvisioningState Succeeded = @"Succeeded";
+
+ public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ProvisioningState Updating = @"Updating";
+
+ /// the value for an instance of the Enum.
+ private string _value { get; set; }
+
+ /// Conversion from arbitrary object to ProvisioningState
+ /// the value to convert to an instance of .
+ internal static object CreateFrom(object value)
+ {
+ return new ProvisioningState(System.Convert.ToString(value));
+ }
+
+ /// Compares values of enum type ProvisioningState
+ /// the value to compare against this instance.
+ /// true if the two instances are equal to the same value
+ public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ProvisioningState e)
+ {
+ return _value.Equals(e._value);
+ }
+
+ /// Compares values of enum type ProvisioningState (override for Object)
+ /// the value to compare against this instance.
+ /// true if the two instances are equal to the same value
+ public override bool Equals(object obj)
+ {
+ return obj is ProvisioningState && Equals((ProvisioningState)obj);
+ }
+
+ /// Returns hashCode for enum ProvisioningState
+ /// The hashCode of the value
+ public override int GetHashCode()
+ {
+ return this._value.GetHashCode();
+ }
+
+ /// Creates an instance of the
+ /// the value to create an instance for.
+ private ProvisioningState(string underlyingValue)
+ {
+ this._value = underlyingValue;
+ }
+
+ /// Returns string representation for ProvisioningState
+ /// A string for this value.
+ public override string ToString()
+ {
+ return this._value;
+ }
+
+ /// Implicit operator to convert string to ProvisioningState
+ /// the value to convert to an instance of .
+
+ public static implicit operator ProvisioningState(string value)
+ {
+ return new ProvisioningState(value);
+ }
+
+ /// Implicit operator to convert ProvisioningState to string
+ /// the value to convert to an instance of .
+
+ public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ProvisioningState e)
+ {
+ return e._value;
+ }
+
+ /// Overriding != operator for enum ProvisioningState
+ /// the value to compare against
+ /// the value to compare against
+ /// true if the two instances are not equal to the same value
+ public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ProvisioningState e1, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ProvisioningState e2)
+ {
+ return !e2.Equals(e1);
+ }
+
+ /// Overriding == operator for enum ProvisioningState
+ /// the value to compare against
+ /// the value to compare against
+ /// true if the two instances are equal to the same value
+ public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ProvisioningState e1, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ProvisioningState e2)
+ {
+ return e2.Equals(e1);
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/ConnectedKubernetes/generated/api/Support/ResourceIdentityType.Completer.cs b/src/ConnectedKubernetes/generated/api/Support/ResourceIdentityType.Completer.cs
new file mode 100644
index 000000000000..d683e2b3b076
--- /dev/null
+++ b/src/ConnectedKubernetes/generated/api/Support/ResourceIdentityType.Completer.cs
@@ -0,0 +1,39 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support
+{
+
+ /// Argument completer implementation for ResourceIdentityType.
+ [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ResourceIdentityTypeTypeConverter))]
+ public partial struct ResourceIdentityType :
+ System.Management.Automation.IArgumentCompleter
+ {
+
+ ///
+ /// Implementations of this function are called by PowerShell to complete arguments.
+ ///
+ /// The name of the command that needs argument completion.
+ /// The name of the parameter that needs argument completion.
+ /// The (possibly empty) word being completed.
+ /// The command ast in case it is needed for completion.
+ /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot
+ /// or will not attempt to evaluate an argument, in which case you may need to use commandAst.
+ ///
+ /// A collection of completion results, most like with ResultType set to ParameterValue.
+ ///
+ public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters)
+ {
+ if (global::System.String.IsNullOrEmpty(wordToComplete) || "None".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase))
+ {
+ yield return new global::System.Management.Automation.CompletionResult("None", "None", global::System.Management.Automation.CompletionResultType.ParameterValue, "None");
+ }
+ if (global::System.String.IsNullOrEmpty(wordToComplete) || "SystemAssigned".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase))
+ {
+ yield return new global::System.Management.Automation.CompletionResult("SystemAssigned", "SystemAssigned", global::System.Management.Automation.CompletionResultType.ParameterValue, "SystemAssigned");
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/ConnectedKubernetes/generated/api/Support/ResourceIdentityType.TypeConverter.cs b/src/ConnectedKubernetes/generated/api/Support/ResourceIdentityType.TypeConverter.cs
new file mode 100644
index 000000000000..9baa9e2b4abc
--- /dev/null
+++ b/src/ConnectedKubernetes/generated/api/Support/ResourceIdentityType.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.ConnectedKubernetes.Support
+{
+
+ /// TypeConverter implementation for ResourceIdentityType.
+ public partial class ResourceIdentityTypeTypeConverter :
+ 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) => ResourceIdentityType.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/ConnectedKubernetes/generated/api/Support/ResourceIdentityType.cs b/src/ConnectedKubernetes/generated/api/Support/ResourceIdentityType.cs
new file mode 100644
index 000000000000..bdfac78b82ce
--- /dev/null
+++ b/src/ConnectedKubernetes/generated/api/Support/ResourceIdentityType.cs
@@ -0,0 +1,97 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support
+{
+
+ public partial struct ResourceIdentityType :
+ System.IEquatable
+ {
+ public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ResourceIdentityType None = @"None";
+
+ public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ResourceIdentityType SystemAssigned = @"SystemAssigned";
+
+ /// the value for an instance of the Enum.
+ private string _value { get; set; }
+
+ /// Conversion from arbitrary object to ResourceIdentityType
+ /// the value to convert to an instance of .
+ internal static object CreateFrom(object value)
+ {
+ return new ResourceIdentityType(System.Convert.ToString(value));
+ }
+
+ /// Compares values of enum type ResourceIdentityType
+ /// 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.ConnectedKubernetes.Support.ResourceIdentityType e)
+ {
+ return _value.Equals(e._value);
+ }
+
+ /// Compares values of enum type ResourceIdentityType (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 ResourceIdentityType && Equals((ResourceIdentityType)obj);
+ }
+
+ /// Returns hashCode for enum ResourceIdentityType
+ /// The hashCode of the value
+ public override int GetHashCode()
+ {
+ return this._value.GetHashCode();
+ }
+
+ /// Creates an instance of the
+ /// the value to create an instance for.
+ private ResourceIdentityType(string underlyingValue)
+ {
+ this._value = underlyingValue;
+ }
+
+ /// Returns string representation for ResourceIdentityType
+ /// A string for this value.
+ public override string ToString()
+ {
+ return this._value;
+ }
+
+ /// Implicit operator to convert string to ResourceIdentityType
+ /// the value to convert to an instance of .
+
+ public static implicit operator ResourceIdentityType(string value)
+ {
+ return new ResourceIdentityType(value);
+ }
+
+ /// Implicit operator to convert ResourceIdentityType to string
+ /// the value to convert to an instance of .
+
+ public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ResourceIdentityType e)
+ {
+ return e._value;
+ }
+
+ /// Overriding != operator for enum ResourceIdentityType
+ /// 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.ConnectedKubernetes.Support.ResourceIdentityType e1, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ResourceIdentityType e2)
+ {
+ return !e2.Equals(e1);
+ }
+
+ /// Overriding == operator for enum ResourceIdentityType
+ /// 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.ConnectedKubernetes.Support.ResourceIdentityType e1, Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Support.ResourceIdentityType e2)
+ {
+ return e2.Equals(e1);
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/ConnectedKubernetes/generated/cmdlets/GetAzConnectedKubernetes_Get.cs b/src/ConnectedKubernetes/generated/cmdlets/GetAzConnectedKubernetes_Get.cs
new file mode 100644
index 000000000000..6635bb626e09
--- /dev/null
+++ b/src/ConnectedKubernetes/generated/cmdlets/GetAzConnectedKubernetes_Get.cs
@@ -0,0 +1,402 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Cmdlets
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Extensions;
+
+ ///
+ /// Returns the properties of the specified connected cluster, including name, identity, properties, and additional cluster
+ /// details.
+ ///
+ ///
+ /// [OpenAPI] ConnectedCluster_Get=>GET:"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Kubernetes/connectedClusters/{clusterName}"
+ ///
+ [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzConnectedKubernetes_Get")]
+ [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedCluster))]
+ [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Description(@"Returns the properties of the specified connected cluster, including name, identity, properties, and additional cluster details.")]
+ [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Generated]
+ public partial class GetAzConnectedKubernetes_Get : global::System.Management.Automation.PSCmdlet,
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener
+ {
+ /// A unique id generatd for the this cmdlet when it is instantiated.
+ private string __correlationId = System.Guid.NewGuid().ToString();
+
+ /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet)
+ private global::System.Management.Automation.InvocationInfo __invocationInfo;
+
+ /// A unique id generatd for the this cmdlet when ProcessRecord() is called.
+ private string __processRecordId;
+
+ ///
+ /// The for this operation.
+ ///
+ private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource();
+
+ /// Wait for .NET debugger to attach
+ [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")]
+ [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.ParameterCategory.Runtime)]
+ public global::System.Management.Automation.SwitchParameter Break { get; set; }
+
+ /// The reference to the client API class.
+ public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.ConnectedKubernetes Client => Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Module.Instance.ClientAPI;
+
+ /// Backing field for property.
+ private string _clusterName;
+
+ /// The name of the Kubernetes cluster on which get is called.
+ [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Kubernetes cluster on which get is called.")]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info(
+ Required = true,
+ ReadOnly = false,
+ Description = @"The name of the Kubernetes cluster on which get is called.",
+ SerializedName = @"clusterName",
+ PossibleTypes = new [] { typeof(string) })]
+ [global::System.Management.Automation.Alias("Name")]
+ [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.ParameterCategory.Path)]
+ public string ClusterName { get => this._clusterName; set => this._clusterName = value; }
+
+ ///
+ /// 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.ConnectedKubernetes.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.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.ConnectedKubernetes.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.ParameterCategory.Runtime)]
+ public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.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.ConnectedKubernetes.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.ParameterCategory.Runtime)]
+ public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.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.ConnectedKubernetes.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel;
+
+ /// cancellation token.
+ global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener.Token => _cancellationTokenSource.Token;
+
+ ///
+ /// The instance of the that the remote call will use.
+ ///
+ private Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.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.ConnectedKubernetes.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.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.ConnectedKubernetes.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.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.ConnectedKubernetes.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.ParameterCategory.Runtime)]
+ public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; }
+
+ /// Backing field for property.
+ private string _resourceGroupName;
+
+ /// The name of the resource group. The name is case insensitive.
+ [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info(
+ Required = true,
+ ReadOnly = false,
+ Description = @"The name of the resource group. The name is case insensitive.",
+ SerializedName = @"resourceGroupName",
+ PossibleTypes = new [] { typeof(string) })]
+ [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.ParameterCategory.Path)]
+ public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; }
+
+ /// Backing field for property.
+ private string[] _subscriptionId;
+
+ /// The ID of the target subscription.
+ [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Info(
+ Required = true,
+ ReadOnly = false,
+ Description = @"The ID of the target subscription.",
+ SerializedName = @"subscriptionId",
+ PossibleTypes = new [] { typeof(string) })]
+ [Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.DefaultInfo(
+ Name = @"",
+ Description =@"",
+ Script = @"(Get-AzContext).Subscription.Id")]
+ [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.ParameterCategory.Path)]
+ public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; }
+
+ ///
+ /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what
+ /// happens on that response. Implement this method in a partial class to enable this behavior
+ ///
+ /// the raw response message as an global::System.Net.Http.HttpResponseMessage.
+ /// the body result as a 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 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()
+ {
+ Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials);
+ if (Break)
+ {
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.AttachDebugger.Break();
+ }
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; }
+ }
+
+ /// Performs clean-up after the command execution
+ protected override void EndProcessing()
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.CmdletEndProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; }
+ }
+
+ ///
+ /// Intializes a new instance of the cmdlet class.
+ ///
+ public GetAzConnectedKubernetes_Get()
+ {
+
+ }
+
+ /// Handles/Dispatches events during the call to the REST service.
+ /// The message id
+ /// The message cancellation token. When this call is cancelled, this should be true
+ /// Detailed message data for the message event.
+ ///
+ /// A that will be complete when handling of the message is completed.
+ ///
+ async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.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.ConnectedKubernetes.Runtime.Events.Verbose:
+ {
+ WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}");
+ return ;
+ }
+ case Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.Warning:
+ {
+ WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}");
+ return ;
+ }
+ case Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.Information:
+ {
+ var data = messageData();
+ WriteInformation(data, new[] { data.Message });
+ return ;
+ }
+ case Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.Debug:
+ {
+ WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}");
+ return ;
+ }
+ case Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.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.ConnectedKubernetes.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.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.ConnectedKubernetes.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; }
+ __processRecordId = System.Guid.NewGuid().ToString();
+ try
+ {
+ // work
+ using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener)this).Token) )
+ {
+ asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.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.ConnectedKubernetes.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.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.ConnectedKubernetes.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.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.ConnectedKubernetes.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.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.ConnectedKubernetes.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.CmdletProcessRecordAsyncStart); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; }
+ await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; }
+ Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName);
+ if (null != HttpPipelinePrepend)
+ {
+ Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend);
+ }
+ if (null != HttpPipelineAppend)
+ {
+ Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend);
+ }
+ // get the client instance
+ try
+ {
+ foreach( var SubscriptionId in this.SubscriptionId )
+ {
+ await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; }
+ await this.Client.ConnectedClusterGet(SubscriptionId, ResourceGroupName, ClusterName, onOk, onDefault, this, Pipeline);
+ await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; }
+ }
+ }
+ catch (Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.UndeclaredResponseException urexception)
+ {
+ WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,ClusterName=ClusterName})
+ {
+ ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action }
+ });
+ }
+ finally
+ {
+ await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.CmdletProcessRecordAsyncEnd);
+ }
+ }
+ }
+
+ /// Interrupts currently running code within the command.
+ protected override void StopProcessing()
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.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 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.ConnectedKubernetes.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, ClusterName=ClusterName })
+ {
+ ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action }
+ });
+ }
+ else
+ {
+ WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ClusterName=ClusterName })
+ {
+ 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 from the remote call
+ ///
+ /// A that will be complete when handling of the method is completed.
+ ///
+ private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response)
+ {
+ using( NoSynchronizationContext )
+ {
+ var _returnNow = global::System.Threading.Tasks.Task.FromResult(false);
+ overrideOnOk(responseMessage, response, ref _returnNow);
+ // if overrideOnOk has returned true, then return right away.
+ if ((null != _returnNow && await _returnNow))
+ {
+ return ;
+ }
+ // onOk - response for 200 / application/json
+ // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedCluster
+ WriteObject((await response));
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/ConnectedKubernetes/generated/cmdlets/GetAzConnectedKubernetes_GetViaIdentity.cs b/src/ConnectedKubernetes/generated/cmdlets/GetAzConnectedKubernetes_GetViaIdentity.cs
new file mode 100644
index 000000000000..6ee992e3620d
--- /dev/null
+++ b/src/ConnectedKubernetes/generated/cmdlets/GetAzConnectedKubernetes_GetViaIdentity.cs
@@ -0,0 +1,380 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Cmdlets
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Extensions;
+
+ ///
+ /// Returns the properties of the specified connected cluster, including name, identity, properties, and additional cluster
+ /// details.
+ ///
+ ///
+ /// [OpenAPI] ConnectedCluster_Get=>GET:"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Kubernetes/connectedClusters/{clusterName}"
+ ///
+ [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzConnectedKubernetes_GetViaIdentity")]
+ [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.Api202001Preview.IConnectedCluster))]
+ [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Description(@"Returns the properties of the specified connected cluster, including name, identity, properties, and additional cluster details.")]
+ [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Generated]
+ public partial class GetAzConnectedKubernetes_GetViaIdentity : global::System.Management.Automation.PSCmdlet,
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener
+ {
+ /// A unique id generatd for the this cmdlet when it is instantiated.
+ private string __correlationId = System.Guid.NewGuid().ToString();
+
+ /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet)
+ private global::System.Management.Automation.InvocationInfo __invocationInfo;
+
+ /// A unique id generatd for the this cmdlet when ProcessRecord() is called.
+ private string __processRecordId;
+
+ ///
+ /// The for this operation.
+ ///
+ private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource();
+
+ /// Wait for .NET debugger to attach
+ [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")]
+ [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.ParameterCategory.Runtime)]
+ public global::System.Management.Automation.SwitchParameter Break { get; set; }
+
+ /// The reference to the client API class.
+ public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.ConnectedKubernetes Client => Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.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.ConnectedKubernetes.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.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.ConnectedKubernetes.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.ParameterCategory.Runtime)]
+ public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.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.ConnectedKubernetes.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.ParameterCategory.Runtime)]
+ public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; }
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedKubernetesIdentity _inputObject;
+
+ /// Identity Parameter
+ [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)]
+ [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.ParameterCategory.Path)]
+ public Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Models.IConnectedKubernetesIdentity InputObject { get => this._inputObject; set => this._inputObject = value; }
+
+ /// Accessor for our copy of the InvocationInfo.
+ public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } }
+
+ ///
+ /// cancellation delegate. Stops the cmdlet when called.
+ ///
+ global::System.Action Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel;
+
+ /// cancellation token.
+ global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener.Token => _cancellationTokenSource.Token;
+
+ ///
+ /// The instance of the that the remote call will use.
+ ///
+ private Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.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.ConnectedKubernetes.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.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.ConnectedKubernetes.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.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.ConnectedKubernetes.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.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 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 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()
+ {
+ Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials);
+ if (Break)
+ {
+ Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.AttachDebugger.Break();
+ }
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; }
+ }
+
+ /// Performs clean-up after the command execution
+ protected override void EndProcessing()
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.CmdletEndProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; }
+ }
+
+ ///
+ /// Intializes a new instance of the cmdlet class.
+ ///
+ public GetAzConnectedKubernetes_GetViaIdentity()
+ {
+
+ }
+
+ /// Handles/Dispatches events during the call to the REST service.
+ /// The message id
+ /// The message cancellation token. When this call is cancelled, this should be true
+ /// Detailed message data for the message event.
+ ///
+ /// A that will be complete when handling of the message is completed.
+ ///
+ async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.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.ConnectedKubernetes.Runtime.Events.Verbose:
+ {
+ WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}");
+ return ;
+ }
+ case Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.Warning:
+ {
+ WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}");
+ return ;
+ }
+ case Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.Information:
+ {
+ var data = messageData();
+ WriteInformation(data, new[] { data.Message });
+ return ;
+ }
+ case Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.Debug:
+ {
+ WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}");
+ return ;
+ }
+ case Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.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.ConnectedKubernetes.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.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.ConnectedKubernetes.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; }
+ __processRecordId = System.Guid.NewGuid().ToString();
+ try
+ {
+ // work
+ using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.IEventListener)this).Token) )
+ {
+ asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.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.ConnectedKubernetes.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.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.ConnectedKubernetes.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.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.ConnectedKubernetes.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedKubernetes.Runtime.Events.CmdletProcessRecordEnd).Wait();
+ }
+ }
+
+ /// Performs execution of the command, working asynchronously if required.
+ ///
+ /// A