From bbe849a9d39c3646b41e29bc68dc285713371409 Mon Sep 17 00:00:00 2001 From: azure-powershell-bot <65331932+azure-powershell-bot@users.noreply.github.com> Date: Tue, 24 May 2022 07:06:04 +0000 Subject: [PATCH 1/5] Move KubernetesConfiguration to main --- .../Az.KubernetesConfiguration.format.ps1xml | 878 +++++- .../Az.KubernetesConfiguration.psd1 | 27 +- .../Az.KubernetesConfiguration.psm1 | 14 +- .../KubernetesConfiguration.sln | 158 +- src/KubernetesConfiguration/README.md | 157 +- .../check-dependencies.ps1 | 4 +- .../create-model-cmdlets.ps1 | 21 +- ...-AzKubernetesConfigFluxOperationStatus.ps1 | 164 ++ .../custom/Get-AzKubernetesConfiguration.ps1 | 75 +- .../Get-AzKubernetesConfigurationFlux.ps1 | 163 ++ .../custom/Get-AzKubernetesExtension.ps1 | 63 +- .../custom/New-AzKubernetesConfiguration.ps1 | 129 +- .../New-AzKubernetesConfigurationFlux.ps1 | 299 +++ .../custom/New-AzKubernetesExtension.ps1 | 46 +- .../Remove-AzKubernetesConfiguration.ps1 | 59 +- .../Remove-AzKubernetesConfigurationFlux.ps1 | 183 ++ .../custom/Remove-AzKubernetesExtension.ps1 | 46 +- .../Update-AzKubernetesConfigurationFlux.ps1 | 310 +++ .../custom/Update-AzKubernetesExtension.ps1 | 36 +- ...t-AzKubernetesConfigFluxOperationStatus.md | 10 + .../examples/Get-AzKubernetesConfiguration.md | 18 +- .../Get-AzKubernetesConfigurationFlux.md | 21 + .../examples/Get-AzKubernetesExtension.md | 17 +- .../examples/New-AzKubernetesConfiguration.md | 26 +- .../New-AzKubernetesConfigurationFlux.md | 23 + .../examples/New-AzKubernetesExtension.md | 21 +- .../Remove-AzKubernetesConfiguration.md | 14 +- .../Remove-AzKubernetesConfigurationFlux.md | 15 + .../examples/Remove-AzKubernetesExtension.md | 2 +- .../Update-AzKubernetesConfigurationFlux.md | 21 + .../examples/Update-AzKubernetesExtension.md | 8 +- ...-AzKubernetesConfigFluxOperationStatus.ps1 | 227 ++ .../exports/Get-AzKubernetesConfiguration.ps1 | 79 +- .../Get-AzKubernetesConfigurationFlux.ps1 | 233 ++ .../exports/Get-AzKubernetesExtension.ps1 | 77 +- .../exports/New-AzKubernetesConfiguration.ps1 | 100 +- .../New-AzKubernetesConfigurationFlux.ps1 | 374 +++ .../exports/New-AzKubernetesExtension.ps1 | 77 +- .../exports/ProxyCmdletDefinitions.ps1 | 2302 +++++++++++++--- .../Remove-AzKubernetesConfiguration.ps1 | 61 +- .../Remove-AzKubernetesConfigurationFlux.ps1 | 246 ++ .../exports/Remove-AzKubernetesExtension.ps1 | 60 +- .../Update-AzKubernetesConfigurationFlux.ps1 | 379 +++ .../exports/Update-AzKubernetesExtension.ps1 | 72 +- .../generate-info.json | 10 +- .../generated/Module.cs | 32 +- .../generated/api/KubernetesConfiguration.cs | 2061 +++++++++++--- .../generated/api/Models/Any.PowerShell.cs | 8 +- .../generated/api/Models/Any.TypeConverter.cs | 25 +- .../generated/api/Models/Any.json.cs | 8 +- .../Api20/ErrorAdditionalInfo.PowerShell.cs | 28 +- .../ErrorAdditionalInfo.TypeConverter.cs | 26 +- .../Models/Api20/ErrorAdditionalInfo.json.cs | 8 +- .../Models/Api20/ErrorDetail.PowerShell.cs | 58 +- .../Models/Api20/ErrorDetail.TypeConverter.cs | 26 +- .../api/Models/Api20/ErrorDetail.json.cs | 8 +- .../Models/Api20/ErrorResponse.PowerShell.cs | 208 ++ .../ErrorResponse.TypeConverter.cs | 32 +- ...ponseAutoGenerated.cs => ErrorResponse.cs} | 26 +- .../ErrorResponse.json.cs | 28 +- .../ErrorResponseAutoGenerated.PowerShell.cs | 172 -- .../api/Models/Api20/Identity.PowerShell.cs | 38 +- .../Models/Api20/Identity.TypeConverter.cs | 25 +- .../api/Models/Api20/Identity.json.cs | 8 +- .../Models/Api20/ProxyResource.PowerShell.cs | 38 +- .../Api20/ProxyResource.TypeConverter.cs | 26 +- .../api/Models/Api20/ProxyResource.cs | 2 +- .../api/Models/Api20/ProxyResource.json.cs | 8 +- .../api/Models/Api20/Resource.PowerShell.cs | 38 +- .../Models/Api20/Resource.TypeConverter.cs | 25 +- .../api/Models/Api20/Resource.json.cs | 8 +- .../api/Models/Api20/SystemData.PowerShell.cs | 68 +- .../Models/Api20/SystemData.TypeConverter.cs | 25 +- .../api/Models/Api20/SystemData.json.cs | 8 +- .../api/Models/Api20210301/ErrorDefinition.cs | 74 - .../api/Models/Api20210301/ErrorResponse.cs | 80 - .../ResourceProviderOperation.PowerShell.cs | 170 -- .../api/Models/Api20210301/Result.cs | 51 - .../SourceControlConfiguration.PowerShell.cs | 216 -- ...ntrolConfigurationProperties.PowerShell.cs | 194 -- .../Api20210901/Extension.PowerShell.cs | 234 -- .../ExtensionProperties.PowerShell.cs | 206 -- .../OperationStatusResult.PowerShell.cs | 176 -- ...oviderOperationAutoGenerated.PowerShell.cs | 173 -- .../ResourceProviderOperationAutoGenerated.cs | 159 -- ...ourceProviderOperationListAutoGenerated.cs | 73 - .../BucketDefinition.PowerShell.cs | 214 ++ .../BucketDefinition.TypeConverter.cs} | 52 +- .../Models/Api20220301/BucketDefinition.cs | 180 ++ .../Api20220301/BucketDefinition.json.cs | 120 + .../BucketPatchDefinition.PowerShell.cs | 214 ++ .../BucketPatchDefinition.TypeConverter.cs} | 52 +- .../Api20220301/BucketPatchDefinition.cs | 180 ++ .../Api20220301/BucketPatchDefinition.json.cs | 120 + .../ComplianceStatus.PowerShell.cs | 68 +- .../ComplianceStatus.TypeConverter.cs | 32 +- .../ComplianceStatus.cs | 8 +- .../ComplianceStatus.json.cs | 16 +- ...nfigurationProtectedSettings.PowerShell.cs | 28 +- ...gurationProtectedSettings.TypeConverter.cs | 33 +- .../ConfigurationProtectedSettings.cs | 6 +- ...nfigurationProtectedSettings.dictionary.cs | 4 +- .../ConfigurationProtectedSettings.json.cs | 16 +- .../Api20220301/Extension.PowerShell.cs | 484 ++++ .../Extension.TypeConverter.cs | 31 +- .../{Api20210901 => Api20220301}/Extension.cs | 173 +- .../Extension.json.cs | 18 +- .../ExtensionProperties.PowerShell.cs | 366 +++ .../ExtensionProperties.TypeConverter.cs | 32 +- .../ExtensionProperties.cs | 152 +- .../ExtensionProperties.json.cs | 38 +- ...ropertiesAksAssignedIdentity.PowerShell.cs | 60 +- ...ertiesAksAssignedIdentity.TypeConverter.cs | 33 +- .../ExtensionPropertiesAksAssignedIdentity.cs | 20 +- ...nsionPropertiesAksAssignedIdentity.json.cs | 16 +- ...nfigurationProtectedSettings.PowerShell.cs | 30 +- ...gurationProtectedSettings.TypeConverter.cs | 33 +- ...ropertiesConfigurationProtectedSettings.cs | 6 +- ...nfigurationProtectedSettings.dictionary.cs | 4 +- ...tiesConfigurationProtectedSettings.json.cs | 16 +- ...pertiesConfigurationSettings.PowerShell.cs | 30 +- ...tiesConfigurationSettings.TypeConverter.cs | 33 +- ...xtensionPropertiesConfigurationSettings.cs | 6 +- ...pertiesConfigurationSettings.dictionary.cs | 4 +- ...ionPropertiesConfigurationSettings.json.cs | 16 +- ...ertiesCustomLocationSettings.PowerShell.cs | 30 +- ...iesCustomLocationSettings.TypeConverter.cs | 33 +- ...tensionPropertiesCustomLocationSettings.cs | 6 +- ...ertiesCustomLocationSettings.dictionary.cs | 4 +- ...onPropertiesCustomLocationSettings.json.cs | 16 +- .../ExtensionStatus.PowerShell.cs | 78 +- .../ExtensionStatus.TypeConverter.cs | 32 +- .../ExtensionStatus.cs | 6 +- .../ExtensionStatus.json.cs | 16 +- .../ExtensionsList.PowerShell.cs | 48 +- .../ExtensionsList.TypeConverter.cs | 32 +- .../ExtensionsList.cs | 20 +- .../ExtensionsList.json.cs | 18 +- .../FluxConfiguration.PowerShell.cs | 526 ++++ .../FluxConfiguration.TypeConverter.cs} | 52 +- .../Models/Api20220301/FluxConfiguration.cs | 795 ++++++ .../Api20220301/FluxConfiguration.json.cs | 115 + .../FluxConfigurationPatch.PowerShell.cs | 366 +++ .../FluxConfigurationPatch.TypeConverter.cs | 147 + .../Api20220301/FluxConfigurationPatch.cs | 453 ++++ .../FluxConfigurationPatch.json.cs} | 50 +- ...ConfigurationPatchProperties.PowerShell.cs | 358 +++ ...figurationPatchProperties.TypeConverter.cs | 148 + .../FluxConfigurationPatchProperties.cs | 467 ++++ .../FluxConfigurationPatchProperties.json.cs | 118 + ...figurationProtectedSettings.PowerShell.cs} | 61 +- ...gurationProtectedSettings.TypeConverter.cs | 153 ++ ...ropertiesConfigurationProtectedSettings.cs | 37 + ...nfigurationProtectedSettings.dictionary.cs | 75 + ...tiesConfigurationProtectedSettings.json.cs | 112 + ...atchPropertiesKustomizations.PowerShell.cs | 167 ++ ...hPropertiesKustomizations.TypeConverter.cs | 151 ++ ...figurationPatchPropertiesKustomizations.cs | 39 + ...atchPropertiesKustomizations.dictionary.cs | 75 + ...ationPatchPropertiesKustomizations.json.cs | 114 + .../FluxConfigurationProperties.PowerShell.cs | 438 +++ ...uxConfigurationProperties.TypeConverter.cs | 147 + .../FluxConfigurationProperties.cs | 691 +++++ .../FluxConfigurationProperties.json.cs | 170 ++ ...nfigurationProtectedSettings.PowerShell.cs | 165 ++ ...gurationProtectedSettings.TypeConverter.cs | 153 ++ ...ropertiesConfigurationProtectedSettings.cs | 37 + ...nfigurationProtectedSettings.dictionary.cs | 75 + ...iesConfigurationProtectedSettings.json.cs} | 41 +- ...ionPropertiesKustomizations.PowerShell.cs} | 71 +- ...PropertiesKustomizations.TypeConverter.cs} | 53 +- ...uxConfigurationPropertiesKustomizations.cs | 39 + ...tionPropertiesKustomizations.dictionary.cs | 75 + ...figurationPropertiesKustomizations.json.cs | 113 + .../FluxConfigurationsList.PowerShell.cs} | 76 +- .../FluxConfigurationsList.TypeConverter.cs | 147 + .../Api20220301/FluxConfigurationsList.cs | 79 + .../FluxConfigurationsList.json.cs} | 66 +- .../GitRepositoryDefinition.PowerShell.cs | 254 ++ .../GitRepositoryDefinition.TypeConverter.cs | 147 + .../Api20220301/GitRepositoryDefinition.cs | 266 ++ .../GitRepositoryDefinition.json.cs | 122 + ...GitRepositoryPatchDefinition.PowerShell.cs | 254 ++ ...epositoryPatchDefinition.TypeConverter.cs} | 55 +- .../GitRepositoryPatchDefinition.cs | 266 ++ .../GitRepositoryPatchDefinition.json.cs | 122 + .../HelmOperatorProperties.PowerShell.cs | 48 +- .../HelmOperatorProperties.TypeConverter.cs | 32 +- .../HelmOperatorProperties.cs | 6 +- .../HelmOperatorProperties.json.cs | 16 +- ...mReleasePropertiesDefinition.PowerShell.cs | 214 ++ ...leasePropertiesDefinition.TypeConverter.cs | 148 + .../HelmReleasePropertiesDefinition.cs | 142 + .../HelmReleasePropertiesDefinition.json.cs | 116 + .../KustomizationDefinition.PowerShell.cs | 224 ++ .../KustomizationDefinition.TypeConverter.cs | 147 + .../Api20220301/KustomizationDefinition.cs | 202 ++ .../KustomizationDefinition.json.cs | 135 + ...KustomizationPatchDefinition.PowerShell.cs | 216 ++ ...tomizationPatchDefinition.TypeConverter.cs | 147 + .../KustomizationPatchDefinition.cs | 182 ++ .../KustomizationPatchDefinition.json.cs | 130 + .../ObjectReferenceDefinition.PowerShell.cs | 174 ++ ...ObjectReferenceDefinition.TypeConverter.cs | 147 + .../Api20220301/ObjectReferenceDefinition.cs | 68 + .../ObjectReferenceDefinition.json.cs} | 54 +- ...ectStatusConditionDefinition.PowerShell.cs | 198 ++ ...StatusConditionDefinition.TypeConverter.cs | 148 + .../ObjectStatusConditionDefinition.cs | 119 + .../ObjectStatusConditionDefinition.json.cs} | 55 +- .../ObjectStatusDefinition.PowerShell.cs | 288 ++ .../ObjectStatusDefinition.TypeConverter.cs | 147 + .../Api20220301/ObjectStatusDefinition.cs | 268 ++ .../ObjectStatusDefinition.json.cs | 130 + .../OperationStatusList.PowerShell.cs | 48 +- .../OperationStatusList.TypeConverter.cs | 32 +- .../OperationStatusList.cs | 20 +- .../OperationStatusList.json.cs | 18 +- .../OperationStatusResult.PowerShell.cs | 238 ++ .../OperationStatusResult.TypeConverter.cs | 32 +- .../OperationStatusResult.cs | 36 +- .../OperationStatusResult.json.cs | 23 +- ...rationStatusResultProperties.PowerShell.cs | 28 +- ...ionStatusResultProperties.TypeConverter.cs | 33 +- .../OperationStatusResultProperties.cs | 6 +- ...rationStatusResultProperties.dictionary.cs | 4 +- .../OperationStatusResultProperties.json.cs | 16 +- .../PatchExtension.PowerShell.cs | 88 +- .../PatchExtension.TypeConverter.cs | 32 +- .../PatchExtension.cs | 36 +- .../PatchExtension.json.cs | 18 +- .../PatchExtensionProperties.PowerShell.cs | 78 +- .../PatchExtensionProperties.TypeConverter.cs | 32 +- .../PatchExtensionProperties.cs | 26 +- .../PatchExtensionProperties.json.cs | 20 +- ...nfigurationProtectedSettings.PowerShell.cs | 30 +- ...gurationProtectedSettings.TypeConverter.cs | 33 +- ...ropertiesConfigurationProtectedSettings.cs | 6 +- ...nfigurationProtectedSettings.dictionary.cs | 4 +- ...tiesConfigurationProtectedSettings.json.cs | 16 +- ...pertiesConfigurationSettings.PowerShell.cs | 30 +- ...tiesConfigurationSettings.TypeConverter.cs | 33 +- ...xtensionPropertiesConfigurationSettings.cs | 6 +- ...pertiesConfigurationSettings.dictionary.cs | 4 +- ...ionPropertiesConfigurationSettings.json.cs | 16 +- .../RepositoryRefDefinition.PowerShell.cs} | 87 +- .../RepositoryRefDefinition.TypeConverter.cs | 147 + .../Api20220301/RepositoryRefDefinition.cs | 114 + .../RepositoryRefDefinition.json.cs | 114 + .../ResourceProviderOperation.PowerShell.cs | 222 ++ ...ResourceProviderOperation.TypeConverter.cs | 32 +- .../ResourceProviderOperation.cs | 44 +- .../ResourceProviderOperation.json.cs | 23 +- ...urceProviderOperationDisplay.PowerShell.cs | 68 +- ...eProviderOperationDisplay.TypeConverter.cs | 33 +- .../ResourceProviderOperationDisplay.cs | 6 +- .../ResourceProviderOperationDisplay.json.cs | 16 +- ...esourceProviderOperationList.PowerShell.cs | 48 +- ...urceProviderOperationList.TypeConverter.cs | 32 +- .../ResourceProviderOperationList.cs | 18 +- .../ResourceProviderOperationList.json.cs | 18 +- .../Scope.PowerShell.cs | 68 +- .../Scope.TypeConverter.cs | 31 +- .../{Api20210901 => Api20220301}/Scope.cs | 26 +- .../Scope.json.cs | 20 +- .../ScopeCluster.PowerShell.cs | 38 +- .../ScopeCluster.TypeConverter.cs | 32 +- .../ScopeCluster.cs | 6 +- .../ScopeCluster.json.cs | 16 +- .../ScopeNamespace.PowerShell.cs | 38 +- .../ScopeNamespace.TypeConverter.cs | 32 +- .../ScopeNamespace.cs | 6 +- .../ScopeNamespace.json.cs | 16 +- .../SourceControlConfiguration.PowerShell.cs | 398 +++ ...ourceControlConfiguration.TypeConverter.cs | 32 +- .../SourceControlConfiguration.cs | 103 +- .../SourceControlConfiguration.json.cs | 18 +- ...urceControlConfigurationList.PowerShell.cs | 48 +- ...eControlConfigurationList.TypeConverter.cs | 33 +- .../SourceControlConfigurationList.cs | 20 +- .../SourceControlConfigurationList.json.cs | 18 +- ...ntrolConfigurationProperties.PowerShell.cs | 312 +++ ...olConfigurationProperties.TypeConverter.cs | 33 +- .../SourceControlConfigurationProperties.cs | 50 +- ...urceControlConfigurationProperties.json.cs | 22 +- ...ernetesConfigurationIdentity.PowerShell.cs | 106 +- ...etesConfigurationIdentity.TypeConverter.cs | 27 +- .../Models/KubernetesConfigurationIdentity.cs | 61 +- .../KubernetesConfigurationIdentity.json.cs | 14 +- .../api/Support/AksIdentityType.Completer.cs | 39 + .../Support/AksIdentityType.TypeConverter.cs | 59 + .../generated/api/Support/AksIdentityType.cs | 98 + .../ComplianceStateType.TypeConverter.cs | 20 +- .../api/Support/ComplianceStateType.cs | 10 +- .../Support/CreatedByType.TypeConverter.cs | 20 +- .../generated/api/Support/CreatedByType.cs | 10 +- .../Support/FluxComplianceState.Completer.cs | 51 + .../FluxComplianceState.TypeConverter.cs | 59 + .../api/Support/FluxComplianceState.cs | 104 + .../KustomizationValidationType.Completer.cs | 45 + ...stomizationValidationType.TypeConverter.cs | 61 + .../Support/KustomizationValidationType.cs | 106 + .../api/Support/LevelType.TypeConverter.cs | 20 +- .../generated/api/Support/LevelType.cs | 10 +- .../Support/MessageLevelType.TypeConverter.cs | 20 +- .../generated/api/Support/MessageLevelType.cs | 10 +- .../OperatorScopeType.TypeConverter.cs | 20 +- .../api/Support/OperatorScopeType.cs | 10 +- .../api/Support/OperatorType.TypeConverter.cs | 20 +- .../generated/api/Support/OperatorType.cs | 10 +- .../Support/ProvisioningState.Completer.cs | 2 +- .../ProvisioningState.TypeConverter.cs | 22 +- .../api/Support/ProvisioningState.cs | 12 +- .../ProvisioningStateType.TypeConverter.cs | 20 +- .../api/Support/ProvisioningStateType.cs | 10 +- .../ResourceIdentityType.TypeConverter.cs | 20 +- .../api/Support/ResourceIdentityType.cs | 10 +- .../api/Support/ScopeType.Completer.cs | 39 + .../api/Support/ScopeType.TypeConverter.cs | 59 + .../generated/api/Support/ScopeType.cs | 98 + .../api/Support/SourceKindType.Completer.cs | 39 + .../Support/SourceKindType.TypeConverter.cs | 59 + .../generated/api/Support/SourceKindType.cs | 98 + ...KubernetesConfigFluxOperationStatus_Get.cs | 465 ++++ ...onfigFluxOperationStatus_GetViaIdentity.cs | 400 +++ .../GetAzKubernetesConfigurationFlux_Get.cs | 452 ++++ ...rnetesConfigurationFlux_GetViaIdentity.cs} | 125 +- .../GetAzKubernetesConfigurationFlux_List.cs | 459 ++++ .../GetAzKubernetesConfiguration_Get.cs | 70 +- ...zKubernetesConfiguration_GetViaIdentity.cs | 42 +- .../GetAzKubernetesConfiguration_List.cs | 68 +- .../cmdlets/GetAzKubernetesExtension_Get.cs | 64 +- ...GetAzKubernetesExtension_GetViaIdentity.cs | 42 +- .../cmdlets/GetAzKubernetesExtension_List.cs | 62 +- .../generated/cmdlets/GetAzOperation_List.cs | 40 +- ...ernetesConfigurationFlux_CreateExpanded.cs | 860 ++++++ ...zKubernetesConfiguration_CreateExpanded.cs | 125 +- ...NewAzKubernetesExtension_CreateExpanded.cs | 117 +- ...oveAzKubernetesConfigurationFlux_Delete.cs | 577 ++++ ...etesConfigurationFlux_DeleteViaIdentity.cs | 518 ++++ .../RemoveAzKubernetesConfiguration_Delete.cs | 54 +- ...bernetesConfiguration_DeleteViaIdentity.cs | 26 +- .../RemoveAzKubernetesExtension_Delete.cs | 48 +- ...AzKubernetesExtension_DeleteViaIdentity.cs | 26 +- ...ernetesConfigurationFlux_UpdateExpanded.cs | 859 ++++++ ...ernetesConfigurationFlux_UpdateExpanded.cs | 798 ++++++ ...igurationFlux_UpdateViaIdentityExpanded.cs | 741 +++++ ...ateAzKubernetesExtension_UpdateExpanded.cs | 111 +- ...etesExtension_UpdateViaIdentityExpanded.cs | 91 +- .../runtime/AsyncOperationResponse.cs | 21 +- .../runtime/BuildTime/Cmdlets/ExportPsd1.cs | 2 +- .../BuildTime/Models/PsHelpMarkdownOutputs.cs | 44 +- .../runtime/BuildTime/Models/PsHelpTypes.cs | 3 + .../BuildTime/Models/PsMarkdownTypes.cs | 21 +- .../BuildTime/Models/PsProxyOutputs.cs | 96 +- .../runtime/BuildTime/Models/PsProxyTypes.cs | 6 +- .../Customizations/IJsonSerializable.cs | 20 +- .../generated/runtime/EventDataExtensions.cs | 2 +- .../generated/runtime/ISendAsync.cs | 10 +- .../generated/runtime/MessageAttribute.cs | 2 +- .../runtime/TypeConverterExtensions.cs | 41 +- .../runtime/UndeclaredResponseException.cs | 5 +- .../help/Az.KubernetesConfiguration.md | 15 + ...t-AzKubernetesConfigFluxOperationStatus.md | 204 ++ .../help/Get-AzKubernetesConfiguration.md | 41 +- .../help/Get-AzKubernetesConfigurationFlux.md | 205 ++ .../help/Get-AzKubernetesExtension.md | 39 +- .../help/New-AzKubernetesConfiguration.md | 54 +- .../help/New-AzKubernetesConfigurationFlux.md | 594 ++++ .../help/New-AzKubernetesExtension.md | 45 +- .../help/Remove-AzKubernetesConfiguration.md | 29 +- .../Remove-AzKubernetesConfigurationFlux.md | 285 ++ .../help/Remove-AzKubernetesExtension.md | 19 +- .../Update-AzKubernetesConfigurationFlux.md | 610 +++++ .../help/Update-AzKubernetesExtension.md | 28 +- ...-AzKubernetesConfigFluxOperationStatus.ps1 | 202 ++ .../Get-AzKubernetesConfiguration.ps1 | 51 +- .../Get-AzKubernetesConfigurationFlux.ps1 | 209 ++ .../internal/Get-AzKubernetesExtension.ps1 | 49 +- .../internal/Get-AzOperation.ps1 | 24 +- .../New-AzKubernetesConfiguration.ps1 | 44 +- .../New-AzKubernetesConfigurationFlux.ps1 | 349 +++ .../internal/New-AzKubernetesExtension.ps1 | 49 +- .../internal/ProxyCmdletDefinitions.ps1 | 2378 ++++++++++++++--- .../internal/README.md | 4 +- .../Remove-AzKubernetesConfiguration.ps1 | 35 +- .../Remove-AzKubernetesConfigurationFlux.ps1 | 221 ++ .../internal/Remove-AzKubernetesExtension.ps1 | 30 +- .../Set-AzKubernetesConfigurationFlux.ps1 | 333 +++ .../Update-AzKubernetesConfigurationFlux.ps1 | 354 +++ .../internal/Update-AzKubernetesExtension.ps1 | 44 +- .../AzKubernetesConfiguration.Recording.json | 360 +-- .../test/AzKubernetesConfiguration.Tests.ps1 | 32 +- ...KubernetesConfigurationFlux.Recording.json | 1736 ++++++++++++ .../AzKubernetesConfigurationFlux.Tests.ps1 | 147 + .../test/AzKubernetesExtension.Recording.json | 908 +++---- .../test/AzKubernetesExtension.Tests.ps1 | 36 +- ...ernetesConfigFluxOperationStatus.Tests.ps1 | 25 + ...et-AzKubernetesConfigurationFlux.Tests.ps1 | 29 + ...ew-AzKubernetesConfigurationFlux.Tests.ps1 | 21 + ...ve-AzKubernetesConfigurationFlux.Tests.ps1 | 25 + ...te-AzKubernetesConfigurationFlux.Tests.ps1 | 25 + src/KubernetesConfiguration/test/env.json | 20 +- src/KubernetesConfiguration/test/utils.ps1 | 61 +- 404 files changed, 43025 insertions(+), 7522 deletions(-) create mode 100644 src/KubernetesConfiguration/custom/Get-AzKubernetesConfigFluxOperationStatus.ps1 create mode 100644 src/KubernetesConfiguration/custom/Get-AzKubernetesConfigurationFlux.ps1 create mode 100644 src/KubernetesConfiguration/custom/New-AzKubernetesConfigurationFlux.ps1 create mode 100644 src/KubernetesConfiguration/custom/Remove-AzKubernetesConfigurationFlux.ps1 create mode 100644 src/KubernetesConfiguration/custom/Update-AzKubernetesConfigurationFlux.ps1 create mode 100644 src/KubernetesConfiguration/examples/Get-AzKubernetesConfigFluxOperationStatus.md create mode 100644 src/KubernetesConfiguration/examples/Get-AzKubernetesConfigurationFlux.md create mode 100644 src/KubernetesConfiguration/examples/New-AzKubernetesConfigurationFlux.md create mode 100644 src/KubernetesConfiguration/examples/Remove-AzKubernetesConfigurationFlux.md create mode 100644 src/KubernetesConfiguration/examples/Update-AzKubernetesConfigurationFlux.md create mode 100644 src/KubernetesConfiguration/exports/Get-AzKubernetesConfigFluxOperationStatus.ps1 create mode 100644 src/KubernetesConfiguration/exports/Get-AzKubernetesConfigurationFlux.ps1 create mode 100644 src/KubernetesConfiguration/exports/New-AzKubernetesConfigurationFlux.ps1 create mode 100644 src/KubernetesConfiguration/exports/Remove-AzKubernetesConfigurationFlux.ps1 create mode 100644 src/KubernetesConfiguration/exports/Update-AzKubernetesConfigurationFlux.ps1 create mode 100644 src/KubernetesConfiguration/generated/api/Models/Api20/ErrorResponse.PowerShell.cs rename src/KubernetesConfiguration/generated/api/Models/{Api20210301 => Api20}/ErrorResponse.TypeConverter.cs (82%) rename src/KubernetesConfiguration/generated/api/Models/Api20/{ErrorResponseAutoGenerated.cs => ErrorResponse.cs} (78%) rename src/KubernetesConfiguration/generated/api/Models/{Api20210301 => Api20}/ErrorResponse.json.cs (84%) delete mode 100644 src/KubernetesConfiguration/generated/api/Models/Api20/ErrorResponseAutoGenerated.PowerShell.cs delete mode 100644 src/KubernetesConfiguration/generated/api/Models/Api20210301/ErrorDefinition.cs delete mode 100644 src/KubernetesConfiguration/generated/api/Models/Api20210301/ErrorResponse.cs delete mode 100644 src/KubernetesConfiguration/generated/api/Models/Api20210301/ResourceProviderOperation.PowerShell.cs delete mode 100644 src/KubernetesConfiguration/generated/api/Models/Api20210301/Result.cs delete mode 100644 src/KubernetesConfiguration/generated/api/Models/Api20210301/SourceControlConfiguration.PowerShell.cs delete mode 100644 src/KubernetesConfiguration/generated/api/Models/Api20210301/SourceControlConfigurationProperties.PowerShell.cs delete mode 100644 src/KubernetesConfiguration/generated/api/Models/Api20210901/Extension.PowerShell.cs delete mode 100644 src/KubernetesConfiguration/generated/api/Models/Api20210901/ExtensionProperties.PowerShell.cs delete mode 100644 src/KubernetesConfiguration/generated/api/Models/Api20210901/OperationStatusResult.PowerShell.cs delete mode 100644 src/KubernetesConfiguration/generated/api/Models/Api20210901/ResourceProviderOperationAutoGenerated.PowerShell.cs delete mode 100644 src/KubernetesConfiguration/generated/api/Models/Api20210901/ResourceProviderOperationAutoGenerated.cs delete mode 100644 src/KubernetesConfiguration/generated/api/Models/Api20210901/ResourceProviderOperationListAutoGenerated.cs create mode 100644 src/KubernetesConfiguration/generated/api/Models/Api20220301/BucketDefinition.PowerShell.cs rename src/KubernetesConfiguration/generated/api/Models/{Api20210301/Result.TypeConverter.cs => Api20220301/BucketDefinition.TypeConverter.cs} (71%) create mode 100644 src/KubernetesConfiguration/generated/api/Models/Api20220301/BucketDefinition.cs create mode 100644 src/KubernetesConfiguration/generated/api/Models/Api20220301/BucketDefinition.json.cs create mode 100644 src/KubernetesConfiguration/generated/api/Models/Api20220301/BucketPatchDefinition.PowerShell.cs rename src/KubernetesConfiguration/generated/api/Models/{Api20/ErrorResponseAutoGenerated.TypeConverter.cs => Api20220301/BucketPatchDefinition.TypeConverter.cs} (70%) create mode 100644 src/KubernetesConfiguration/generated/api/Models/Api20220301/BucketPatchDefinition.cs create mode 100644 src/KubernetesConfiguration/generated/api/Models/Api20220301/BucketPatchDefinition.json.cs rename src/KubernetesConfiguration/generated/api/Models/{Api20210301 => Api20220301}/ComplianceStatus.PowerShell.cs (59%) rename src/KubernetesConfiguration/generated/api/Models/{Api20210301 => Api20220301}/ComplianceStatus.TypeConverter.cs (82%) rename src/KubernetesConfiguration/generated/api/Models/{Api20210301 => Api20220301}/ComplianceStatus.cs (97%) rename src/KubernetesConfiguration/generated/api/Models/{Api20210301 => Api20220301}/ComplianceStatus.json.cs (93%) rename src/KubernetesConfiguration/generated/api/Models/{Api20210301 => Api20220301}/ConfigurationProtectedSettings.PowerShell.cs (90%) rename src/KubernetesConfiguration/generated/api/Models/{Api20210301 => Api20220301}/ConfigurationProtectedSettings.TypeConverter.cs (82%) rename src/KubernetesConfiguration/generated/api/Models/{Api20210301 => Api20220301}/ConfigurationProtectedSettings.cs (91%) rename src/KubernetesConfiguration/generated/api/Models/{Api20210301 => Api20220301}/ConfigurationProtectedSettings.dictionary.cs (98%) rename src/KubernetesConfiguration/generated/api/Models/{Api20210301 => Api20220301}/ConfigurationProtectedSettings.json.cs (91%) create mode 100644 src/KubernetesConfiguration/generated/api/Models/Api20220301/Extension.PowerShell.cs rename src/KubernetesConfiguration/generated/api/Models/{Api20210901 => Api20220301}/Extension.TypeConverter.cs (82%) rename src/KubernetesConfiguration/generated/api/Models/{Api20210901 => Api20220301}/Extension.cs (82%) rename src/KubernetesConfiguration/generated/api/Models/{Api20210901 => Api20220301}/Extension.json.cs (92%) create mode 100644 src/KubernetesConfiguration/generated/api/Models/Api20220301/ExtensionProperties.PowerShell.cs rename src/KubernetesConfiguration/generated/api/Models/{Api20210901 => Api20220301}/ExtensionProperties.TypeConverter.cs (82%) rename src/KubernetesConfiguration/generated/api/Models/{Api20210901 => Api20220301}/ExtensionProperties.cs (80%) rename src/KubernetesConfiguration/generated/api/Models/{Api20210901 => Api20220301}/ExtensionProperties.json.cs (85%) rename src/KubernetesConfiguration/generated/api/Models/{Api20210901 => Api20220301}/ExtensionPropertiesAksAssignedIdentity.PowerShell.cs (67%) rename src/KubernetesConfiguration/generated/api/Models/{Api20210901 => Api20220301}/ExtensionPropertiesAksAssignedIdentity.TypeConverter.cs (82%) rename src/KubernetesConfiguration/generated/api/Models/{Api20210901 => Api20220301}/ExtensionPropertiesAksAssignedIdentity.cs (88%) rename src/KubernetesConfiguration/generated/api/Models/{Api20210901 => Api20220301}/ExtensionPropertiesAksAssignedIdentity.json.cs (93%) rename src/KubernetesConfiguration/generated/api/Models/{Api20210901 => Api20220301}/ExtensionPropertiesConfigurationProtectedSettings.PowerShell.cs (89%) rename src/KubernetesConfiguration/generated/api/Models/{Api20210901 => Api20220301}/ExtensionPropertiesConfigurationProtectedSettings.TypeConverter.cs (82%) rename src/KubernetesConfiguration/generated/api/Models/{Api20210901 => Api20220301}/ExtensionPropertiesConfigurationProtectedSettings.cs (91%) rename src/KubernetesConfiguration/generated/api/Models/{Api20210901 => Api20220301}/ExtensionPropertiesConfigurationProtectedSettings.dictionary.cs (98%) rename src/KubernetesConfiguration/generated/api/Models/{Api20210901 => Api20220301}/ExtensionPropertiesConfigurationProtectedSettings.json.cs (92%) rename src/KubernetesConfiguration/generated/api/Models/{Api20210901 => Api20220301}/ExtensionPropertiesConfigurationSettings.PowerShell.cs (89%) rename src/KubernetesConfiguration/generated/api/Models/{Api20210901 => Api20220301}/ExtensionPropertiesConfigurationSettings.TypeConverter.cs (82%) rename src/KubernetesConfiguration/generated/api/Models/{Api20210901 => Api20220301}/ExtensionPropertiesConfigurationSettings.cs (91%) rename src/KubernetesConfiguration/generated/api/Models/{Api20210901 => Api20220301}/ExtensionPropertiesConfigurationSettings.dictionary.cs (98%) rename src/KubernetesConfiguration/generated/api/Models/{Api20210901 => Api20220301}/ExtensionPropertiesConfigurationSettings.json.cs (91%) rename src/KubernetesConfiguration/generated/api/Models/{Api20210901 => Api20220301}/ExtensionPropertiesCustomLocationSettings.PowerShell.cs (89%) rename src/KubernetesConfiguration/generated/api/Models/{Api20210901 => Api20220301}/ExtensionPropertiesCustomLocationSettings.TypeConverter.cs (82%) rename src/KubernetesConfiguration/generated/api/Models/{Api20210901 => Api20220301}/ExtensionPropertiesCustomLocationSettings.cs (90%) rename src/KubernetesConfiguration/generated/api/Models/{Api20210901 => Api20220301}/ExtensionPropertiesCustomLocationSettings.dictionary.cs (98%) rename src/KubernetesConfiguration/generated/api/Models/{Api20210901 => Api20220301}/ExtensionPropertiesCustomLocationSettings.json.cs (91%) rename src/KubernetesConfiguration/generated/api/Models/{Api20210901 => Api20220301}/ExtensionStatus.PowerShell.cs (59%) rename src/KubernetesConfiguration/generated/api/Models/{Api20210901 => Api20220301}/ExtensionStatus.TypeConverter.cs (82%) rename src/KubernetesConfiguration/generated/api/Models/{Api20210901 => Api20220301}/ExtensionStatus.cs (98%) rename src/KubernetesConfiguration/generated/api/Models/{Api20210901 => Api20220301}/ExtensionStatus.json.cs (93%) rename src/KubernetesConfiguration/generated/api/Models/{Api20210901 => Api20220301}/ExtensionsList.PowerShell.cs (71%) rename src/KubernetesConfiguration/generated/api/Models/{Api20210901 => Api20220301}/ExtensionsList.TypeConverter.cs (82%) rename src/KubernetesConfiguration/generated/api/Models/{Api20210901 => Api20220301}/ExtensionsList.cs (86%) rename src/KubernetesConfiguration/generated/api/Models/{Api20210901 => Api20220301}/ExtensionsList.json.cs (91%) create mode 100644 src/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfiguration.PowerShell.cs rename src/KubernetesConfiguration/generated/api/Models/{Api20210301/ErrorDefinition.TypeConverter.cs => Api20220301/FluxConfiguration.TypeConverter.cs} (71%) create mode 100644 src/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfiguration.cs create mode 100644 src/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfiguration.json.cs create mode 100644 src/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfigurationPatch.PowerShell.cs create mode 100644 src/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfigurationPatch.TypeConverter.cs create mode 100644 src/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfigurationPatch.cs rename src/KubernetesConfiguration/generated/api/Models/{Api20210301/Result.json.cs => Api20220301/FluxConfigurationPatch.json.cs} (73%) create mode 100644 src/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfigurationPatchProperties.PowerShell.cs create mode 100644 src/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfigurationPatchProperties.TypeConverter.cs create mode 100644 src/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfigurationPatchProperties.cs create mode 100644 src/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfigurationPatchProperties.json.cs rename src/KubernetesConfiguration/generated/api/Models/{Api20210301/ErrorDefinition.PowerShell.cs => Api20220301/FluxConfigurationPatchPropertiesConfigurationProtectedSettings.PowerShell.cs} (68%) create mode 100644 src/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfigurationPatchPropertiesConfigurationProtectedSettings.TypeConverter.cs create mode 100644 src/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfigurationPatchPropertiesConfigurationProtectedSettings.cs create mode 100644 src/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfigurationPatchPropertiesConfigurationProtectedSettings.dictionary.cs create mode 100644 src/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfigurationPatchPropertiesConfigurationProtectedSettings.json.cs create mode 100644 src/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfigurationPatchPropertiesKustomizations.PowerShell.cs create mode 100644 src/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfigurationPatchPropertiesKustomizations.TypeConverter.cs create mode 100644 src/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfigurationPatchPropertiesKustomizations.cs create mode 100644 src/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfigurationPatchPropertiesKustomizations.dictionary.cs create mode 100644 src/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfigurationPatchPropertiesKustomizations.json.cs create mode 100644 src/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfigurationProperties.PowerShell.cs create mode 100644 src/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfigurationProperties.TypeConverter.cs create mode 100644 src/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfigurationProperties.cs create mode 100644 src/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfigurationProperties.json.cs create mode 100644 src/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfigurationPropertiesConfigurationProtectedSettings.PowerShell.cs create mode 100644 src/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfigurationPropertiesConfigurationProtectedSettings.TypeConverter.cs create mode 100644 src/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfigurationPropertiesConfigurationProtectedSettings.cs create mode 100644 src/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfigurationPropertiesConfigurationProtectedSettings.dictionary.cs rename src/KubernetesConfiguration/generated/api/Models/{Api20/ErrorResponseAutoGenerated.json.cs => Api20220301/FluxConfigurationPropertiesConfigurationProtectedSettings.json.cs} (69%) rename src/KubernetesConfiguration/generated/api/Models/{Api20210301/Result.PowerShell.cs => Api20220301/FluxConfigurationPropertiesKustomizations.PowerShell.cs} (70%) rename src/KubernetesConfiguration/generated/api/Models/{Api20210901/ResourceProviderOperationListAutoGenerated.TypeConverter.cs => Api20220301/FluxConfigurationPropertiesKustomizations.TypeConverter.cs} (68%) create mode 100644 src/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfigurationPropertiesKustomizations.cs create mode 100644 src/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfigurationPropertiesKustomizations.dictionary.cs create mode 100644 src/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfigurationPropertiesKustomizations.json.cs rename src/KubernetesConfiguration/generated/api/Models/{Api20210301/ErrorResponse.PowerShell.cs => Api20220301/FluxConfigurationsList.PowerShell.cs} (59%) create mode 100644 src/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfigurationsList.TypeConverter.cs create mode 100644 src/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfigurationsList.cs rename src/KubernetesConfiguration/generated/api/Models/{Api20210901/ResourceProviderOperationListAutoGenerated.json.cs => Api20220301/FluxConfigurationsList.json.cs} (72%) create mode 100644 src/KubernetesConfiguration/generated/api/Models/Api20220301/GitRepositoryDefinition.PowerShell.cs create mode 100644 src/KubernetesConfiguration/generated/api/Models/Api20220301/GitRepositoryDefinition.TypeConverter.cs create mode 100644 src/KubernetesConfiguration/generated/api/Models/Api20220301/GitRepositoryDefinition.cs create mode 100644 src/KubernetesConfiguration/generated/api/Models/Api20220301/GitRepositoryDefinition.json.cs create mode 100644 src/KubernetesConfiguration/generated/api/Models/Api20220301/GitRepositoryPatchDefinition.PowerShell.cs rename src/KubernetesConfiguration/generated/api/Models/{Api20210901/ResourceProviderOperationAutoGenerated.TypeConverter.cs => Api20220301/GitRepositoryPatchDefinition.TypeConverter.cs} (68%) create mode 100644 src/KubernetesConfiguration/generated/api/Models/Api20220301/GitRepositoryPatchDefinition.cs create mode 100644 src/KubernetesConfiguration/generated/api/Models/Api20220301/GitRepositoryPatchDefinition.json.cs rename src/KubernetesConfiguration/generated/api/Models/{Api20210301 => Api20220301}/HelmOperatorProperties.PowerShell.cs (75%) rename src/KubernetesConfiguration/generated/api/Models/{Api20210301 => Api20220301}/HelmOperatorProperties.TypeConverter.cs (82%) rename src/KubernetesConfiguration/generated/api/Models/{Api20210301 => Api20220301}/HelmOperatorProperties.cs (96%) rename src/KubernetesConfiguration/generated/api/Models/{Api20210301 => Api20220301}/HelmOperatorProperties.json.cs (92%) create mode 100644 src/KubernetesConfiguration/generated/api/Models/Api20220301/HelmReleasePropertiesDefinition.PowerShell.cs create mode 100644 src/KubernetesConfiguration/generated/api/Models/Api20220301/HelmReleasePropertiesDefinition.TypeConverter.cs create mode 100644 src/KubernetesConfiguration/generated/api/Models/Api20220301/HelmReleasePropertiesDefinition.cs create mode 100644 src/KubernetesConfiguration/generated/api/Models/Api20220301/HelmReleasePropertiesDefinition.json.cs create mode 100644 src/KubernetesConfiguration/generated/api/Models/Api20220301/KustomizationDefinition.PowerShell.cs create mode 100644 src/KubernetesConfiguration/generated/api/Models/Api20220301/KustomizationDefinition.TypeConverter.cs create mode 100644 src/KubernetesConfiguration/generated/api/Models/Api20220301/KustomizationDefinition.cs create mode 100644 src/KubernetesConfiguration/generated/api/Models/Api20220301/KustomizationDefinition.json.cs create mode 100644 src/KubernetesConfiguration/generated/api/Models/Api20220301/KustomizationPatchDefinition.PowerShell.cs create mode 100644 src/KubernetesConfiguration/generated/api/Models/Api20220301/KustomizationPatchDefinition.TypeConverter.cs create mode 100644 src/KubernetesConfiguration/generated/api/Models/Api20220301/KustomizationPatchDefinition.cs create mode 100644 src/KubernetesConfiguration/generated/api/Models/Api20220301/KustomizationPatchDefinition.json.cs create mode 100644 src/KubernetesConfiguration/generated/api/Models/Api20220301/ObjectReferenceDefinition.PowerShell.cs create mode 100644 src/KubernetesConfiguration/generated/api/Models/Api20220301/ObjectReferenceDefinition.TypeConverter.cs create mode 100644 src/KubernetesConfiguration/generated/api/Models/Api20220301/ObjectReferenceDefinition.cs rename src/KubernetesConfiguration/generated/api/Models/{Api20210301/ErrorDefinition.json.cs => Api20220301/ObjectReferenceDefinition.json.cs} (70%) create mode 100644 src/KubernetesConfiguration/generated/api/Models/Api20220301/ObjectStatusConditionDefinition.PowerShell.cs create mode 100644 src/KubernetesConfiguration/generated/api/Models/Api20220301/ObjectStatusConditionDefinition.TypeConverter.cs create mode 100644 src/KubernetesConfiguration/generated/api/Models/Api20220301/ObjectStatusConditionDefinition.cs rename src/KubernetesConfiguration/generated/api/Models/{Api20210901/ResourceProviderOperationAutoGenerated.json.cs => Api20220301/ObjectStatusConditionDefinition.json.cs} (57%) create mode 100644 src/KubernetesConfiguration/generated/api/Models/Api20220301/ObjectStatusDefinition.PowerShell.cs create mode 100644 src/KubernetesConfiguration/generated/api/Models/Api20220301/ObjectStatusDefinition.TypeConverter.cs create mode 100644 src/KubernetesConfiguration/generated/api/Models/Api20220301/ObjectStatusDefinition.cs create mode 100644 src/KubernetesConfiguration/generated/api/Models/Api20220301/ObjectStatusDefinition.json.cs rename src/KubernetesConfiguration/generated/api/Models/{Api20210901 => Api20220301}/OperationStatusList.PowerShell.cs (70%) rename src/KubernetesConfiguration/generated/api/Models/{Api20210901 => Api20220301}/OperationStatusList.TypeConverter.cs (82%) rename src/KubernetesConfiguration/generated/api/Models/{Api20210901 => Api20220301}/OperationStatusList.cs (85%) rename src/KubernetesConfiguration/generated/api/Models/{Api20210901 => Api20220301}/OperationStatusList.json.cs (91%) create mode 100644 src/KubernetesConfiguration/generated/api/Models/Api20220301/OperationStatusResult.PowerShell.cs rename src/KubernetesConfiguration/generated/api/Models/{Api20210901 => Api20220301}/OperationStatusResult.TypeConverter.cs (82%) rename src/KubernetesConfiguration/generated/api/Models/{Api20210901 => Api20220301}/OperationStatusResult.cs (90%) rename src/KubernetesConfiguration/generated/api/Models/{Api20210901 => Api20220301}/OperationStatusResult.json.cs (88%) rename src/KubernetesConfiguration/generated/api/Models/{Api20210901 => Api20220301}/OperationStatusResultProperties.PowerShell.cs (90%) rename src/KubernetesConfiguration/generated/api/Models/{Api20210901 => Api20220301}/OperationStatusResultProperties.TypeConverter.cs (82%) rename src/KubernetesConfiguration/generated/api/Models/{Api20210901 => Api20220301}/OperationStatusResultProperties.cs (90%) rename src/KubernetesConfiguration/generated/api/Models/{Api20210901 => Api20220301}/OperationStatusResultProperties.dictionary.cs (98%) rename src/KubernetesConfiguration/generated/api/Models/{Api20210901 => Api20220301}/OperationStatusResultProperties.json.cs (91%) rename src/KubernetesConfiguration/generated/api/Models/{Api20210901 => Api20220301}/PatchExtension.PowerShell.cs (50%) rename src/KubernetesConfiguration/generated/api/Models/{Api20210901 => Api20220301}/PatchExtension.TypeConverter.cs (82%) rename src/KubernetesConfiguration/generated/api/Models/{Api20210901 => Api20220301}/PatchExtension.cs (84%) rename src/KubernetesConfiguration/generated/api/Models/{Api20210901 => Api20220301}/PatchExtension.json.cs (91%) rename src/KubernetesConfiguration/generated/api/Models/{Api20210901 => Api20220301}/PatchExtensionProperties.PowerShell.cs (54%) rename src/KubernetesConfiguration/generated/api/Models/{Api20210901 => Api20220301}/PatchExtensionProperties.TypeConverter.cs (82%) rename src/KubernetesConfiguration/generated/api/Models/{Api20210901 => Api20220301}/PatchExtensionProperties.cs (90%) rename src/KubernetesConfiguration/generated/api/Models/{Api20210901 => Api20220301}/PatchExtensionProperties.json.cs (92%) rename src/KubernetesConfiguration/generated/api/Models/{Api20210901 => Api20220301}/PatchExtensionPropertiesConfigurationProtectedSettings.PowerShell.cs (89%) rename src/KubernetesConfiguration/generated/api/Models/{Api20210901 => Api20220301}/PatchExtensionPropertiesConfigurationProtectedSettings.TypeConverter.cs (82%) rename src/KubernetesConfiguration/generated/api/Models/{Api20210901 => Api20220301}/PatchExtensionPropertiesConfigurationProtectedSettings.cs (91%) rename src/KubernetesConfiguration/generated/api/Models/{Api20210901 => Api20220301}/PatchExtensionPropertiesConfigurationProtectedSettings.dictionary.cs (98%) rename src/KubernetesConfiguration/generated/api/Models/{Api20210901 => Api20220301}/PatchExtensionPropertiesConfigurationProtectedSettings.json.cs (92%) rename src/KubernetesConfiguration/generated/api/Models/{Api20210901 => Api20220301}/PatchExtensionPropertiesConfigurationSettings.PowerShell.cs (89%) rename src/KubernetesConfiguration/generated/api/Models/{Api20210901 => Api20220301}/PatchExtensionPropertiesConfigurationSettings.TypeConverter.cs (82%) rename src/KubernetesConfiguration/generated/api/Models/{Api20210901 => Api20220301}/PatchExtensionPropertiesConfigurationSettings.cs (91%) rename src/KubernetesConfiguration/generated/api/Models/{Api20210901 => Api20220301}/PatchExtensionPropertiesConfigurationSettings.dictionary.cs (98%) rename src/KubernetesConfiguration/generated/api/Models/{Api20210901 => Api20220301}/PatchExtensionPropertiesConfigurationSettings.json.cs (92%) rename src/KubernetesConfiguration/generated/api/Models/{Api20210901/ResourceProviderOperationListAutoGenerated.PowerShell.cs => Api20220301/RepositoryRefDefinition.PowerShell.cs} (56%) create mode 100644 src/KubernetesConfiguration/generated/api/Models/Api20220301/RepositoryRefDefinition.TypeConverter.cs create mode 100644 src/KubernetesConfiguration/generated/api/Models/Api20220301/RepositoryRefDefinition.cs create mode 100644 src/KubernetesConfiguration/generated/api/Models/Api20220301/RepositoryRefDefinition.json.cs create mode 100644 src/KubernetesConfiguration/generated/api/Models/Api20220301/ResourceProviderOperation.PowerShell.cs rename src/KubernetesConfiguration/generated/api/Models/{Api20210301 => Api20220301}/ResourceProviderOperation.TypeConverter.cs (82%) rename src/KubernetesConfiguration/generated/api/Models/{Api20210301 => Api20220301}/ResourceProviderOperation.cs (79%) rename src/KubernetesConfiguration/generated/api/Models/{Api20210301 => Api20220301}/ResourceProviderOperation.json.cs (85%) rename src/KubernetesConfiguration/generated/api/Models/{Api20210301 => Api20220301}/ResourceProviderOperationDisplay.PowerShell.cs (64%) rename src/KubernetesConfiguration/generated/api/Models/{Api20210301 => Api20220301}/ResourceProviderOperationDisplay.TypeConverter.cs (82%) rename src/KubernetesConfiguration/generated/api/Models/{Api20210301 => Api20220301}/ResourceProviderOperationDisplay.cs (97%) rename src/KubernetesConfiguration/generated/api/Models/{Api20210301 => Api20220301}/ResourceProviderOperationDisplay.json.cs (93%) rename src/KubernetesConfiguration/generated/api/Models/{Api20210301 => Api20220301}/ResourceProviderOperationList.PowerShell.cs (70%) rename src/KubernetesConfiguration/generated/api/Models/{Api20210301 => Api20220301}/ResourceProviderOperationList.TypeConverter.cs (82%) rename src/KubernetesConfiguration/generated/api/Models/{Api20210301 => Api20220301}/ResourceProviderOperationList.cs (87%) rename src/KubernetesConfiguration/generated/api/Models/{Api20210301 => Api20220301}/ResourceProviderOperationList.json.cs (90%) rename src/KubernetesConfiguration/generated/api/Models/{Api20210901 => Api20220301}/Scope.PowerShell.cs (60%) rename src/KubernetesConfiguration/generated/api/Models/{Api20210901 => Api20220301}/Scope.TypeConverter.cs (82%) rename src/KubernetesConfiguration/generated/api/Models/{Api20210901 => Api20220301}/Scope.cs (83%) rename src/KubernetesConfiguration/generated/api/Models/{Api20210901 => Api20220301}/Scope.json.cs (90%) rename src/KubernetesConfiguration/generated/api/Models/{Api20210901 => Api20220301}/ScopeCluster.PowerShell.cs (81%) rename src/KubernetesConfiguration/generated/api/Models/{Api20210901 => Api20220301}/ScopeCluster.TypeConverter.cs (82%) rename src/KubernetesConfiguration/generated/api/Models/{Api20210901 => Api20220301}/ScopeCluster.cs (96%) rename src/KubernetesConfiguration/generated/api/Models/{Api20210901 => Api20220301}/ScopeCluster.json.cs (92%) rename src/KubernetesConfiguration/generated/api/Models/{Api20210901 => Api20220301}/ScopeNamespace.PowerShell.cs (81%) rename src/KubernetesConfiguration/generated/api/Models/{Api20210901 => Api20220301}/ScopeNamespace.TypeConverter.cs (82%) rename src/KubernetesConfiguration/generated/api/Models/{Api20210901 => Api20220301}/ScopeNamespace.cs (96%) rename src/KubernetesConfiguration/generated/api/Models/{Api20210901 => Api20220301}/ScopeNamespace.json.cs (91%) create mode 100644 src/KubernetesConfiguration/generated/api/Models/Api20220301/SourceControlConfiguration.PowerShell.cs rename src/KubernetesConfiguration/generated/api/Models/{Api20210301 => Api20220301}/SourceControlConfiguration.TypeConverter.cs (82%) rename src/KubernetesConfiguration/generated/api/Models/{Api20210301 => Api20220301}/SourceControlConfiguration.cs (85%) rename src/KubernetesConfiguration/generated/api/Models/{Api20210301 => Api20220301}/SourceControlConfiguration.json.cs (91%) rename src/KubernetesConfiguration/generated/api/Models/{Api20210301 => Api20220301}/SourceControlConfigurationList.PowerShell.cs (71%) rename src/KubernetesConfiguration/generated/api/Models/{Api20210301 => Api20220301}/SourceControlConfigurationList.TypeConverter.cs (82%) rename src/KubernetesConfiguration/generated/api/Models/{Api20210301 => Api20220301}/SourceControlConfigurationList.cs (86%) rename src/KubernetesConfiguration/generated/api/Models/{Api20210301 => Api20220301}/SourceControlConfigurationList.json.cs (91%) create mode 100644 src/KubernetesConfiguration/generated/api/Models/Api20220301/SourceControlConfigurationProperties.PowerShell.cs rename src/KubernetesConfiguration/generated/api/Models/{Api20210301 => Api20220301}/SourceControlConfigurationProperties.TypeConverter.cs (82%) rename src/KubernetesConfiguration/generated/api/Models/{Api20210301 => Api20220301}/SourceControlConfigurationProperties.cs (91%) rename src/KubernetesConfiguration/generated/api/Models/{Api20210301 => Api20220301}/SourceControlConfigurationProperties.json.cs (94%) create mode 100644 src/KubernetesConfiguration/generated/api/Support/AksIdentityType.Completer.cs create mode 100644 src/KubernetesConfiguration/generated/api/Support/AksIdentityType.TypeConverter.cs create mode 100644 src/KubernetesConfiguration/generated/api/Support/AksIdentityType.cs create mode 100644 src/KubernetesConfiguration/generated/api/Support/FluxComplianceState.Completer.cs create mode 100644 src/KubernetesConfiguration/generated/api/Support/FluxComplianceState.TypeConverter.cs create mode 100644 src/KubernetesConfiguration/generated/api/Support/FluxComplianceState.cs create mode 100644 src/KubernetesConfiguration/generated/api/Support/KustomizationValidationType.Completer.cs create mode 100644 src/KubernetesConfiguration/generated/api/Support/KustomizationValidationType.TypeConverter.cs create mode 100644 src/KubernetesConfiguration/generated/api/Support/KustomizationValidationType.cs create mode 100644 src/KubernetesConfiguration/generated/api/Support/ScopeType.Completer.cs create mode 100644 src/KubernetesConfiguration/generated/api/Support/ScopeType.TypeConverter.cs create mode 100644 src/KubernetesConfiguration/generated/api/Support/ScopeType.cs create mode 100644 src/KubernetesConfiguration/generated/api/Support/SourceKindType.Completer.cs create mode 100644 src/KubernetesConfiguration/generated/api/Support/SourceKindType.TypeConverter.cs create mode 100644 src/KubernetesConfiguration/generated/api/Support/SourceKindType.cs create mode 100644 src/KubernetesConfiguration/generated/cmdlets/GetAzKubernetesConfigFluxOperationStatus_Get.cs create mode 100644 src/KubernetesConfiguration/generated/cmdlets/GetAzKubernetesConfigFluxOperationStatus_GetViaIdentity.cs create mode 100644 src/KubernetesConfiguration/generated/cmdlets/GetAzKubernetesConfigurationFlux_Get.cs rename src/KubernetesConfiguration/generated/cmdlets/{GetAzOperation_List1.cs => GetAzKubernetesConfigurationFlux_GetViaIdentity.cs} (78%) create mode 100644 src/KubernetesConfiguration/generated/cmdlets/GetAzKubernetesConfigurationFlux_List.cs create mode 100644 src/KubernetesConfiguration/generated/cmdlets/NewAzKubernetesConfigurationFlux_CreateExpanded.cs create mode 100644 src/KubernetesConfiguration/generated/cmdlets/RemoveAzKubernetesConfigurationFlux_Delete.cs create mode 100644 src/KubernetesConfiguration/generated/cmdlets/RemoveAzKubernetesConfigurationFlux_DeleteViaIdentity.cs create mode 100644 src/KubernetesConfiguration/generated/cmdlets/SetAzKubernetesConfigurationFlux_UpdateExpanded.cs create mode 100644 src/KubernetesConfiguration/generated/cmdlets/UpdateAzKubernetesConfigurationFlux_UpdateExpanded.cs create mode 100644 src/KubernetesConfiguration/generated/cmdlets/UpdateAzKubernetesConfigurationFlux_UpdateViaIdentityExpanded.cs create mode 100644 src/KubernetesConfiguration/help/Get-AzKubernetesConfigFluxOperationStatus.md create mode 100644 src/KubernetesConfiguration/help/Get-AzKubernetesConfigurationFlux.md create mode 100644 src/KubernetesConfiguration/help/New-AzKubernetesConfigurationFlux.md create mode 100644 src/KubernetesConfiguration/help/Remove-AzKubernetesConfigurationFlux.md create mode 100644 src/KubernetesConfiguration/help/Update-AzKubernetesConfigurationFlux.md create mode 100644 src/KubernetesConfiguration/internal/Get-AzKubernetesConfigFluxOperationStatus.ps1 create mode 100644 src/KubernetesConfiguration/internal/Get-AzKubernetesConfigurationFlux.ps1 create mode 100644 src/KubernetesConfiguration/internal/New-AzKubernetesConfigurationFlux.ps1 create mode 100644 src/KubernetesConfiguration/internal/Remove-AzKubernetesConfigurationFlux.ps1 create mode 100644 src/KubernetesConfiguration/internal/Set-AzKubernetesConfigurationFlux.ps1 create mode 100644 src/KubernetesConfiguration/internal/Update-AzKubernetesConfigurationFlux.ps1 create mode 100644 src/KubernetesConfiguration/test/AzKubernetesConfigurationFlux.Recording.json create mode 100644 src/KubernetesConfiguration/test/AzKubernetesConfigurationFlux.Tests.ps1 create mode 100644 src/KubernetesConfiguration/test/Get-AzKubernetesConfigFluxOperationStatus.Tests.ps1 create mode 100644 src/KubernetesConfiguration/test/Get-AzKubernetesConfigurationFlux.Tests.ps1 create mode 100644 src/KubernetesConfiguration/test/New-AzKubernetesConfigurationFlux.Tests.ps1 create mode 100644 src/KubernetesConfiguration/test/Remove-AzKubernetesConfigurationFlux.Tests.ps1 create mode 100644 src/KubernetesConfiguration/test/Update-AzKubernetesConfigurationFlux.Tests.ps1 diff --git a/src/KubernetesConfiguration/Az.KubernetesConfiguration.format.ps1xml b/src/KubernetesConfiguration/Az.KubernetesConfiguration.format.ps1xml index 7a2c8869e4a7..7226323b693e 100644 --- a/src/KubernetesConfiguration/Az.KubernetesConfiguration.format.ps1xml +++ b/src/KubernetesConfiguration/Az.KubernetesConfiguration.format.ps1xml @@ -20,6 +20,9 @@ + + + @@ -48,6 +51,9 @@ ExtensionName + + FluxConfigurationName + OperationId @@ -224,9 +230,175 @@ - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.Extension + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.BucketDefinition + + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.BucketDefinition + + + + + + + + + + + + + + + + + + + + + + + + + + + BucketName + + + Insecure + + + LocalAuthRef + + + SyncIntervalInSecond + + + TimeoutInSecond + + + Url + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.BucketPatchDefinition + + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.BucketPatchDefinition + + + + + + + + + + + + + + + + + + + + + + + + + + + BucketName + + + Insecure + + + LocalAuthRef + + + SyncIntervalInSecond + + + TimeoutInSecond + + + Url + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ComplianceStatus + + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ComplianceStatus + + + + + + + + + + + + + + + + + + + + + ComplianceState + + + LastConfigApplied + + + Message + + + MessageLevel + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ConfigurationProtectedSettings + + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ConfigurationProtectedSettings + + + + + + + + + + + + Item + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.Extension - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.Extension + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.Extension @@ -248,9 +420,6 @@ - - - @@ -273,18 +442,15 @@ ReleaseTrain - - ResourceGroupName - - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.ExtensionProperties + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ExtensionProperties - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.ExtensionProperties + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ExtensionProperties @@ -294,6 +460,9 @@ + + + @@ -316,6 +485,9 @@ ExtensionType + + InstalledVersion + PackageUri @@ -334,9 +506,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.ExtensionPropertiesAksAssignedIdentity + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ExtensionPropertiesAksAssignedIdentity - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.ExtensionPropertiesAksAssignedIdentity + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ExtensionPropertiesAksAssignedIdentity @@ -362,9 +534,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.ExtensionPropertiesConfigurationProtectedSettings + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ExtensionPropertiesConfigurationProtectedSettings - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.ExtensionPropertiesConfigurationProtectedSettings + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ExtensionPropertiesConfigurationProtectedSettings @@ -384,9 +556,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.ExtensionPropertiesConfigurationSettings + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ExtensionPropertiesConfigurationSettings - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.ExtensionPropertiesConfigurationSettings + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ExtensionPropertiesConfigurationSettings @@ -406,9 +578,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.ExtensionPropertiesCustomLocationSettings + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ExtensionPropertiesCustomLocationSettings - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.ExtensionPropertiesCustomLocationSettings + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ExtensionPropertiesCustomLocationSettings @@ -428,9 +600,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.ExtensionsList + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ExtensionsList - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.ExtensionsList + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ExtensionsList @@ -450,9 +622,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.ExtensionStatus + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ExtensionStatus - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.ExtensionStatus + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ExtensionStatus @@ -496,21 +668,27 @@ - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.OperationStatusList + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.FluxConfiguration - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.OperationStatusList + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.FluxConfiguration - + + + + - NextLink + Name + + + ResourceGroupName @@ -518,33 +696,27 @@ - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.OperationStatusResult + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.FluxConfigurationPatchProperties - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.OperationStatusResult + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.FluxConfigurationPatchProperties - - - - + - + - Name - - - ResourceGroupName + SourceKind - Status + Suspend @@ -552,9 +724,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.OperationStatusResultProperties + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.FluxConfigurationPatchPropertiesConfigurationProtectedSettings - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.OperationStatusResultProperties + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.FluxConfigurationPatchPropertiesConfigurationProtectedSettings @@ -574,33 +746,81 @@ - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.PatchExtensionProperties + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.FluxConfigurationProperties - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.PatchExtensionProperties + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.FluxConfigurationProperties - + - + - + + + + + + + + + + + + + + + + + + + + + + + + + - AutoUpgradeMinorVersion + ComplianceState - ReleaseTrain + ErrorMessage - Version + Namespace + + + ProvisioningState + + + RepositoryPublicKey + + + Scope + + + SourceKind + + + SourceSyncedCommitId + + + SourceUpdatedAt + + + StatusUpdatedAt + + + Suspend @@ -608,9 +828,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.PatchExtensionPropertiesConfigurationProtectedSettings + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.FluxConfigurationPropertiesConfigurationProtectedSettings - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.PatchExtensionPropertiesConfigurationProtectedSettings + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.FluxConfigurationPropertiesConfigurationProtectedSettings @@ -630,21 +850,21 @@ - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.PatchExtensionPropertiesConfigurationSettings + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.FluxConfigurationsList - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.PatchExtensionPropertiesConfigurationSettings + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.FluxConfigurationsList - + - Item + NextLink @@ -652,33 +872,57 @@ - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.ResourceProviderOperationAutoGenerated + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.GitRepositoryDefinition - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.ResourceProviderOperationAutoGenerated + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.GitRepositoryDefinition - + - + - + + + + + + + + + + + + + - IsDataAction + HttpsCaCert - Name + HttpsUser - Origin + LocalAuthRef + + + SshKnownHost + + + SyncIntervalInSecond + + + TimeoutInSecond + + + Url @@ -686,43 +930,85 @@ - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.ResourceProviderOperationListAutoGenerated + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.GitRepositoryPatchDefinition - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.ResourceProviderOperationListAutoGenerated + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.GitRepositoryPatchDefinition - + + + + + + + + + + + + + + + + + + + - NextLink + HttpsCaCert - - - - + + HttpsUser + + + LocalAuthRef + + + SshKnownHost + + + SyncIntervalInSecond + + + TimeoutInSecond + + + Url + + + + + - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.ScopeCluster + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.HelmOperatorProperties - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.ScopeCluster + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.HelmOperatorProperties - + + + + - ReleaseNamespace + ChartValue + + + ChartVersion @@ -730,21 +1016,39 @@ - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.ScopeNamespace + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.HelmReleasePropertiesDefinition - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.ScopeNamespace + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.HelmReleasePropertiesDefinition - + + + + + + + + + + - TargetNamespace + FailureCount + + + InstallFailureCount + + + LastRevisionApplied + + + UpgradeFailureCount @@ -752,23 +1056,213 @@ - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ComplianceStatus + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.KustomizationDefinition - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ComplianceStatus + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.KustomizationDefinition - + - + + + + + + + + + + + + + + + + + + + + + + + + + + DependsOn + + + Force + + + Name + + + Path + + + Prune + + + RetryIntervalInSecond + + + SyncIntervalInSecond + + + TimeoutInSecond + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.KustomizationPatchDefinition + + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.KustomizationPatchDefinition + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + DependsOn + + + Force + + + Path + + + Prune + + + RetryIntervalInSecond + + + SyncIntervalInSecond + + + TimeoutInSecond + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ObjectReferenceDefinition + + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ObjectReferenceDefinition + + + + + + + + + + + + + + + Name + + + Namespace + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ObjectStatusConditionDefinition + + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ObjectStatusConditionDefinition + + + + + - + + + + + + + + + + + LastTransitionTime + + + Message + + + Reason + + + Status + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ObjectStatusDefinition + + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ObjectStatusDefinition + + + + + + + + + + + + + + @@ -778,13 +1272,13 @@ ComplianceState - LastConfigApplied + Kind - Message + Name - MessageLevel + Namespace @@ -792,9 +1286,65 @@ - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ConfigurationProtectedSettings + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.OperationStatusList - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ConfigurationProtectedSettings + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.OperationStatusList + + + + + + + + + + + + NextLink + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.OperationStatusResult + + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.OperationStatusResult + + + + + + + + + + + + + + + + + + Name + + + ResourceGroupName + + + Status + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.OperationStatusResultProperties + + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.OperationStatusResultProperties @@ -814,27 +1364,33 @@ - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ErrorDefinition + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.PatchExtensionProperties - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ErrorDefinition + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.PatchExtensionProperties - + - + + + + - Code + AutoUpgradeMinorVersion - Message + ReleaseTrain + + + Version @@ -842,27 +1398,83 @@ - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.HelmOperatorProperties + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.PatchExtensionPropertiesConfigurationProtectedSettings - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.HelmOperatorProperties + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.PatchExtensionPropertiesConfigurationProtectedSettings - + + + + + + + Item + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.PatchExtensionPropertiesConfigurationSettings + + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.PatchExtensionPropertiesConfigurationSettings + + + - + - ChartValue + Item + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.RepositoryRefDefinition + + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.RepositoryRefDefinition + + + + + + + + + + + + + + + + + + + - ChartVersion + Branch + + + Commit + + + Semver + + + Tag @@ -870,9 +1482,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ResourceProviderOperation + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ResourceProviderOperation - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ResourceProviderOperation + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ResourceProviderOperation @@ -882,6 +1494,9 @@ + + + @@ -892,15 +1507,18 @@ Name + + Origin + - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ResourceProviderOperationDisplay + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ResourceProviderOperationDisplay - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ResourceProviderOperationDisplay + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ResourceProviderOperationDisplay @@ -938,9 +1556,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ResourceProviderOperationList + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ResourceProviderOperationList - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ResourceProviderOperationList + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ResourceProviderOperationList @@ -960,21 +1578,21 @@ - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.Result + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ScopeCluster - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.Result + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ScopeCluster - + - SampleProperty + ReleaseNamespace @@ -982,15 +1600,40 @@ - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.SourceControlConfiguration + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ScopeNamespace - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.SourceControlConfiguration + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ScopeNamespace + + + + + + + + + + + + TargetNamespace + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.SourceControlConfiguration + + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.SourceControlConfiguration + + + @@ -1001,6 +1644,9 @@ Name + + RepositoryUrl + ResourceGroupName @@ -1010,9 +1656,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.SourceControlConfigurationList + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.SourceControlConfigurationList - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.SourceControlConfigurationList + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.SourceControlConfigurationList @@ -1032,9 +1678,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.SourceControlConfigurationProperties + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.SourceControlConfigurationProperties - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.SourceControlConfigurationProperties + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.SourceControlConfigurationProperties diff --git a/src/KubernetesConfiguration/Az.KubernetesConfiguration.psd1 b/src/KubernetesConfiguration/Az.KubernetesConfiguration.psd1 index 80218648d2cb..85b5c22e451f 100644 --- a/src/KubernetesConfiguration/Az.KubernetesConfiguration.psd1 +++ b/src/KubernetesConfiguration/Az.KubernetesConfiguration.psd1 @@ -3,7 +3,7 @@ # # Generated by: Microsoft Corporation # -# Generated on: 10/28/2021 +# Generated on: 5/24/2022 # @{ @@ -69,9 +69,15 @@ FormatsToProcess = './Az.KubernetesConfiguration.format.ps1xml' # NestedModules = @() # Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export. -FunctionsToExport = 'Get-AzKubernetesConfiguration', 'Get-AzKubernetesExtension', - 'New-AzKubernetesConfiguration', 'New-AzKubernetesExtension', - 'Remove-AzKubernetesConfiguration', 'Remove-AzKubernetesExtension', +FunctionsToExport = 'Get-AzKubernetesConfigFluxOperationStatus', + 'Get-AzKubernetesConfiguration', + 'Get-AzKubernetesConfigurationFlux', 'Get-AzKubernetesExtension', + 'New-AzKubernetesConfiguration', + 'New-AzKubernetesConfigurationFlux', 'New-AzKubernetesExtension', + 'Remove-AzKubernetesConfiguration', + 'Remove-AzKubernetesConfigurationFlux', + 'Remove-AzKubernetesExtension', + 'Update-AzKubernetesConfigurationFlux', 'Update-AzKubernetesExtension' # Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export. @@ -81,10 +87,12 @@ CmdletsToExport = @() # VariablesToExport = @() # Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export. -AliasesToExport = 'Get-AzK8sConfiguration', 'Get-AzK8sExtension', - 'New-AzK8sConfiguration', 'New-AzK8sExtension', - 'Remove-AzK8sConfiguration', 'Remove-AzK8sExtension', - 'Update-AzK8sExtension' +AliasesToExport = 'Get-AzK8sConfigFluxOperationStatus', 'Get-AzK8sConfiguration', + 'Get-AzK8sConfigurationFlux', 'Get-AzK8sExtension', + 'New-AzK8sConfiguration', 'New-AzK8sConfigurationFlux', + 'New-AzK8sExtension', 'Remove-AzK8sConfiguration', + 'Remove-AzK8sConfigurationFlux', 'Remove-AzK8sExtension', + 'Update-AzK8sConfigurationFlux', 'Update-AzK8sExtension', '*' # DSC resources to export from this module # DscResourcesToExport = @() @@ -113,8 +121,7 @@ PrivateData = @{ # IconUri = '' # ReleaseNotes of this module - ReleaseNotes = '* Onboarded cmdlets ''New/Update/Get/Remove-AzKubernetesExtension'' and ''New/Get/Remove-AzKubernetesConfiguration'' -* Removed the plural form of parameter HelmOperatorChartValues, OperatorParameters and SshKnownHosts in ''New-AzKubernetesConfiguration''' + # ReleaseNotes = '' # Prerelease string of this module # Prerelease = '' diff --git a/src/KubernetesConfiguration/Az.KubernetesConfiguration.psm1 b/src/KubernetesConfiguration/Az.KubernetesConfiguration.psm1 index ec935c630a9c..77fd70d19941 100644 --- a/src/KubernetesConfiguration/Az.KubernetesConfiguration.psm1 +++ b/src/KubernetesConfiguration/Az.KubernetesConfiguration.psm1 @@ -25,17 +25,17 @@ } } if(-not $accountsModule) { - $hasAdequateVersion = (Get-Module -Name $accountsName -ListAvailable | Where-Object { $_.Version -ge [System.Version]'2.2.3' } | Measure-Object).Count -gt 0 + $hasAdequateVersion = (Get-Module -Name $accountsName -ListAvailable | Where-Object { $_.Version -ge [System.Version]'2.7.5' } | Measure-Object).Count -gt 0 if($hasAdequateVersion) { - $accountsModule = Import-Module -Name $accountsName -MinimumVersion 2.2.3 -Scope Global -PassThru + $accountsModule = Import-Module -Name $accountsName -MinimumVersion 2.7.5 -Scope Global -PassThru } } } if(-not $accountsModule) { - Write-Error "`nThis module requires $accountsName version 2.2.3 or greater. For installation instructions, please see: https://docs.microsoft.com/powershell/azure/install-az-ps" -ErrorAction Stop - } elseif (($accountsModule.Version -lt [System.Version]'2.2.3') -and (-not $localAccounts)) { - Write-Error "`nThis module requires $accountsName version 2.2.3 or greater. An earlier version of Az.Accounts is imported in the current PowerShell session. If you are running test, please try to add the switch '-RegenerateSupportModule' when executing 'test-module.ps1'. Otherwise please open a new PowerShell session and import this module again.`nAdditionally, this error could indicate that multiple incompatible versions of Azure PowerShell modules are installed on your system. For troubleshooting information, please see: https://aka.ms/azps-version-error" -ErrorAction Stop + Write-Error "`nThis module requires $accountsName version 2.7.5 or greater. For installation instructions, please see: https://docs.microsoft.com/powershell/azure/install-az-ps" -ErrorAction Stop + } elseif (($accountsModule.Version -lt [System.Version]'2.7.5') -and (-not $localAccounts)) { + Write-Error "`nThis module requires $accountsName version 2.7.5 or greater. An earlier version of Az.Accounts is imported in the current PowerShell session. If you are running test, please try to add the switch '-RegenerateSupportModule' when executing 'test-module.ps1'. Otherwise please open a new PowerShell session and import this module again.`nAdditionally, this error could indicate that multiple incompatible versions of Azure PowerShell modules are installed on your system. For troubleshooting information, please see: https://aka.ms/azps-version-error" -ErrorAction Stop } Write-Information "Loaded Module '$($accountsModule.Name)'" @@ -50,6 +50,10 @@ # Tweaks the pipeline on module load $instance.OnModuleLoad = $VTable.OnModuleLoad + + # Following two delegates are added for telemetry + $instance.GetTelemetryId = $VTable.GetTelemetryId + $instance.Telemetry = $VTable.Telemetry # Tweaks the pipeline per call diff --git a/src/KubernetesConfiguration/KubernetesConfiguration.sln b/src/KubernetesConfiguration/KubernetesConfiguration.sln index 3bf639f440c2..15b8c681626d 100644 --- a/src/KubernetesConfiguration/KubernetesConfiguration.sln +++ b/src/KubernetesConfiguration/KubernetesConfiguration.sln @@ -1,19 +1,19 @@  Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 16 -VisualStudioVersion = 16.6.30114.105 +VisualStudioVersion = 16.0.30114.105 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Accounts", "..\Accounts\Accounts\Accounts.csproj", "{3093A1F1-31CD-4563-BE4B-B17AA4207692}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Accounts", "..\Accounts\Accounts\Accounts.csproj", "{01EC8459-C884-4814-9ED9-5D75243A0CC1}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Authentication", "..\Accounts\Authentication\Authentication.csproj", "{8EFA7A0C-CF28-4959-A46D-112BB2FA1FB2}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Authentication", "..\Accounts\Authentication\Authentication.csproj", "{FDA487AC-B414-46A5-B7EC-F3B7C93E3981}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Authentication.ResourceManager", "..\Accounts\Authentication.ResourceManager\Authentication.ResourceManager.csproj", "{9D93BC23-8AF2-4365-9C42-5394C6EA9869}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Authentication.ResourceManager", "..\Accounts\Authentication.ResourceManager\Authentication.ResourceManager.csproj", "{91C85ED2-BFCD-4726-B20E-37B43B28029A}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AuthenticationAssemblyLoadContext", "..\Accounts\AuthenticationAssemblyLoadContext\AuthenticationAssemblyLoadContext.csproj", "{968C92F4-7A13-4E28-8997-538F2F54823B}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AuthenticationAssemblyLoadContext", "..\Accounts\AuthenticationAssemblyLoadContext\AuthenticationAssemblyLoadContext.csproj", "{2EA2CC75-3977-460E-8031-D7F6B7FFB0D8}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Authenticators", "..\Accounts\Authenticators\Authenticators.csproj", "{2FA4E05B-5AF3-426E-98CE-EDF06B56CFBA}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Authenticators", "..\Accounts\Authenticators\Authenticators.csproj", "{F407D801-EE25-4226-906D-FEFF527BAA27}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Az.KubernetesConfiguration", "Az.KubernetesConfiguration.csproj", "{59382982-6677-4EEC-8AF4-141B3BDA3DBA}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Az.KubernetesConfiguration", "Az.KubernetesConfiguration.csproj", "{45ADFE07-E812-4F95-855B-B2F0DF0CF4E0}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -28,77 +28,77 @@ Global HideSolutionNode = FALSE EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {3093A1F1-31CD-4563-BE4B-B17AA4207692}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {3093A1F1-31CD-4563-BE4B-B17AA4207692}.Debug|Any CPU.Build.0 = Debug|Any CPU - {3093A1F1-31CD-4563-BE4B-B17AA4207692}.Debug|x64.ActiveCfg = Debug|Any CPU - {3093A1F1-31CD-4563-BE4B-B17AA4207692}.Debug|x64.Build.0 = Debug|Any CPU - {3093A1F1-31CD-4563-BE4B-B17AA4207692}.Debug|x86.ActiveCfg = Debug|Any CPU - {3093A1F1-31CD-4563-BE4B-B17AA4207692}.Debug|x86.Build.0 = Debug|Any CPU - {3093A1F1-31CD-4563-BE4B-B17AA4207692}.Release|Any CPU.ActiveCfg = Release|Any CPU - {3093A1F1-31CD-4563-BE4B-B17AA4207692}.Release|Any CPU.Build.0 = Release|Any CPU - {3093A1F1-31CD-4563-BE4B-B17AA4207692}.Release|x64.ActiveCfg = Release|Any CPU - {3093A1F1-31CD-4563-BE4B-B17AA4207692}.Release|x64.Build.0 = Release|Any CPU - {3093A1F1-31CD-4563-BE4B-B17AA4207692}.Release|x86.ActiveCfg = Release|Any CPU - {3093A1F1-31CD-4563-BE4B-B17AA4207692}.Release|x86.Build.0 = Release|Any CPU - {8EFA7A0C-CF28-4959-A46D-112BB2FA1FB2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {8EFA7A0C-CF28-4959-A46D-112BB2FA1FB2}.Debug|Any CPU.Build.0 = Debug|Any CPU - {8EFA7A0C-CF28-4959-A46D-112BB2FA1FB2}.Debug|x64.ActiveCfg = Debug|Any CPU - {8EFA7A0C-CF28-4959-A46D-112BB2FA1FB2}.Debug|x64.Build.0 = Debug|Any CPU - {8EFA7A0C-CF28-4959-A46D-112BB2FA1FB2}.Debug|x86.ActiveCfg = Debug|Any CPU - {8EFA7A0C-CF28-4959-A46D-112BB2FA1FB2}.Debug|x86.Build.0 = Debug|Any CPU - {8EFA7A0C-CF28-4959-A46D-112BB2FA1FB2}.Release|Any CPU.ActiveCfg = Release|Any CPU - {8EFA7A0C-CF28-4959-A46D-112BB2FA1FB2}.Release|Any CPU.Build.0 = Release|Any CPU - {8EFA7A0C-CF28-4959-A46D-112BB2FA1FB2}.Release|x64.ActiveCfg = Release|Any CPU - {8EFA7A0C-CF28-4959-A46D-112BB2FA1FB2}.Release|x64.Build.0 = Release|Any CPU - {8EFA7A0C-CF28-4959-A46D-112BB2FA1FB2}.Release|x86.ActiveCfg = Release|Any CPU - {8EFA7A0C-CF28-4959-A46D-112BB2FA1FB2}.Release|x86.Build.0 = Release|Any CPU - {9D93BC23-8AF2-4365-9C42-5394C6EA9869}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {9D93BC23-8AF2-4365-9C42-5394C6EA9869}.Debug|Any CPU.Build.0 = Debug|Any CPU - {9D93BC23-8AF2-4365-9C42-5394C6EA9869}.Debug|x64.ActiveCfg = Debug|Any CPU - {9D93BC23-8AF2-4365-9C42-5394C6EA9869}.Debug|x64.Build.0 = Debug|Any CPU - {9D93BC23-8AF2-4365-9C42-5394C6EA9869}.Debug|x86.ActiveCfg = Debug|Any CPU - {9D93BC23-8AF2-4365-9C42-5394C6EA9869}.Debug|x86.Build.0 = Debug|Any CPU - {9D93BC23-8AF2-4365-9C42-5394C6EA9869}.Release|Any CPU.ActiveCfg = Release|Any CPU - {9D93BC23-8AF2-4365-9C42-5394C6EA9869}.Release|Any CPU.Build.0 = Release|Any CPU - {9D93BC23-8AF2-4365-9C42-5394C6EA9869}.Release|x64.ActiveCfg = Release|Any CPU - {9D93BC23-8AF2-4365-9C42-5394C6EA9869}.Release|x64.Build.0 = Release|Any CPU - {9D93BC23-8AF2-4365-9C42-5394C6EA9869}.Release|x86.ActiveCfg = Release|Any CPU - {9D93BC23-8AF2-4365-9C42-5394C6EA9869}.Release|x86.Build.0 = Release|Any CPU - {968C92F4-7A13-4E28-8997-538F2F54823B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {968C92F4-7A13-4E28-8997-538F2F54823B}.Debug|Any CPU.Build.0 = Debug|Any CPU - {968C92F4-7A13-4E28-8997-538F2F54823B}.Debug|x64.ActiveCfg = Debug|Any CPU - {968C92F4-7A13-4E28-8997-538F2F54823B}.Debug|x64.Build.0 = Debug|Any CPU - {968C92F4-7A13-4E28-8997-538F2F54823B}.Debug|x86.ActiveCfg = Debug|Any CPU - {968C92F4-7A13-4E28-8997-538F2F54823B}.Debug|x86.Build.0 = Debug|Any CPU - {968C92F4-7A13-4E28-8997-538F2F54823B}.Release|Any CPU.ActiveCfg = Release|Any CPU - {968C92F4-7A13-4E28-8997-538F2F54823B}.Release|Any CPU.Build.0 = Release|Any CPU - {968C92F4-7A13-4E28-8997-538F2F54823B}.Release|x64.ActiveCfg = Release|Any CPU - {968C92F4-7A13-4E28-8997-538F2F54823B}.Release|x64.Build.0 = Release|Any CPU - {968C92F4-7A13-4E28-8997-538F2F54823B}.Release|x86.ActiveCfg = Release|Any CPU - {968C92F4-7A13-4E28-8997-538F2F54823B}.Release|x86.Build.0 = Release|Any CPU - {2FA4E05B-5AF3-426E-98CE-EDF06B56CFBA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {2FA4E05B-5AF3-426E-98CE-EDF06B56CFBA}.Debug|Any CPU.Build.0 = Debug|Any CPU - {2FA4E05B-5AF3-426E-98CE-EDF06B56CFBA}.Debug|x64.ActiveCfg = Debug|Any CPU - {2FA4E05B-5AF3-426E-98CE-EDF06B56CFBA}.Debug|x64.Build.0 = Debug|Any CPU - {2FA4E05B-5AF3-426E-98CE-EDF06B56CFBA}.Debug|x86.ActiveCfg = Debug|Any CPU - {2FA4E05B-5AF3-426E-98CE-EDF06B56CFBA}.Debug|x86.Build.0 = Debug|Any CPU - {2FA4E05B-5AF3-426E-98CE-EDF06B56CFBA}.Release|Any CPU.ActiveCfg = Release|Any CPU - {2FA4E05B-5AF3-426E-98CE-EDF06B56CFBA}.Release|Any CPU.Build.0 = Release|Any CPU - {2FA4E05B-5AF3-426E-98CE-EDF06B56CFBA}.Release|x64.ActiveCfg = Release|Any CPU - {2FA4E05B-5AF3-426E-98CE-EDF06B56CFBA}.Release|x64.Build.0 = Release|Any CPU - {2FA4E05B-5AF3-426E-98CE-EDF06B56CFBA}.Release|x86.ActiveCfg = Release|Any CPU - {2FA4E05B-5AF3-426E-98CE-EDF06B56CFBA}.Release|x86.Build.0 = Release|Any CPU - {59382982-6677-4EEC-8AF4-141B3BDA3DBA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {59382982-6677-4EEC-8AF4-141B3BDA3DBA}.Debug|Any CPU.Build.0 = Debug|Any CPU - {59382982-6677-4EEC-8AF4-141B3BDA3DBA}.Debug|x64.ActiveCfg = Debug|Any CPU - {59382982-6677-4EEC-8AF4-141B3BDA3DBA}.Debug|x64.Build.0 = Debug|Any CPU - {59382982-6677-4EEC-8AF4-141B3BDA3DBA}.Debug|x86.ActiveCfg = Debug|Any CPU - {59382982-6677-4EEC-8AF4-141B3BDA3DBA}.Debug|x86.Build.0 = Debug|Any CPU - {59382982-6677-4EEC-8AF4-141B3BDA3DBA}.Release|Any CPU.ActiveCfg = Release|Any CPU - {59382982-6677-4EEC-8AF4-141B3BDA3DBA}.Release|Any CPU.Build.0 = Release|Any CPU - {59382982-6677-4EEC-8AF4-141B3BDA3DBA}.Release|x64.ActiveCfg = Release|Any CPU - {59382982-6677-4EEC-8AF4-141B3BDA3DBA}.Release|x64.Build.0 = Release|Any CPU - {59382982-6677-4EEC-8AF4-141B3BDA3DBA}.Release|x86.ActiveCfg = Release|Any CPU - {59382982-6677-4EEC-8AF4-141B3BDA3DBA}.Release|x86.Build.0 = Release|Any CPU + {01EC8459-C884-4814-9ED9-5D75243A0CC1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {01EC8459-C884-4814-9ED9-5D75243A0CC1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {01EC8459-C884-4814-9ED9-5D75243A0CC1}.Debug|x64.ActiveCfg = Debug|Any CPU + {01EC8459-C884-4814-9ED9-5D75243A0CC1}.Debug|x64.Build.0 = Debug|Any CPU + {01EC8459-C884-4814-9ED9-5D75243A0CC1}.Debug|x86.ActiveCfg = Debug|Any CPU + {01EC8459-C884-4814-9ED9-5D75243A0CC1}.Debug|x86.Build.0 = Debug|Any CPU + {01EC8459-C884-4814-9ED9-5D75243A0CC1}.Release|Any CPU.ActiveCfg = Release|Any CPU + {01EC8459-C884-4814-9ED9-5D75243A0CC1}.Release|Any CPU.Build.0 = Release|Any CPU + {01EC8459-C884-4814-9ED9-5D75243A0CC1}.Release|x64.ActiveCfg = Release|Any CPU + {01EC8459-C884-4814-9ED9-5D75243A0CC1}.Release|x64.Build.0 = Release|Any CPU + {01EC8459-C884-4814-9ED9-5D75243A0CC1}.Release|x86.ActiveCfg = Release|Any CPU + {01EC8459-C884-4814-9ED9-5D75243A0CC1}.Release|x86.Build.0 = Release|Any CPU + {FDA487AC-B414-46A5-B7EC-F3B7C93E3981}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FDA487AC-B414-46A5-B7EC-F3B7C93E3981}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FDA487AC-B414-46A5-B7EC-F3B7C93E3981}.Debug|x64.ActiveCfg = Debug|Any CPU + {FDA487AC-B414-46A5-B7EC-F3B7C93E3981}.Debug|x64.Build.0 = Debug|Any CPU + {FDA487AC-B414-46A5-B7EC-F3B7C93E3981}.Debug|x86.ActiveCfg = Debug|Any CPU + {FDA487AC-B414-46A5-B7EC-F3B7C93E3981}.Debug|x86.Build.0 = Debug|Any CPU + {FDA487AC-B414-46A5-B7EC-F3B7C93E3981}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FDA487AC-B414-46A5-B7EC-F3B7C93E3981}.Release|Any CPU.Build.0 = Release|Any CPU + {FDA487AC-B414-46A5-B7EC-F3B7C93E3981}.Release|x64.ActiveCfg = Release|Any CPU + {FDA487AC-B414-46A5-B7EC-F3B7C93E3981}.Release|x64.Build.0 = Release|Any CPU + {FDA487AC-B414-46A5-B7EC-F3B7C93E3981}.Release|x86.ActiveCfg = Release|Any CPU + {FDA487AC-B414-46A5-B7EC-F3B7C93E3981}.Release|x86.Build.0 = Release|Any CPU + {91C85ED2-BFCD-4726-B20E-37B43B28029A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {91C85ED2-BFCD-4726-B20E-37B43B28029A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {91C85ED2-BFCD-4726-B20E-37B43B28029A}.Debug|x64.ActiveCfg = Debug|Any CPU + {91C85ED2-BFCD-4726-B20E-37B43B28029A}.Debug|x64.Build.0 = Debug|Any CPU + {91C85ED2-BFCD-4726-B20E-37B43B28029A}.Debug|x86.ActiveCfg = Debug|Any CPU + {91C85ED2-BFCD-4726-B20E-37B43B28029A}.Debug|x86.Build.0 = Debug|Any CPU + {91C85ED2-BFCD-4726-B20E-37B43B28029A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {91C85ED2-BFCD-4726-B20E-37B43B28029A}.Release|Any CPU.Build.0 = Release|Any CPU + {91C85ED2-BFCD-4726-B20E-37B43B28029A}.Release|x64.ActiveCfg = Release|Any CPU + {91C85ED2-BFCD-4726-B20E-37B43B28029A}.Release|x64.Build.0 = Release|Any CPU + {91C85ED2-BFCD-4726-B20E-37B43B28029A}.Release|x86.ActiveCfg = Release|Any CPU + {91C85ED2-BFCD-4726-B20E-37B43B28029A}.Release|x86.Build.0 = Release|Any CPU + {2EA2CC75-3977-460E-8031-D7F6B7FFB0D8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2EA2CC75-3977-460E-8031-D7F6B7FFB0D8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2EA2CC75-3977-460E-8031-D7F6B7FFB0D8}.Debug|x64.ActiveCfg = Debug|Any CPU + {2EA2CC75-3977-460E-8031-D7F6B7FFB0D8}.Debug|x64.Build.0 = Debug|Any CPU + {2EA2CC75-3977-460E-8031-D7F6B7FFB0D8}.Debug|x86.ActiveCfg = Debug|Any CPU + {2EA2CC75-3977-460E-8031-D7F6B7FFB0D8}.Debug|x86.Build.0 = Debug|Any CPU + {2EA2CC75-3977-460E-8031-D7F6B7FFB0D8}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2EA2CC75-3977-460E-8031-D7F6B7FFB0D8}.Release|Any CPU.Build.0 = Release|Any CPU + {2EA2CC75-3977-460E-8031-D7F6B7FFB0D8}.Release|x64.ActiveCfg = Release|Any CPU + {2EA2CC75-3977-460E-8031-D7F6B7FFB0D8}.Release|x64.Build.0 = Release|Any CPU + {2EA2CC75-3977-460E-8031-D7F6B7FFB0D8}.Release|x86.ActiveCfg = Release|Any CPU + {2EA2CC75-3977-460E-8031-D7F6B7FFB0D8}.Release|x86.Build.0 = Release|Any CPU + {F407D801-EE25-4226-906D-FEFF527BAA27}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F407D801-EE25-4226-906D-FEFF527BAA27}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F407D801-EE25-4226-906D-FEFF527BAA27}.Debug|x64.ActiveCfg = Debug|Any CPU + {F407D801-EE25-4226-906D-FEFF527BAA27}.Debug|x64.Build.0 = Debug|Any CPU + {F407D801-EE25-4226-906D-FEFF527BAA27}.Debug|x86.ActiveCfg = Debug|Any CPU + {F407D801-EE25-4226-906D-FEFF527BAA27}.Debug|x86.Build.0 = Debug|Any CPU + {F407D801-EE25-4226-906D-FEFF527BAA27}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F407D801-EE25-4226-906D-FEFF527BAA27}.Release|Any CPU.Build.0 = Release|Any CPU + {F407D801-EE25-4226-906D-FEFF527BAA27}.Release|x64.ActiveCfg = Release|Any CPU + {F407D801-EE25-4226-906D-FEFF527BAA27}.Release|x64.Build.0 = Release|Any CPU + {F407D801-EE25-4226-906D-FEFF527BAA27}.Release|x86.ActiveCfg = Release|Any CPU + {F407D801-EE25-4226-906D-FEFF527BAA27}.Release|x86.Build.0 = Release|Any CPU + {45ADFE07-E812-4F95-855B-B2F0DF0CF4E0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {45ADFE07-E812-4F95-855B-B2F0DF0CF4E0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {45ADFE07-E812-4F95-855B-B2F0DF0CF4E0}.Debug|x64.ActiveCfg = Debug|Any CPU + {45ADFE07-E812-4F95-855B-B2F0DF0CF4E0}.Debug|x64.Build.0 = Debug|Any CPU + {45ADFE07-E812-4F95-855B-B2F0DF0CF4E0}.Debug|x86.ActiveCfg = Debug|Any CPU + {45ADFE07-E812-4F95-855B-B2F0DF0CF4E0}.Debug|x86.Build.0 = Debug|Any CPU + {45ADFE07-E812-4F95-855B-B2F0DF0CF4E0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {45ADFE07-E812-4F95-855B-B2F0DF0CF4E0}.Release|Any CPU.Build.0 = Release|Any CPU + {45ADFE07-E812-4F95-855B-B2F0DF0CF4E0}.Release|x64.ActiveCfg = Release|Any CPU + {45ADFE07-E812-4F95-855B-B2F0DF0CF4E0}.Release|x64.Build.0 = Release|Any CPU + {45ADFE07-E812-4F95-855B-B2F0DF0CF4E0}.Release|x86.ActiveCfg = Release|Any CPU + {45ADFE07-E812-4F95-855B-B2F0DF0CF4E0}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection EndGlobal diff --git a/src/KubernetesConfiguration/README.md b/src/KubernetesConfiguration/README.md index 94d0c9bb5823..7420adc435e6 100644 --- a/src/KubernetesConfiguration/README.md +++ b/src/KubernetesConfiguration/README.md @@ -17,7 +17,7 @@ This directory contains the PowerShell module for the KubernetesConfiguration se This module was primarily generated via [AutoRest](https://github.com/Azure/autorest) using the [PowerShell](https://github.com/Azure/autorest.powershell) extension. ## Module Requirements -- [Az.Accounts module](https://www.powershellgallery.com/packages/Az.Accounts/), version 2.2.3 or greater +- [Az.Accounts module](https://www.powershellgallery.com/packages/Az.Accounts/), version 2.7.5 or greater ## Authentication AutoRest does not generate authentication code for the module. Authentication is handled via Az.Accounts by altering the HTTP payload before it is sent. @@ -47,15 +47,17 @@ In this directory, run AutoRest: > see https://aka.ms/autorest ``` yaml -branch: fa0a95854a551be7fdb04367e2e7b6500ab2e341 +branch: 791255f0c5dd775015cd51f3e642549190fb3803 require: - $(this-folder)/../readme.azure.noprofile.md input-file: - - $(repo)/specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/stable/2021-03-01/kubernetesconfiguration.json - - $(repo)/specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/stable/2021-09-01/extensions.json + - $(repo)/specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/stable/2022-03-01/extensions.json + - $(repo)/specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/stable/2022-03-01/fluxconfiguration.json + - $(repo)/specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/stable/2022-03-01/operations.json + - $(repo)/specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/stable/2022-03-01/kubernetesconfiguration.json title: KubernetesConfiguration -module-version: 0.1.0 +module-version: 0.2.0 subject-prefix: '' identity-correction-for-post: true @@ -73,6 +75,12 @@ directive: "$ref": "#/definitions/Extension" } }, + "201": { + "description": "Request received successfully.", + "schema": { + "$ref": "#/definitions/Extension" + } + }, "202": { "description": "Request received successfully, and the resource will be updated asynchronously.", "schema": { @@ -83,27 +91,101 @@ directive: "description": "Conflict", "x-ms-error-response": true, "schema": { - "$ref": "https://github.com/Azure/azure-rest-api-specs/blob/fa0a95854a551be7fdb04367e2e7b6500ab2e341/specification/common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + "$ref": "https://github.com/Azure/azure-rest-api-specs/blob/791255f0c5dd775015cd51f3e642549190fb3803/specification/common-types/resource-management/v2/types.json#/definitions/ErrorResponse" } }, "default": { "description": "Error response describing why the operation failed.", "schema": { - "$ref": "https://github.com/Azure/azure-rest-api-specs/blob/fa0a95854a551be7fdb04367e2e7b6500ab2e341/specification/common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + "$ref": "https://github.com/Azure/azure-rest-api-specs/blob/791255f0c5dd775015cd51f3e642549190fb3803/specification/common-types/resource-management/v2/types.json#/definitions/ErrorResponse" } } } - from: swagger-document - where: $.definitions.Extension.properties.properties.properties.statuses + where: $.paths["/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/{fluxConfigurationName}"].put.responses transform: >- return { - "description": "Status from this extension.", - "type": "array", - "readOnly": true, - "x-nullable": true, - "items": { - "$ref": "#/definitions/ExtensionStatus" + "200": { + "description": "Request received successfully for an existing resource.", + "schema": { + "$ref": "#/definitions/FluxConfiguration" } + }, + "201": { + "description": "Request received successfully.", + "schema": { + "$ref": "#/definitions/FluxConfiguration" + } + }, + "400": { + "description": "Conflict", + "x-ms-error-response": true, + "schema": { + "$ref": "https://github.com/Azure/azure-rest-api-specs/blob/791255f0c5dd775015cd51f3e642549190fb3803/specification/common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "https://github.com/Azure/azure-rest-api-specs/blob/791255f0c5dd775015cd51f3e642549190fb3803/specification/common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + } + - from: swagger-document + where: $.paths["/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/{fluxConfigurationName}"].patch.responses + transform: >- + return { + "200": { + "description": "Request received successfully for an existing resource.", + "schema": { + "$ref": "#/definitions/FluxConfiguration" + } + }, + "202": { + "description": "Request received successfully, and the resource will be updated asynchronously.", + "schema": { + "$ref": "#/definitions/FluxConfiguration" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "https://github.com/Azure/azure-rest-api-specs/blob/791255f0c5dd775015cd51f3e642549190fb3803/specification/common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + } + - from: swagger-document + where: $.definitions.Extension.properties.properties.properties.statuses + transform: >- + return { + "description": "Status from this extension.", + "type": "array", + "readOnly": true, + "x-nullable": true, + "items": { + "$ref": "#/definitions/ExtensionStatus" + }, + "x-ms-identifiers": [] + } + - from: swagger-document + where: $.definitions.BucketDefinition.properties.accessKey + transform: >- + return { + "description": "Plaintext access key used to securely access the S3 bucket", + "type": "string", + "format": "password", + "x-ms-secret": true, + "x-nullable": true + } + - from: swagger-document + where: $.definitions.BucketPatchDefinition.properties.accessKey + transform: >- + return { + "description": "Plaintext access key used to securely access the S3 bucket", + "type": "string", + "format": "password", + "x-ms-secret": true, + "x-nullable": true } - from: swagger-document where: $.definitions.EnableHelmOperatorDefinition.type @@ -115,6 +197,14 @@ directive: subject: SourceControlConfiguration set: subject: KubernetesConfiguration + - where: + subject: FluxConfiguration + set: + subject: KubernetesConfigurationFlux + - where: + subject: FluxConfigOperationStatus + set: + subject: KubernetesConfigFluxOperationStatus - where: parameter-name: ClusterResourceName set: @@ -165,6 +255,12 @@ directive: - where: subject: KubernetesExtension hide: true + - where: + subject: KubernetesConfigurationFlux + hide: true + - where: + subject: KubernetesConfigFluxOperationStatus + hide: true - where: verb: Get subject: KubernetesExtension @@ -200,6 +296,31 @@ directive: subject: KubernetesConfiguration set: alias: Remove-AzK8sConfiguration + - where: + verb: New + subject: KubernetesConfigurationFlux + set: + alias: New-AzK8sConfigurationFlux + - where: + verb: Get + subject: KubernetesConfigurationFlux + set: + alias: Get-AzK8sConfigurationFlux + - where: + verb: Remove + subject: KubernetesConfigurationFlux + set: + alias: Remove-AzK8sConfigurationFlux + - where: + verb: Update + subject: KubernetesConfigurationFlux + set: + alias: Update-AzK8sConfigurationFlux + - where: + verb: Get + subject: KubernetesConfigFluxOperationStatus + set: + alias: Get-AzK8sConfigFluxOperationStatus - where: model-name: Extension set: @@ -211,4 +332,12 @@ directive: - ProvisioningState - AutoUpgradeMinorVersion - ReleaseTrain + - where: + model-name: SourceControlConfiguration + set: + format-table: + properties: + - Name + - RepositoryUrl + - ResourceGroupName ``` diff --git a/src/KubernetesConfiguration/check-dependencies.ps1 b/src/KubernetesConfiguration/check-dependencies.ps1 index b02ae9135957..c29591c7bfe1 100644 --- a/src/KubernetesConfiguration/check-dependencies.ps1 +++ b/src/KubernetesConfiguration/check-dependencies.ps1 @@ -25,7 +25,7 @@ if(-not $Isolated) { function DownloadModule ([bool]$predicate, [string]$path, [string]$moduleName, [string]$versionMinimum, [string]$requiredVersion) { 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)) { + if((-not $module) -or ($versionMinimum -and ($module | ForEach-Object { $_.Version } | Where-Object { $_ -ge [System.Version]$versionMinimum } | Measure-Object).Count -eq 0) -or ($requiredVersion -and ($module | ForEach-Object { $_.Version } | Where-Object { $_ -eq [System.Version]$requiredVersion } | Measure-Object).Count -eq 0)) { $null = New-Item -ItemType Directory -Force -Path $path Write-Host -ForegroundColor Green "Installing local $moduleName module into '$path'..." if ($requiredVersion) { @@ -47,7 +47,7 @@ if(Test-Path -Path $localModulesPath) { $env:PSModulePath = "$localModulesPath$([IO.Path]::PathSeparator)$env:PSModulePath" } -DownloadModule -predicate ($all -or $Accounts) -path $localModulesPath -moduleName 'Az.Accounts' -versionMinimum '2.2.3' +DownloadModule -predicate ($all -or $Accounts) -path $localModulesPath -moduleName 'Az.Accounts' -versionMinimum '2.7.5' DownloadModule -predicate ($all -or $Pester) -path $localModulesPath -moduleName 'Pester' -requiredVersion '4.10.1' $tools = Join-Path $PSScriptRoot 'tools' diff --git a/src/KubernetesConfiguration/create-model-cmdlets.ps1 b/src/KubernetesConfiguration/create-model-cmdlets.ps1 index 39c6a1e7a3e5..04c639459581 100644 --- a/src/KubernetesConfiguration/create-model-cmdlets.ps1 +++ b/src/KubernetesConfiguration/create-model-cmdlets.ps1 @@ -23,7 +23,7 @@ function CreateModelCmdlet { } $ModelCsPath = Join-Path (Join-Path $PSScriptRoot 'generated\api') 'Models' - $ModuleName = 'Az.KubernetesConfiguration'.Split(".")[1] + $ModuleName = '' $OutputDir = Join-Path $PSScriptRoot 'custom\autogen-model-cmdlets' $null = New-Item -ItemType Directory -Force -Path $OutputDir @@ -112,13 +112,22 @@ function CreateModelCmdlet { $ParameterDefinePropertyList.Add("HelpMessage=`"${Description}.`"") } $ParameterDefineProperty = [System.String]::Join(", ", $ParameterDefinePropertyList) + # check whether completer is needed + $completer = ''; + if($Type.Split('.').Split('.')[-2] -eq 'Support') { + # If Type is an array, need to strip [] + $strippedType = $Type.Replace('[]', '') + $completer += "`n [ArgumentCompleter([${strippedType}])]" + } $ParameterDefineScript = " - [Parameter($ParameterDefineProperty)] + [Parameter($ParameterDefineProperty)]${completer} [${Type}] `$${Identifier}" $ParameterDefineScriptList.Add($ParameterDefineScript) $ParameterAssignScriptList.Add(" - `$Object.${Identifier} = `$${Identifier}") + if (`$PSBoundParameters.ContainsKey('${Identifier}')) { + `$Object.${Identifier} = `$${Identifier} + }") } } $ParameterDefineScript = $ParameterDefineScriptList | Join-String -Separator "," @@ -142,9 +151,9 @@ function CreateModelCmdlet { <# .Synopsis -Create a in-memory object for ${ObjectType} +Create an in-memory object for ${ObjectType}. .Description -Create a in-memory object for ${ObjectType} +Create an in-memory object for ${ObjectType}. .Outputs ${ObjectTypeWithNamespace} @@ -167,4 +176,4 @@ ${ParameterAssignScript} " Set-Content -Path $OutputPath -Value $Script } -} \ No newline at end of file +} diff --git a/src/KubernetesConfiguration/custom/Get-AzKubernetesConfigFluxOperationStatus.ps1 b/src/KubernetesConfiguration/custom/Get-AzKubernetesConfigFluxOperationStatus.ps1 new file mode 100644 index 000000000000..4b287e133644 --- /dev/null +++ b/src/KubernetesConfiguration/custom/Get-AzKubernetesConfigFluxOperationStatus.ps1 @@ -0,0 +1,164 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Get Async Operation status +.Description +Get Async Operation status +.Example +PS C:\> {{ Add code here }} + +{{ Add output here }} +.Example +PS C:\> {{ Add code here }} + +{{ Add output here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResult +.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. + [ClusterResourceName ]: The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. + [ClusterRp ]: The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. + [ExtensionName ]: Name of the Extension. + [FluxConfigurationName ]: Name of the Flux Configuration. + [Id ]: Resource identity path + [OperationId ]: operation Id + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SourceControlConfigurationName ]: Name of the Source Control Configuration. + [SubscriptionId ]: The ID of the target subscription. +.Link +https://docs.microsoft.com/powershell/module/az.kubernetesconfiguration/get-azkubernetesconfigfluxoperationstatus +#> +function Get-AzKubernetesConfigFluxOperationStatus { + [Alias('Get-AzK8sConfigFluxOperationStatus')] + [OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResult])] + [CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] + param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [System.String] + # The name of the kubernetes cluster. + ${ClusterName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [ValidateSet('ConnectedClusters', 'ManagedClusters')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [System.String] + # The Kubernetes cluster resource name - i.e. + # managedClusters, connectedClusters, provisionedClusters. + ${ClusterType}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [System.String] + # Name of the Flux Configuration. + ${FluxConfigurationName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [System.String] + # operation Id + ${OperationId}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Get')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentity] + # 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.KubernetesConfiguration.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + + process { + if ($ClusterType -eq 'ManagedClusters') { + $PSBoundParameters.Add('ClusterRp', 'Microsoft.ContainerService') + } + elseif ($ClusterType -eq 'ConnectedClusters') { + $PSBoundParameters.Add('ClusterRp', 'Microsoft.Kubernetes') + } + + Az.KubernetesConfiguration.internal\Get-AzKubernetesConfigFluxOperationStatus @PSBoundParameters + } +} diff --git a/src/KubernetesConfiguration/custom/Get-AzKubernetesConfiguration.ps1 b/src/KubernetesConfiguration/custom/Get-AzKubernetesConfiguration.ps1 index 3c5f009d0d0c..c80d4299266e 100644 --- a/src/KubernetesConfiguration/custom/Get-AzKubernetesConfiguration.ps1 +++ b/src/KubernetesConfiguration/custom/Get-AzKubernetesConfiguration.ps1 @@ -1,9 +1,17 @@ # ---------------------------------------------------------------------------------- # 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. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. # ---------------------------------------------------------------------------------- <# @@ -12,18 +20,23 @@ Gets details of the Source Control Configuration. .Description Gets details of the Source Control Configuration. .Example -PS C:\> {{ Add code here }} +PS C:\> Get-AzKubernetesConfiguration -ResourceGroupName azps_test_group -ClusterName azps_test_cluster -ClusterType ConnectedClusters -{{ Add output here }} +Name Type +---- ---- +azpstestk8s01 Microsoft.KubernetesConfiguration/sourceControlConfigurations +azpstestk8s02 Microsoft.KubernetesConfiguration/sourceControlConfigurations .Example -PS C:\> {{ Add code here }} +PS C:\> Get-AzKubernetesConfiguration -ResourceGroupName azps_test_group -ClusterName azps_test_cluster -ClusterType ConnectedClusters -Name azpstestk8s01 -{{ Add output here }} +Name Type +---- ---- +azpstestk8s01 Microsoft.KubernetesConfiguration/sourceControlConfigurations .Inputs Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfiguration +Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfiguration .Notes COMPLEX PARAMETER PROPERTIES @@ -31,22 +44,23 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ClusterName ]: The name of the kubernetes cluster. - [ClusterResourceName ]: The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or connectedClusters (for OnPrem K8S clusters). - [ClusterRp ]: The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or Microsoft.Kubernetes (for OnPrem K8S clusters). + [ClusterResourceName ]: The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. + [ClusterRp ]: The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. [ExtensionName ]: Name of the Extension. + [FluxConfigurationName ]: Name of the Flux Configuration. [Id ]: Resource identity path [OperationId ]: operation Id - [ResourceGroupName ]: The name of the resource group. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [SourceControlConfigurationName ]: Name of the Source Control Configuration. - [SubscriptionId ]: The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000) + [SubscriptionId ]: The ID of the target subscription. .Link https://docs.microsoft.com/powershell/module/az.kubernetesconfiguration/get-azkubernetesconfiguration #> function Get-AzKubernetesConfiguration { - [Alias('Get-AzK8sConfiguration')] - [OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfiguration])] - [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] - param( + [Alias('Get-AzK8sConfiguration')] + [OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfiguration])] + [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] + param( [Parameter(ParameterSetName='Get', Mandatory)] [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] @@ -56,9 +70,11 @@ function Get-AzKubernetesConfiguration { [Parameter(ParameterSetName='Get', Mandatory)] [Parameter(ParameterSetName='List', Mandatory)] + [ValidateSet('ConnectedClusters', 'ManagedClusters')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [System.String] - # The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or connectedClusters (for OnPrem K8S clusters). + # The Kubernetes cluster resource name - i.e. + # managedClusters, connectedClusters, provisionedClusters. ${ClusterType}, [Parameter(ParameterSetName='Get', Mandatory)] @@ -73,6 +89,7 @@ function Get-AzKubernetesConfiguration { [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [System.String] # The name of the resource group. + # The name is case insensitive. ${ResourceGroupName}, [Parameter(ParameterSetName='Get')] @@ -80,9 +97,7 @@ function Get-AzKubernetesConfiguration { [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String[]] - # The Azure subscription ID. - # This is a GUID-formatted string (e.g. - # 00000000-0000-0000-0000-000000000000) + # The ID of the target subscription. ${SubscriptionId}, [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] @@ -141,19 +156,13 @@ function Get-AzKubernetesConfiguration { ) process { - if ($PSBoundParameters.ContainsKey('ClusterType')) { - if ($ClusterType -eq 'ManagedClusters') { - $PSBoundParameters.Add('ClusterRp', 'Microsoft.ContainerService') - } - elseif ($ClusterType -eq 'ConnectedClusters') { - $PSBoundParameters.Add('ClusterRp', 'Microsoft.Kubernetes') - } - } - else { - $PSBoundParameters.Add('ClusterType', 'ConnectedClusters') - $PSBoundParameters.Add('ClusterRp', 'Microsoft.Kubernetes') - } + if ($ClusterType -eq 'ManagedClusters') { + $PSBoundParameters.Add('ClusterRp', 'Microsoft.ContainerService') + } + elseif ($ClusterType -eq 'ConnectedClusters') { + $PSBoundParameters.Add('ClusterRp', 'Microsoft.Kubernetes') + } Az.KubernetesConfiguration.internal\Get-AzKubernetesConfiguration @PSBoundParameters } -} +} \ No newline at end of file diff --git a/src/KubernetesConfiguration/custom/Get-AzKubernetesConfigurationFlux.ps1 b/src/KubernetesConfiguration/custom/Get-AzKubernetesConfigurationFlux.ps1 new file mode 100644 index 000000000000..b72c6340a055 --- /dev/null +++ b/src/KubernetesConfiguration/custom/Get-AzKubernetesConfigurationFlux.ps1 @@ -0,0 +1,163 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Gets details of the Flux Configuration. +.Description +Gets details of the Flux Configuration. +.Example +PS C:\> {{ Add code here }} + +{{ Add output here }} +.Example +PS C:\> {{ Add code here }} + +{{ Add output here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfiguration +.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. + [ClusterResourceName ]: The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. + [ClusterRp ]: The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. + [ExtensionName ]: Name of the Extension. + [FluxConfigurationName ]: Name of the Flux Configuration. + [Id ]: Resource identity path + [OperationId ]: operation Id + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SourceControlConfigurationName ]: Name of the Source Control Configuration. + [SubscriptionId ]: The ID of the target subscription. +.Link +https://docs.microsoft.com/powershell/module/az.kubernetesconfiguration/get-azkubernetesconfigurationflux +#> +function Get-AzKubernetesConfigurationFlux { + [Alias('Get-AzK8sConfigurationFlux')] + [OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfiguration])] + [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] + param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [System.String] + # The name of the kubernetes cluster. + ${ClusterName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [ValidateSet('ConnectedClusters', 'ManagedClusters')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [System.String] + # The Kubernetes cluster resource name - i.e. + # managedClusters, connectedClusters, provisionedClusters. + ${ClusterType}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Alias('FluxConfigurationName')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [System.String] + # Name of the Flux Configuration. + ${Name}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentity] + # 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.KubernetesConfiguration.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + + process { + if ($ClusterType -eq 'ManagedClusters') { + $PSBoundParameters.Add('ClusterRp', 'Microsoft.ContainerService') + } + elseif ($ClusterType -eq 'ConnectedClusters') { + $PSBoundParameters.Add('ClusterRp', 'Microsoft.Kubernetes') + } + + Az.KubernetesConfiguration.internal\Get-AzKubernetesConfigurationFlux @PSBoundParameters + } +} diff --git a/src/KubernetesConfiguration/custom/Get-AzKubernetesExtension.ps1 b/src/KubernetesConfiguration/custom/Get-AzKubernetesExtension.ps1 index 9f02434e7e45..a881775c910f 100644 --- a/src/KubernetesConfiguration/custom/Get-AzKubernetesExtension.ps1 +++ b/src/KubernetesConfiguration/custom/Get-AzKubernetesExtension.ps1 @@ -1,7 +1,6 @@ # ---------------------------------------------------------------------------------- -# -# Copyright Microsoft Corporation +# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at @@ -11,6 +10,8 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. # ---------------------------------------------------------------------------------- <# @@ -19,18 +20,22 @@ Gets Kubernetes Cluster Extension. .Description Gets Kubernetes Cluster Extension. .Example -PS C:\> {{ Add code here }} +PS C:\> Get-AzKubernetesExtension -ClusterName azps_test_cluster -ClusterType ConnectedClusters -Name azps_test_extension -ResourceGroupName azps_test_group -{{ Add output here }} +Name ExtensionType Version ProvisioningState AutoUpgradeMinorVersion ReleaseTrain ResourceGroupName +---- ------------- ------- ----------------- ----------------------- ------------ ----------------- +azps_test_extension microsoft.arcdataservices 1.0.16701001 Succeeded True Stable azps_test_group .Example -PS C:\> {{ Add code here }} +PS C:\> Get-AzKubernetesExtension -ClusterName azps_test_cluster -ClusterType ConnectedClusters -ResourceGroupName azps_test_group -{{ Add output here }} +Name ExtensionType Version ProvisioningState AutoUpgradeMinorVersion ReleaseTrain ResourceGroupName +---- ------------- ------- ----------------- ----------------------- ------------ ----------------- +azps_test_extension microsoft.arcdataservices 1.0.16701001 Succeeded True Stable azps_test_group .Inputs Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtension +Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtension .Notes COMPLEX PARAMETER PROPERTIES @@ -38,63 +43,63 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ClusterName ]: The name of the kubernetes cluster. - [ClusterResourceName ]: The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or connectedClusters (for OnPrem K8S clusters). - [ClusterRp ]: The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or Microsoft.Kubernetes (for OnPrem K8S clusters). + [ClusterResourceName ]: The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. + [ClusterRp ]: The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. [ExtensionName ]: Name of the Extension. + [FluxConfigurationName ]: Name of the Flux Configuration. [Id ]: Resource identity path [OperationId ]: operation Id - [ResourceGroupName ]: The name of the resource group. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [SourceControlConfigurationName ]: Name of the Source Control Configuration. - [SubscriptionId ]: The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000) + [SubscriptionId ]: The ID of the target subscription. .Link https://docs.microsoft.com/powershell/module/az.kubernetesconfiguration/get-azkubernetesextension #> function Get-AzKubernetesExtension { [Alias('Get-AzK8sExtension')] - [OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtension])] - [CmdletBinding(DefaultParameterSetName = 'List', PositionalBinding = $false)] + [OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtension])] + [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( - [Parameter(ParameterSetName = 'Get', Mandatory)] - [Parameter(ParameterSetName = 'List', Mandatory)] + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [System.String] # The name of the kubernetes cluster. ${ClusterName}, - [Parameter(ParameterSetName = 'Get', Mandatory)] - [Parameter(ParameterSetName = 'List', Mandatory)] + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] [ValidateSet('ConnectedClusters', 'ManagedClusters')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [System.String] - # The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or connectedClusters (for OnPrem K8S clusters). + # The Kubernetes cluster resource name - i.e. + # managedClusters, connectedClusters, provisionedClusters. ${ClusterType}, - [Parameter(ParameterSetName = 'Get', Mandatory)] + [Parameter(ParameterSetName='Get', Mandatory)] [Alias('ExtensionName')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [System.String] # Name of the Extension. ${Name}, - [Parameter(ParameterSetName = 'Get', Mandatory)] - [Parameter(ParameterSetName = 'List', Mandatory)] + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, - [Parameter(ParameterSetName = 'Get')] - [Parameter(ParameterSetName = 'List')] + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='List')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.DefaultInfo(Script = '(Get-AzContext).Subscription.Id')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String[]] - # The Azure subscription ID. - # This is a GUID-formatted string (e.g. - # 00000000-0000-0000-0000-000000000000) + # The ID of the target subscription. ${SubscriptionId}, - [Parameter(ParameterSetName = 'GetViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentity] # Identity Parameter @@ -159,4 +164,4 @@ function Get-AzKubernetesExtension { Az.KubernetesConfiguration.internal\Get-AzKubernetesExtension @PSBoundParameters } -} +} \ No newline at end of file diff --git a/src/KubernetesConfiguration/custom/New-AzKubernetesConfiguration.ps1 b/src/KubernetesConfiguration/custom/New-AzKubernetesConfiguration.ps1 index 4c0e701096e2..e32e227d18a0 100644 --- a/src/KubernetesConfiguration/custom/New-AzKubernetesConfiguration.ps1 +++ b/src/KubernetesConfiguration/custom/New-AzKubernetesConfiguration.ps1 @@ -1,7 +1,6 @@ # ---------------------------------------------------------------------------------- -# -# Copyright Microsoft Corporation +# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at @@ -11,6 +10,8 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. # ---------------------------------------------------------------------------------- <# @@ -18,110 +19,124 @@ Create a new Kubernetes Source Control Configuration. .Description Create a new Kubernetes Source Control Configuration. +.Example +PS C:\> New-AzKubernetesConfiguration -ResourceGroupName azps_test_group -ClusterName azps_test_cluster -Name azpstestk8s01 -RepositoryUrl http://github.com/xxxx + +Name Type +---- ---- +azpstestk8s01 Microsoft.KubernetesConfiguration/sourceControlConfigurations +.Example +PS C:\> New-AzKubernetesConfiguration -ResourceGroupName azps_test_group -ClusterName azps_test_cluster -Name azpstestk8s02 -RepositoryUrl http://github.com/xxxx -OperatorNamespace namespace-t01 + +Name Type +---- ---- +azpstestk8s02 Microsoft.KubernetesConfiguration/sourceControlConfigurations + .Outputs -Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfiguration +Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfiguration .Link https://docs.microsoft.com/powershell/module/az.kubernetesconfiguration/new-azkubernetesconfiguration #> function New-AzKubernetesConfiguration { [Alias('New-AzK8sConfiguration')] - [OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfiguration])] + [OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfiguration])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( - [Parameter(Mandatory, HelpMessage="The name of the kubernetes cluster.")] + [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [System.String] # The name of the kubernetes cluster. ${ClusterName}, - - [Parameter(HelpMessage="The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or connectedClusters (for OnPrem K8S clusters).")] + + [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [System.String] - # The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or connectedClusters (for OnPrem K8S clusters). + # The Kubernetes cluster resource name - i.e. + # managedClusters, connectedClusters, provisionedClusters. ${ClusterType}, - - [Parameter(Mandatory, HelpMessage="Name of the Source Control Configuration.")] + + [Parameter(Mandatory)] [Alias('SourceControlConfigurationName')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [System.String] # Name of the Source Control Configuration. ${Name}, - - [Parameter(Mandatory, HelpMessage="The name of the resource group.")] + + [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [System.String] # The name of the resource group. + # The name is case insensitive. ${ResourceGroupName}, - - [Parameter(HelpMessage="The Azure subscription ID.")] + + [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] - # The Azure subscription ID. - # This is a GUID-formatted string (e.g. - # 00000000-0000-0000-0000-000000000000) + # The ID of the target subscription. ${SubscriptionId}, - - [Parameter(Mandatory, HelpMessage="Url of the SourceControl Repository.")] + + [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] - [System.String] - # Url of the SourceControl Repository. - ${RepositoryUrl}, - - [Parameter(HelpMessage="Option to enable Helm Operator for this git configuration.")] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IConfigurationProtectedSettings]))] + [System.Collections.Hashtable] + # Name-value pairs of protected configuration settings for the configuration + ${ConfigurationProtectedSetting}, + + [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.Management.Automation.SwitchParameter] [switch] # Option to enable Helm Operator for this git configuration. ${EnableHelmOperator}, - - [Parameter(HelpMessage="Values override for the operator Helm chart.")] + + [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] # Values override for the operator Helm chart. ${HelmOperatorChartValue}, - - [Parameter(HelpMessage="Version of the operator Helm chart.")] + + [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] # Version of the operator Helm chart. ${HelmOperatorChartVersion}, - - [Parameter(HelpMessage="Instance name of the operator - identifying the specific configuration.")] + + [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] # Instance name of the operator - identifying the specific configuration. ${OperatorInstanceName}, - - [Parameter(HelpMessage="The namespace to which this operator is installed to. Maximum of 253 lower case alphanumeric characters, hyphen and period only.")] + + [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] # The namespace to which this operator is installed to. # Maximum of 253 lower case alphanumeric characters, hyphen and period only. ${OperatorNamespace}, - - [Parameter(HelpMessage="Any Parameters for the Operator instance in string format.")] + + [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] # Any Parameters for the Operator instance in string format. - ${OperatorParameter}, + ${OperatorParam}, [Parameter(HelpMessage="If passed set the scope of the Configuration to Cluster (default is nameSpace).")] [switch] ${ClusterScoped}, - [Parameter(HelpMessage="If passed set the scope of the Configuration to Cluster (default is nameSpace).")] + [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] - # Base64-encoded known_hosts contents containing public SSH keys required to access private Git instances - ${SshKnownHost}, + # Url of the SourceControl Repository. + ${RepositoryUrl}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IConfigurationProtectedSettings]))] - [System.Collections.Hashtable] - # Name-value pairs of protected configuration settings for the configuration - ${ConfigurationProtectedSetting}, - + [System.String] + # Base64-encoded known_hosts contents containing public SSH keys required to access private Git instances + ${SshKnownHost}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -129,47 +144,47 @@ function New-AzKubernetesConfiguration { [System.Management.Automation.PSObject] # The credentials, account, tenant, and subscription used for communication with Azure. ${DefaultProfile}, - + [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, - + [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, - + [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, - + [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, - + [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, - + [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials} ) - + process { if ($PSBoundParameters.ContainsKey('ClusterScoped')) { $PSBoundParameters.OperatorScope = [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.OperatorScopeType]::Cluster @@ -177,14 +192,10 @@ function New-AzKubernetesConfiguration { $PSBoundParameters.OperatorScope = [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.OperatorScopeType]::Namespace } - if ($PSBoundParameters.ContainsKey('ClusterType')) { - if ($ClusterType -eq 'ManagedClusters') { - $PSBoundParameters.Add('ClusterRp', 'Microsoft.ContainerService') - } elseif ($ClusterType -eq 'ConnectedClusters') { - $PSBoundParameters.Add('ClusterRp', 'Microsoft.Kubernetes') - } - } else { - $PSBoundParameters.Add('ClusterType', 'ConnectedClusters') + if ($ClusterType -eq 'ManagedClusters') { + $PSBoundParameters.Add('ClusterRp', 'Microsoft.ContainerService') + } + elseif ($ClusterType -eq 'ConnectedClusters') { $PSBoundParameters.Add('ClusterRp', 'Microsoft.Kubernetes') } @@ -192,4 +203,4 @@ function New-AzKubernetesConfiguration { Az.KubernetesConfiguration.internal\New-AzKubernetesConfiguration @PSBoundParameters } -} +} \ No newline at end of file diff --git a/src/KubernetesConfiguration/custom/New-AzKubernetesConfigurationFlux.ps1 b/src/KubernetesConfiguration/custom/New-AzKubernetesConfigurationFlux.ps1 new file mode 100644 index 000000000000..a0e49cf1682e --- /dev/null +++ b/src/KubernetesConfiguration/custom/New-AzKubernetesConfigurationFlux.ps1 @@ -0,0 +1,299 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create a new Kubernetes Flux Configuration. +.Description +Create a new Kubernetes Flux Configuration. +.Example +PS C:\> {{ Add code here }} + +{{ Add output here }} +.Example +PS C:\> {{ Add code here }} + +{{ Add output here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfiguration +.Link +https://docs.microsoft.com/powershell/module/az.kubernetesconfiguration/new-azkubernetesconfigurationflux +#> +function New-AzKubernetesConfigurationFlux { + [Alias('New-AzK8sConfigurationFlux')] + [OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfiguration])] + [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] + param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [System.String] + # The name of the kubernetes cluster. + ${ClusterName}, + + [Parameter(Mandatory)] + [ValidateSet('ConnectedClusters', 'ManagedClusters')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [System.String] + # The Kubernetes cluster resource name - i.e. + # managedClusters, connectedClusters, provisionedClusters. + ${ClusterType}, + + [Parameter(Mandatory)] + [Alias('FluxConfigurationName')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [System.String] + # Name of the Flux Configuration. + ${Name}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + ${SubscriptionId}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.Security.SecureString] + # Plaintext access key used to securely access the S3 bucket + ${BucketAccessKey}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Specify whether to use insecure communication when puling data from the S3 bucket. + ${BucketInsecure}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided configuration secrets. + ${BucketLocalAuthRef}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # The bucket name to sync from the url endpoint for the flux configuration. + ${BucketName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.Int64] + # The interval at which to re-reconcile the cluster git repository source with the remote. + ${BucketSyncIntervalInSecond}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.Int64] + # The maximum time to attempt to reconcile the cluster git repository source with the remote. + ${BucketTimeoutInSecond}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # The URL to sync for the flux configuration S3 bucket. + ${BucketUrl}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesConfigurationProtectedSettings]))] + [System.Collections.Hashtable] + # Key-value pairs of protected configuration settings for the configuration + ${ConfigurationProtectedSetting}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # Base64-encoded HTTPS certificate authority contents used to access git private git repositories over HTTPS + ${GitRepositoryHttpsCaCert}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # Plaintext HTTPS username used to access private git repositories over HTTPS + ${GitRepositoryHttpsUser}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided configuration secrets. + ${GitRepositoryLocalAuthRef}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # Base64-encoded known_hosts value containing public SSH keys required to access private git repositories over SSH + ${GitRepositorySshKnownHost}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.Int64] + # The interval at which to re-reconcile the cluster git repository source with the remote. + ${GitRepositorySyncIntervalInSecond}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.Int64] + # The maximum time to attempt to reconcile the cluster git repository source with the remote. + ${GitRepositoryTimeoutInSecond}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # The URL to sync for the flux configuration git repository. + ${GitRepositoryUrl}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesKustomizations]))] + [System.Collections.Hashtable] + # Array of kustomizations used to reconcile the artifact pulled by the source type on the cluster. + ${Kustomization}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # The namespace to which this configuration is installed to. + # Maximum of 253 lower case alphanumeric characters, hyphen and period only. + ${Namespace}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # The git repository branch name to checkout. + ${RepositoryRefBranch}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # The commit SHA to checkout. + # This value must be combined with the branch name to be valid. + # This takes precedence over semver. + ${RepositoryRefCommit}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # The semver range used to match against git repository tags. + # This takes precedence over tag. + ${RepositoryRefSemver}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # The git repository tag name to checkout. + # This takes precedence over branch. + ${RepositoryRefTag}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ScopeType])] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ScopeType] + # Scope at which the operator will be installed. + ${Scope}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType])] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType] + # Source Kind to pull the configuration data from. + ${SourceKind}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Whether this configuration should suspend its reconciliation of its kustomizations and sources. + ${Suspend}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + + process { + if ($ClusterType -eq 'ManagedClusters') { + $PSBoundParameters.Add('ClusterRp', 'Microsoft.ContainerService') + } + elseif ($ClusterType -eq 'ConnectedClusters') { + $PSBoundParameters.Add('ClusterRp', 'Microsoft.Kubernetes') + } + + Az.KubernetesConfiguration.internal\New-AzKubernetesConfigurationFlux @PSBoundParameters + } +} diff --git a/src/KubernetesConfiguration/custom/New-AzKubernetesExtension.ps1 b/src/KubernetesConfiguration/custom/New-AzKubernetesExtension.ps1 index e78c6b204294..f00a88e7f4d2 100644 --- a/src/KubernetesConfiguration/custom/New-AzKubernetesExtension.ps1 +++ b/src/KubernetesConfiguration/custom/New-AzKubernetesExtension.ps1 @@ -1,7 +1,6 @@ # ---------------------------------------------------------------------------------- -# -# Copyright Microsoft Corporation +# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at @@ -11,6 +10,8 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. # ---------------------------------------------------------------------------------- <# @@ -21,18 +22,18 @@ Create a new Kubernetes Cluster Extension. .Example PS C:\> New-AzKubernetesExtension -ClusterName azps_test_cluster -ClusterType ConnectedClusters -Name azps_test_extension -ResourceGroupName azps_test_group -ExtensionType Microsoft.Arcdataservices -Name ExtensionType Version ProvisioningState AutoUpgradeMinorVersion ResourceGroupName ----- ------------- ------- ----------------- ----------------------- ----------------- -azps_test_extension microsoft.arcdataservices 1.0.16701001 Succeeded True azps_test_group +Name ExtensionType Version ProvisioningState AutoUpgradeMinorVersion ReleaseTrain ResourceGroupName +---- ------------- ------- ----------------- ----------------------- ------------ ----------------- +azps_test_extension microsoft.arcdataservices 1.0.16701001 Succeeded True Stable azps_test_group .Outputs -Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtension +Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtension .Link https://docs.microsoft.com/powershell/module/az.kubernetesconfiguration/new-azkubernetesextension #> function New-AzKubernetesExtension { [Alias('New-AzK8sExtension')] - [OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtension])] + [OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtension])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -45,7 +46,8 @@ function New-AzKubernetesExtension { [ValidateSet('ConnectedClusters', 'ManagedClusters')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [System.String] - # The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or connectedClusters (for OnPrem K8S clusters). + # The Kubernetes cluster resource name - i.e. + # managedClusters, connectedClusters, provisionedClusters. ${ClusterType}, [Parameter(Mandatory)] @@ -66,15 +68,13 @@ function New-AzKubernetesExtension { [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] - # The Azure subscription ID. - # This is a GUID-formatted string (e.g. - # 00000000-0000-0000-0000-000000000000) + # The ID of the target subscription. ${SubscriptionId}, [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ResourceIdentityType])] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.AksIdentityType])] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ResourceIdentityType] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.AksIdentityType] # The identity type. ${AkAssignedIdentityType}, @@ -93,14 +93,14 @@ function New-AzKubernetesExtension { [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesConfigurationProtectedSettings]))] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesConfigurationProtectedSettings]))] [System.Collections.Hashtable] # Configuration settings that are sensitive, as name-value pairs for configuring this extension. ${ConfigurationProtectedSetting}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesConfigurationSettings]))] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesConfigurationSettings]))] [System.Collections.Hashtable] # Configuration settings, as name-value pairs for configuring this extension. ${ConfigurationSetting}, @@ -136,8 +136,8 @@ function New-AzKubernetesExtension { [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] - # Version of the extension for this extension, if it is 'pinned' to a specific version. - # autoUpgradeMinorVersion must be 'false'. + # User-specified version of the extension for this extension to 'pin'. + # To use 'version', autoUpgradeMinorVersion must be 'false'. ${Version}, [Parameter()] @@ -208,6 +208,18 @@ function New-AzKubernetesExtension { $PSBoundParameters.Add('ClusterRp', 'Microsoft.Kubernetes') } + if ($Name -ieq 'flux') { + if ($Name -ceq 'flux') { + if ($IdentityType -cne 'SystemAssigned') { + Write-Error "The value of the parameter -IdentityType must be 'SystemAssigned'." + return + } + } else { + Write-Error "The value of the parameter -Name must be 'flux'." + return + } + } + Az.KubernetesConfiguration.internal\New-AzKubernetesExtension @PSBoundParameters } } \ No newline at end of file diff --git a/src/KubernetesConfiguration/custom/Remove-AzKubernetesConfiguration.ps1 b/src/KubernetesConfiguration/custom/Remove-AzKubernetesConfiguration.ps1 index 9d27eb917316..f2220eddab29 100644 --- a/src/KubernetesConfiguration/custom/Remove-AzKubernetesConfiguration.ps1 +++ b/src/KubernetesConfiguration/custom/Remove-AzKubernetesConfiguration.ps1 @@ -1,7 +1,6 @@ # ---------------------------------------------------------------------------------- -# -# Copyright Microsoft Corporation +# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at @@ -11,6 +10,8 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. # ---------------------------------------------------------------------------------- <# @@ -18,6 +19,14 @@ This will delete the YAML file used to set up the Source control configuration, thus stopping future sync from the source repo. .Description This will delete the YAML file used to set up the Source control configuration, thus stopping future sync from the source repo. +.Example +PS C:\> Remove-AzKubernetesConfiguration -ResourceGroupName azps_test_group -ClusterName azps_test_cluster -Name azpstestk8s01 -ClusterType ConnectedClusters + +.Example +PS C:\> $kubConf = Get-AzKubernetesConfiguration -ClusterName azps_test_cluster -ClusterType ConnectedClusters -ResourceGroupName azps_test_group -Name azpstestk8s02 +PS C:\> Remove-AzKubernetesConfiguration -InputObject $kubConf + + .Inputs Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentity .Outputs @@ -29,12 +38,15 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ClusterName ]: The name of the kubernetes cluster. - [ClusterResourceName ]: The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or connectedClusters (for OnPrem K8S clusters). - [ClusterRp ]: The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or Microsoft.Kubernetes (for OnPrem K8S clusters). + [ClusterResourceName ]: The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. + [ClusterRp ]: The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. + [ExtensionName ]: Name of the Extension. + [FluxConfigurationName ]: Name of the Flux Configuration. [Id ]: Resource identity path - [ResourceGroupName ]: The name of the resource group. + [OperationId ]: operation Id + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [SourceControlConfigurationName ]: Name of the Source Control Configuration. - [SubscriptionId ]: The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000) + [SubscriptionId ]: The ID of the target subscription. .Link https://docs.microsoft.com/powershell/module/az.kubernetesconfiguration/remove-azkubernetesconfiguration #> @@ -43,41 +55,41 @@ function Remove-AzKubernetesConfiguration { [OutputType([System.Boolean])] [CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( - [Parameter(ParameterSetName='Delete', Mandatory, HelpMessage="The name of the kubernetes cluster.")] + [Parameter(ParameterSetName='Delete', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [System.String] # The name of the kubernetes cluster. ${ClusterName}, - [Parameter(ParameterSetName='Delete', Mandatory, HelpMessage="The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or connectedClusters (for OnPrem K8S clusters).")] + [Parameter(ParameterSetName='Delete', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [System.String] - # The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or connectedClusters (for OnPrem K8S clusters). + # The Kubernetes cluster resource name - i.e. + # managedClusters, connectedClusters, provisionedClusters. ${ClusterType}, - [Parameter(ParameterSetName='Delete', Mandatory, HelpMessage="Name of the Source Control Configuration.")] + [Parameter(ParameterSetName='Delete', Mandatory)] [Alias('SourceControlConfigurationName')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [System.String] # Name of the Source Control Configuration. ${Name}, - [Parameter(ParameterSetName='Delete', Mandatory, HelpMessage="The name of the resource group.")] + [Parameter(ParameterSetName='Delete', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [System.String] # The name of the resource group. + # The name is case insensitive. ${ResourceGroupName}, - [Parameter(ParameterSetName='Delete', HelpMessage="The Azure subscription ID.")] + [Parameter(ParameterSetName='Delete')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] - # The Azure subscription ID. - # This is a GUID-formatted string (e.g. - # 00000000-0000-0000-0000-000000000000) + # The ID of the target subscription. ${SubscriptionId}, - [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline, HelpMessage="Identity Parameter")] + [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentity] # Identity Parameter @@ -150,17 +162,14 @@ function Remove-AzKubernetesConfiguration { ${ProxyUseDefaultCredentials} ) - process { - - if ($PSBoundParameters.ContainsKey('ClusterType')) { - if ($ClusterType -eq 'ManagedClusters') { - $PSBoundParameters.Add('ClusterRp', 'Microsoft.ContainerService') - } elseif ($ClusterType -eq 'ConnectedClusters') { - $PSBoundParameters.Add('ClusterRp', 'Microsoft.Kubernetes') - } + if ($ClusterType -eq 'ManagedClusters') { + $PSBoundParameters.Add('ClusterRp', 'Microsoft.ContainerService') + } + elseif ($ClusterType -eq 'ConnectedClusters') { + $PSBoundParameters.Add('ClusterRp', 'Microsoft.Kubernetes') } Az.KubernetesConfiguration.internal\Remove-AzKubernetesConfiguration @PSBoundParameters } -} +} \ No newline at end of file diff --git a/src/KubernetesConfiguration/custom/Remove-AzKubernetesConfigurationFlux.ps1 b/src/KubernetesConfiguration/custom/Remove-AzKubernetesConfigurationFlux.ps1 new file mode 100644 index 000000000000..798cd3642358 --- /dev/null +++ b/src/KubernetesConfiguration/custom/Remove-AzKubernetesConfigurationFlux.ps1 @@ -0,0 +1,183 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +This will delete the YAML file used to set up the Flux Configuration, thus stopping future sync from the source repo. +.Description +This will delete the YAML file used to set up the Flux Configuration, thus stopping future sync from the source repo. +.Example +PS C:\> {{ Add code here }} + +{{ Add output here }} +.Example +PS C:\> {{ Add code here }} + +{{ Add output here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentity +.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. + [ClusterResourceName ]: The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. + [ClusterRp ]: The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. + [ExtensionName ]: Name of the Extension. + [FluxConfigurationName ]: Name of the Flux Configuration. + [Id ]: Resource identity path + [OperationId ]: operation Id + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SourceControlConfigurationName ]: Name of the Source Control Configuration. + [SubscriptionId ]: The ID of the target subscription. +.Link +https://docs.microsoft.com/powershell/module/az.kubernetesconfiguration/remove-azkubernetesconfigurationflux +#> +function Remove-AzKubernetesConfigurationFlux { + [Alias('Remove-AzK8sConfigurationFlux')] + [OutputType([System.Boolean])] + [CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] + param( + [Parameter(ParameterSetName='Delete', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [System.String] + # The name of the kubernetes cluster. + ${ClusterName}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [ValidateSet('ConnectedClusters', 'ManagedClusters')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [System.String] + # The Kubernetes cluster resource name - i.e. + # managedClusters, connectedClusters, provisionedClusters. + ${ClusterType}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [Alias('FluxConfigurationName')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [System.String] + # Name of the Flux Configuration. + ${Name}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Delete')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Query')] + [System.Management.Automation.SwitchParameter] + # Delete the extension resource in Azure - not the normal asynchronous delete. + ${ForceDelete}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Returns true when the command succeeds + ${PassThru}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + + process { + if ($ClusterType -eq 'ManagedClusters') { + $PSBoundParameters.Add('ClusterRp', 'Microsoft.ContainerService') + } + elseif ($ClusterType -eq 'ConnectedClusters') { + $PSBoundParameters.Add('ClusterRp', 'Microsoft.Kubernetes') + } + + Az.KubernetesConfiguration.internal\Remove-AzKubernetesConfigurationFlux @PSBoundParameters + } +} diff --git a/src/KubernetesConfiguration/custom/Remove-AzKubernetesExtension.ps1 b/src/KubernetesConfiguration/custom/Remove-AzKubernetesExtension.ps1 index bcd6c78450f1..9dd542dc1494 100644 --- a/src/KubernetesConfiguration/custom/Remove-AzKubernetesExtension.ps1 +++ b/src/KubernetesConfiguration/custom/Remove-AzKubernetesExtension.ps1 @@ -1,7 +1,6 @@ # ---------------------------------------------------------------------------------- -# -# Copyright Microsoft Corporation +# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at @@ -11,6 +10,8 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. # ---------------------------------------------------------------------------------- <# @@ -21,13 +22,8 @@ This will cause the Agent to Uninstall the extension from the cluster. Delete a Kubernetes Cluster Extension. This will cause the Agent to Uninstall the extension from the cluster. .Example -PS C:\> {{ Add code here }} +PS C:\> Remove-AzKubernetesExtension -ClusterName azps_test_cluster -ClusterType ConnectedClusters -Name azps_test_extension -ResourceGroupName azps_test_group -{{ Add output here }} -.Example -PS C:\> {{ Add code here }} - -{{ Add output here }} .Inputs Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentity @@ -40,59 +36,59 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ClusterName ]: The name of the kubernetes cluster. - [ClusterResourceName ]: The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or connectedClusters (for OnPrem K8S clusters). - [ClusterRp ]: The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or Microsoft.Kubernetes (for OnPrem K8S clusters). + [ClusterResourceName ]: The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. + [ClusterRp ]: The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. [ExtensionName ]: Name of the Extension. + [FluxConfigurationName ]: Name of the Flux Configuration. [Id ]: Resource identity path [OperationId ]: operation Id - [ResourceGroupName ]: The name of the resource group. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [SourceControlConfigurationName ]: Name of the Source Control Configuration. - [SubscriptionId ]: The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000) + [SubscriptionId ]: The ID of the target subscription. .Link https://docs.microsoft.com/powershell/module/az.kubernetesconfiguration/remove-azkubernetesextension #> function Remove-AzKubernetesExtension { [Alias('Remove-AzK8sExtension')] [OutputType([System.Boolean])] - [CmdletBinding(DefaultParameterSetName = 'Delete', PositionalBinding = $false, SupportsShouldProcess, ConfirmImpact = 'Medium')] + [CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( - [Parameter(ParameterSetName = 'Delete', Mandatory)] + [Parameter(ParameterSetName='Delete', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [System.String] # The name of the kubernetes cluster. ${ClusterName}, - [Parameter(ParameterSetName = 'Delete', Mandatory)] + [Parameter(ParameterSetName='Delete', Mandatory)] [ValidateSet('ConnectedClusters', 'ManagedClusters')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [System.String] - # The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or connectedClusters (for OnPrem K8S clusters). + # The Kubernetes cluster resource name - i.e. + # managedClusters, connectedClusters, provisionedClusters. ${ClusterType}, - [Parameter(ParameterSetName = 'Delete', Mandatory)] + [Parameter(ParameterSetName='Delete', Mandatory)] [Alias('ExtensionName')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [System.String] # Name of the Extension. ${Name}, - [Parameter(ParameterSetName = 'Delete', Mandatory)] + [Parameter(ParameterSetName='Delete', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, - [Parameter(ParameterSetName = 'Delete')] + [Parameter(ParameterSetName='Delete')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.DefaultInfo(Script = '(Get-AzContext).Subscription.Id')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] - # The Azure subscription ID. - # This is a GUID-formatted string (e.g. - # 00000000-0000-0000-0000-000000000000) + # The ID of the target subscription. ${SubscriptionId}, - [Parameter(ParameterSetName = 'DeleteViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentity] # Identity Parameter @@ -181,4 +177,4 @@ function Remove-AzKubernetesExtension { Az.KubernetesConfiguration.internal\Remove-AzKubernetesExtension @PSBoundParameters } -} +} \ No newline at end of file diff --git a/src/KubernetesConfiguration/custom/Update-AzKubernetesConfigurationFlux.ps1 b/src/KubernetesConfiguration/custom/Update-AzKubernetesConfigurationFlux.ps1 new file mode 100644 index 000000000000..ec1cf3987dd1 --- /dev/null +++ b/src/KubernetesConfiguration/custom/Update-AzKubernetesConfigurationFlux.ps1 @@ -0,0 +1,310 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Update an existing Kubernetes Flux Configuration. +.Description +Update an existing Kubernetes Flux Configuration. +.Example +PS C:\> {{ Add code here }} + +{{ Add output here }} +.Example +PS C:\> {{ Add code here }} + +{{ Add output here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentity +.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. + [ClusterResourceName ]: The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. + [ClusterRp ]: The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. + [ExtensionName ]: Name of the Extension. + [FluxConfigurationName ]: Name of the Flux Configuration. + [Id ]: Resource identity path + [OperationId ]: operation Id + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SourceControlConfigurationName ]: Name of the Source Control Configuration. + [SubscriptionId ]: The ID of the target subscription. +.Link +https://docs.microsoft.com/powershell/module/az.kubernetesconfiguration/update-azkubernetesconfigurationflux +#> +function Update-AzKubernetesConfigurationFlux { + [Alias('Update-AzK8sConfigurationFlux')] + [OutputType([System.Boolean])] + [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] + param( + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [System.String] + # The name of the kubernetes cluster. + ${ClusterName}, + + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [ValidateSet('ConnectedClusters', 'ManagedClusters')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [System.String] + # The Kubernetes cluster resource name - i.e. + # managedClusters, connectedClusters, provisionedClusters. + ${ClusterType}, + + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Alias('FluxConfigurationName')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [System.String] + # Name of the Flux Configuration. + ${Name}, + + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.Security.SecureString] + # Plaintext access key used to securely access the S3 bucket + ${BucketAccessKey}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Specify whether to use insecure communication when puling data from the S3 bucket. + ${BucketInsecure}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided configuration secrets. + ${BucketLocalAuthRef}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # The bucket name to sync from the url endpoint for the flux configuration. + ${BucketName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.Int64] + # The interval at which to re-reconcile the cluster git repository source with the remote. + ${BucketSyncIntervalInSecond}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.Int64] + # The maximum time to attempt to reconcile the cluster git repository source with the remote. + ${BucketTimeoutInSecond}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # The URL to sync for the flux configuration S3 bucket. + ${BucketUrl}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesConfigurationProtectedSettings]))] + [System.Collections.Hashtable] + # Key-value pairs of protected configuration settings for the configuration + ${ConfigurationProtectedSetting}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # Base64-encoded HTTPS certificate authority contents used to access git private git repositories over HTTPS + ${GitRepositoryHttpsCaCert}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # Plaintext HTTPS username used to access private git repositories over HTTPS + ${GitRepositoryHttpsUser}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided configuration secrets. + ${GitRepositoryLocalAuthRef}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # Base64-encoded known_hosts value containing public SSH keys required to access private git repositories over SSH + ${GitRepositorySshKnownHost}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.Int64] + # The interval at which to re-reconcile the cluster git repository source with the remote. + ${GitRepositorySyncIntervalInSecond}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.Int64] + # The maximum time to attempt to reconcile the cluster git repository source with the remote. + ${GitRepositoryTimeoutInSecond}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # The URL to sync for the flux configuration git repository. + ${GitRepositoryUrl}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesKustomizations]))] + [System.Collections.Hashtable] + # Array of kustomizations used to reconcile the artifact pulled by the source type on the cluster. + ${Kustomization}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # The git repository branch name to checkout. + ${RepositoryRefBranch}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # The commit SHA to checkout. + # This value must be combined with the branch name to be valid. + # This takes precedence over semver. + ${RepositoryRefCommit}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # The semver range used to match against git repository tags. + # This takes precedence over tag. + ${RepositoryRefSemver}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # The git repository tag name to checkout. + # This takes precedence over branch. + ${RepositoryRefTag}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType])] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType] + # Source Kind to pull the configuration data from. + ${SourceKind}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Whether this configuration should suspend its reconciliation of its kustomizations and sources. + ${Suspend}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + + process { + if ($ClusterType -eq 'ManagedClusters') { + $PSBoundParameters.Add('ClusterRp', 'Microsoft.ContainerService') + } + elseif ($ClusterType -eq 'ConnectedClusters') { + $PSBoundParameters.Add('ClusterRp', 'Microsoft.Kubernetes') + } + + Az.KubernetesConfiguration.internal\Update-AzKubernetesConfigurationFlux @PSBoundParameters + } +} diff --git a/src/KubernetesConfiguration/custom/Update-AzKubernetesExtension.ps1 b/src/KubernetesConfiguration/custom/Update-AzKubernetesExtension.ps1 index be85f05a13f5..5e2ee6763498 100644 --- a/src/KubernetesConfiguration/custom/Update-AzKubernetesExtension.ps1 +++ b/src/KubernetesConfiguration/custom/Update-AzKubernetesExtension.ps1 @@ -20,18 +20,16 @@ Patch an existing Kubernetes Cluster Extension. .Description Patch an existing Kubernetes Cluster Extension. .Example -PS C:\> {{ Add code here }} +PS C:\> Update-AzKubernetesExtension -ClusterName azps_test_cluster -ClusterType ConnectedClusters -Name azps_test_extension -ResourceGroupName azps_test_group -ConfigurationProtectedSetting @{"aa"="bb"} -{{ Add output here }} -.Example -PS C:\> {{ Add code here }} - -{{ Add output here }} +Name ExtensionType Version ProvisioningState AutoUpgradeMinorVersion ReleaseTrain ResourceGroupName +---- ------------- ------- ----------------- ----------------------- ------------ ----------------- +azps_test_extension microsoft.arcdataservices 1.0.16701001 Succeeded True Stable azps_test_group .Inputs Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtension +Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtension .Notes COMPLEX PARAMETER PROPERTIES @@ -39,20 +37,21 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ClusterName ]: The name of the kubernetes cluster. - [ClusterResourceName ]: The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or connectedClusters (for OnPrem K8S clusters). - [ClusterRp ]: The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or Microsoft.Kubernetes (for OnPrem K8S clusters). + [ClusterResourceName ]: The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. + [ClusterRp ]: The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. [ExtensionName ]: Name of the Extension. + [FluxConfigurationName ]: Name of the Flux Configuration. [Id ]: Resource identity path [OperationId ]: operation Id - [ResourceGroupName ]: The name of the resource group. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [SourceControlConfigurationName ]: Name of the Source Control Configuration. - [SubscriptionId ]: The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000) + [SubscriptionId ]: The ID of the target subscription. .Link https://docs.microsoft.com/powershell/module/az.kubernetesconfiguration/update-azkubernetesextension #> function Update-AzKubernetesExtension { [Alias('Update-AzK8sExtension')] - [OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtension])] + [OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtension])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] @@ -65,7 +64,8 @@ function Update-AzKubernetesExtension { [ValidateSet('ConnectedClusters', 'ManagedClusters')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [System.String] - # The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or connectedClusters (for OnPrem K8S clusters). + # The Kubernetes cluster resource name - i.e. + # managedClusters, connectedClusters, provisionedClusters. ${ClusterType}, [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] @@ -86,9 +86,7 @@ function Update-AzKubernetesExtension { [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] - # The Azure subscription ID. - # This is a GUID-formatted string (e.g. - # 00000000-0000-0000-0000-000000000000) + # The ID of the target subscription. ${SubscriptionId}, [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)] @@ -106,14 +104,14 @@ function Update-AzKubernetesExtension { [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtensionPropertiesConfigurationProtectedSettings]))] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtensionPropertiesConfigurationProtectedSettings]))] [System.Collections.Hashtable] # Configuration settings that are sensitive, as name-value pairs for configuring this extension. ${ConfigurationProtectedSetting}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtensionPropertiesConfigurationSettings]))] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtensionPropertiesConfigurationSettings]))] [System.Collections.Hashtable] # Configuration settings, as name-value pairs for configuring this extension. ${ConfigurationSetting}, @@ -202,4 +200,4 @@ function Update-AzKubernetesExtension { Az.KubernetesConfiguration.internal\Update-AzKubernetesExtension @PSBoundParameters } -} +} \ No newline at end of file diff --git a/src/KubernetesConfiguration/examples/Get-AzKubernetesConfigFluxOperationStatus.md b/src/KubernetesConfiguration/examples/Get-AzKubernetesConfigFluxOperationStatus.md new file mode 100644 index 000000000000..7be05209221b --- /dev/null +++ b/src/KubernetesConfiguration/examples/Get-AzKubernetesConfigFluxOperationStatus.md @@ -0,0 +1,10 @@ +### Example 1: Get Async Operation status +```powershell +PS C:\> Get-AzKubernetesConfigFluxOperationStatus -ClusterName azpstest_cluster_arc -ClusterType ConnectedClusters -FluxConfigurationName azpstestflux-k8s -ResourceGroupName azpstest_gp -OperationId e9871335-7ba8-4100-8cb4-73b3464eb863 + +Name ResourceGroupName Status +---- ----------------- ------ +e9871335-7ba8-4100-8cb4-73b3464eb863 azpstest_gp Succeeded +``` + +Get Async Operation status \ No newline at end of file diff --git a/src/KubernetesConfiguration/examples/Get-AzKubernetesConfiguration.md b/src/KubernetesConfiguration/examples/Get-AzKubernetesConfiguration.md index d12c398f8272..57e52f1bbc9e 100644 --- a/src/KubernetesConfiguration/examples/Get-AzKubernetesConfiguration.md +++ b/src/KubernetesConfiguration/examples/Get-AzKubernetesConfiguration.md @@ -1,22 +1,22 @@ ### Example 1: List details of the Source Control Configuration. ```powershell -PS C:\> Get-AzKubernetesConfiguration -ResourceGroupName azps_test_group -ClusterName azps_test_cluster -ClusterType ConnectedClusters +PS C:\> Get-AzKubernetesConfiguration -ResourceGroupName azpstest_gp -ClusterName azpstest_cluster_arc -ClusterType ConnectedClusters -Name Type ----- ---- -azpstestk8s01 Microsoft.KubernetesConfiguration/sourceControlConfigurations -azpstestk8s02 Microsoft.KubernetesConfiguration/sourceControlConfigurations +Name RepositoryUrl ResourceGroupName +---- ------------- ----------------- +azpstestk8s http://github.com/xxxx azpstest_gp +azpstestk8s-operator http://github.com/xxxx azpstest_gp ``` List details of the Source Control Configuration. ### Example 2: Gets details of the Source Control Configuration. ```powershell -PS C:\> Get-AzKubernetesConfiguration -ResourceGroupName azps_test_group -ClusterName azps_test_cluster -ClusterType ConnectedClusters -Name azpstestk8s01 +PS C:\> Get-AzKubernetesConfiguration -ResourceGroupName azpstest_gp -ClusterName azpstest_cluster_arc -ClusterType ConnectedClusters -Name azpstestk8s -Name Type ----- ---- -azpstestk8s01 Microsoft.KubernetesConfiguration/sourceControlConfigurations +Name RepositoryUrl ResourceGroupName +---- ------------- ----------------- +azpstestk8s http://github.com/xxxx azpstest_gp ``` Gets details of the Source Control Configuration. \ No newline at end of file diff --git a/src/KubernetesConfiguration/examples/Get-AzKubernetesConfigurationFlux.md b/src/KubernetesConfiguration/examples/Get-AzKubernetesConfigurationFlux.md new file mode 100644 index 000000000000..d519d95ebc25 --- /dev/null +++ b/src/KubernetesConfiguration/examples/Get-AzKubernetesConfigurationFlux.md @@ -0,0 +1,21 @@ +### Example 1: List details of the Flux Configuration. +```powershell +PS C:\> Get-AzKubernetesConfigurationFlux -ClusterName azpstest_cluster_arc -ClusterType ConnectedClusters -ResourceGroupName azpstest_gp + +Name ResourceGroupName +---- ----------------- +azpstestflux-k8s azpstest_gp +``` + +List details of the Flux Configuration. + +### Example 2: Gets details of the Flux Configuration. +```powershell +PS C:\> Get-AzKubernetesConfigurationFlux -ClusterName azpstest_cluster_arc -ClusterType ConnectedClusters -Name azpstestflux-k8s -ResourceGroupName azpstest_gp + +Name ResourceGroupName +---- ----------------- +azpstestflux-k8s azpstest_gp +``` + +Gets details of the Flux Configuration. \ No newline at end of file diff --git a/src/KubernetesConfiguration/examples/Get-AzKubernetesExtension.md b/src/KubernetesConfiguration/examples/Get-AzKubernetesExtension.md index 96c814ebaec3..57c85cb08927 100644 --- a/src/KubernetesConfiguration/examples/Get-AzKubernetesExtension.md +++ b/src/KubernetesConfiguration/examples/Get-AzKubernetesExtension.md @@ -1,21 +1,22 @@ ### Example 1: Gets Kubernetes Cluster Extension. ```powershell -PS C:\> Get-AzKubernetesExtension -ClusterName azps_test_cluster -ClusterType ConnectedClusters -Name azps_test_extension -ResourceGroupName azps_test_group +PS C:\> Get-AzKubernetesExtension -ClusterName azpstest_cluster_arc -ClusterType ConnectedClusters -Name azpstest-extension -ResourceGroupName azpstest_gp -Name ExtensionType Version ProvisioningState AutoUpgradeMinorVersion ReleaseTrain ResourceGroupName ----- ------------- ------- ----------------- ----------------------- ------------ ----------------- -azps_test_extension microsoft.arcdataservices 1.0.16701001 Succeeded True Stable azps_test_group +Name ExtensionType Version ProvisioningState AutoUpgradeMinorVersion ReleaseTrain +---- ------------- ------- ----------------- ----------------------- ------------ +azpstest-extension azuremonitor-containers 2.9.2 Succeeded True Stable ``` Gets Kubernetes Cluster Extension. ### Example 2: List Kubernetes Cluster Extension. ```powershell -PS C:\> Get-AzKubernetesExtension -ClusterName azps_test_cluster -ClusterType ConnectedClusters -ResourceGroupName azps_test_group +PS C:\> Get-AzKubernetesExtension -ClusterName azpstest_cluster_arc -ClusterType ConnectedClusters -ResourceGroupName azpstest_gp -Name ExtensionType Version ProvisioningState AutoUpgradeMinorVersion ReleaseTrain ResourceGroupName ----- ------------- ------- ----------------- ----------------------- ------------ ----------------- -azps_test_extension microsoft.arcdataservices 1.0.16701001 Succeeded True Stable azps_test_group +Name ExtensionType Version ProvisioningState AutoUpgradeMinorVersion ReleaseTrain +---- ------------- ------- ----------------- ----------------------- ------------ +azpstest-extension azuremonitor-containers 2.9.2 Succeeded True Stable +flux microsoft.flux 1.0.0 Succeeded True Stable ``` List Kubernetes Cluster Extension. \ No newline at end of file diff --git a/src/KubernetesConfiguration/examples/New-AzKubernetesConfiguration.md b/src/KubernetesConfiguration/examples/New-AzKubernetesConfiguration.md index 871ebde50e5c..2b6812f031df 100644 --- a/src/KubernetesConfiguration/examples/New-AzKubernetesConfiguration.md +++ b/src/KubernetesConfiguration/examples/New-AzKubernetesConfiguration.md @@ -1,21 +1,23 @@ -### Example 1: Create a configuration for kubernetes cluster +### Example 1: Create a configuration for Kubernetes Cluster ```powershell -PS C:\> New-AzKubernetesConfiguration -ResourceGroupName azps_test_group -ClusterName azps_test_cluster -Name azpstestk8s01 -RepositoryUrl http://github.com/xxxx +PS C:\> New-AzConnectedKubernetes -ClusterName azpstest_cluster_arc -ResourceGroupName azpstest_gp -Location eastus +PS C:\> New-AzKubernetesConfiguration -ResourceGroupName azpstest_gp -ClusterName azpstest_cluster_arc -Name azpstestk8s -RepositoryUrl http://github.com/xxxx -ClusterType ConnectedClusters -Name Type ----- ---- -azpstestk8s01 Microsoft.KubernetesConfiguration/sourceControlConfigurations +Name RepositoryUrl ResourceGroupName +---- ------------- ----------------- +azpstestk8s http://github.com/xxxx azpstest_gp ``` -This command creates a configuration for kubernetes cluster. +This command creates a configuration for Kubernetes Cluster. -### Example 2: Create a configuration for kubernetes cluster with specify paramter OperatorNamespace +### Example 2: Create a configuration for Kubernetes Cluster with specify paramter OperatorNamespace ```powershell -PS C:\> New-AzKubernetesConfiguration -ResourceGroupName azps_test_group -ClusterName azps_test_cluster -Name azpstestk8s02 -RepositoryUrl http://github.com/xxxx -OperatorNamespace namespace-t01 +PS C:\> New-AzConnectedKubernetes -ClusterName azpstest_cluster_arc -ResourceGroupName azpstest_gp -Location eastus +PS C:\> New-AzKubernetesConfiguration -ResourceGroupName azpstest_gp -ClusterName azpstest_cluster_arc -Name azpstestk8s-operator -RepositoryUrl http://github.com/xxxx -OperatorNamespace namespace-t01 -ClusterType ConnectedClusters -Name Type ----- ---- -azpstestk8s02 Microsoft.KubernetesConfiguration/sourceControlConfigurations +Name RepositoryUrl ResourceGroupName +---- ------------- ----------------- +azpstestk8s-operator http://github.com/xxxx azpstest_gp ``` -This command creates a configuration in the new operator namespace for kubernetes cluster. Note, Unable to create a configuration in an existing operator namespace. \ No newline at end of file +This command creates a configuration in the new operator namespace for Kubernetes Cluster. Note, Unable to create a configuration in an existing operator namespace. \ No newline at end of file diff --git a/src/KubernetesConfiguration/examples/New-AzKubernetesConfigurationFlux.md b/src/KubernetesConfiguration/examples/New-AzKubernetesConfigurationFlux.md new file mode 100644 index 000000000000..4275c1c84ceb --- /dev/null +++ b/src/KubernetesConfiguration/examples/New-AzKubernetesConfigurationFlux.md @@ -0,0 +1,23 @@ +### Example 1: Create a new Kubernetes Flux Configuration. +```powershell +PS C:\> $kustomizations = @{ + infra=@{ + Name = "infra" + Path = "./infrastructure" + Prune = "true" + }; + apps=@{ + Name = "apps" + Path = "./apps/staging" + Prune = "true" + DependsOn = @("infra") + } +} +PS C:\> New-AzKubernetesConfigurationFlux -ClusterName azpstest_cluster_arc -ClusterType ConnectedClusters -Name azpstestflux-k8s -ResourceGroupName azpstest_gp -Namespace namespace-t01 -Scope 'cluster' -GitRepositoryUrl https://github.com/Azure/gitops-flux2-kustomize-helm-mt -RepositoryRefBranch main -SourceKind 'GitRepository' -GitRepositorySyncIntervalInSecond 600 -GitRepositoryTimeoutInSecond 600 -Suspend:$false -Kustomization $kustomizations + +Name ResourceGroupName +---- ----------------- +azpstestflux-k8s azpstest_gp +``` + +Create a new Kubernetes Flux Configuration. \ No newline at end of file diff --git a/src/KubernetesConfiguration/examples/New-AzKubernetesExtension.md b/src/KubernetesConfiguration/examples/New-AzKubernetesExtension.md index 795767b722a5..e41fadbea03f 100644 --- a/src/KubernetesConfiguration/examples/New-AzKubernetesExtension.md +++ b/src/KubernetesConfiguration/examples/New-AzKubernetesExtension.md @@ -1,10 +1,21 @@ ### Example 1: Create a new Kubernetes Cluster Extension. ```powershell -PS C:\> New-AzKubernetesExtension -ClusterName azps_test_cluster -ClusterType ConnectedClusters -Name azps_test_extension -ResourceGroupName azps_test_group -ExtensionType Microsoft.Arcdataservices +PS C:\> New-AzKubernetesExtension -ClusterName azpstest_cluster_arc -ClusterType ConnectedClusters -Name azpstest-extension -ResourceGroupName azpstest_gp -ExtensionType azuremonitor-containers -Name ExtensionType Version ProvisioningState AutoUpgradeMinorVersion ReleaseTrain ResourceGroupName ----- ------------- ------- ----------------- ----------------------- ------------ ----------------- -azps_test_extension microsoft.arcdataservices 1.0.16701001 Succeeded True Stable azps_test_group +Name ExtensionType Version ProvisioningState AutoUpgradeMinorVersion ReleaseTrain +---- ------------- ------- ----------------- ----------------------- ------------ +azpstest-extension azuremonitor-containers 2.9.2 Succeeded True Stable ``` -Create a new Kubernetes Cluster Extension. \ No newline at end of file +Create a new Kubernetes Cluster Extension. + +### Example 2: Create a Flux Cluster Extension. +```powershell +PS C:\> New-AzKubernetesExtension -ClusterName azpstest_cluster_arc -ClusterType ConnectedClusters -Name flux -ResourceGroupName azpstest_gp -ExtensionType microsoft.flux -AutoUpgradeMinorVersion -ClusterReleaseNamespace flux-system -IdentityType 'SystemAssigned' + +Name ExtensionType Version ProvisioningState AutoUpgradeMinorVersion ReleaseTrain +---- ------------- ------- ----------------- ----------------------- ------------ +flux microsoft.flux 1.0.0 Succeeded True Stable +``` + +Create a Flux Cluster Extension. \ No newline at end of file diff --git a/src/KubernetesConfiguration/examples/Remove-AzKubernetesConfiguration.md b/src/KubernetesConfiguration/examples/Remove-AzKubernetesConfiguration.md index b18336c7f5ce..b029927cdf02 100644 --- a/src/KubernetesConfiguration/examples/Remove-AzKubernetesConfiguration.md +++ b/src/KubernetesConfiguration/examples/Remove-AzKubernetesConfiguration.md @@ -1,16 +1,16 @@ -### Example 1: Remove a configuation of kubernetes cluster by name +### Example 1: Remove a configuation of Kubernetes Cluster by name ```powershell -PS C:\> Remove-AzKubernetesConfiguration -ResourceGroupName azps_test_group -ClusterName azps_test_cluster -Name azpstestk8s01 -ClusterType ConnectedClusters +PS C:\> Remove-AzKubernetesConfiguration -ResourceGroupName azpstest_gp -ClusterName azpstest_cluster_arc -Name azpstestk8s -ClusterType ConnectedClusters ``` -This command removes a configuation of kubernetes cluster by name. +This command removes a configuation of Kubernetes Cluster by name. -### Example 2: Remove a configuation of kubernetes cluster by object +### Example 2: Remove a configuation of Kubernetes Cluster by object ```powershell -PS C:\> $kubConf = Get-AzKubernetesConfiguration -ClusterName azps_test_cluster -ClusterType ConnectedClusters -ResourceGroupName azps_test_group -Name azpstestk8s02 -PS C:\> Remove-AzKubernetesConfiguration -InputObject $kubConf +PS C:\> $kubConf = Get-AzKubernetesConfiguration -ClusterName azpstest_cluster_arc -ClusterType ConnectedClusters -ResourceGroupName azpstest_gp -Name azpstestk8s-operator +Remove-AzKubernetesConfiguration -InputObject $kubConf ``` -This command removes a configuation of kubernetes cluster by object. \ No newline at end of file +This command removes a configuation of Kubernetes Cluster by object. \ No newline at end of file diff --git a/src/KubernetesConfiguration/examples/Remove-AzKubernetesConfigurationFlux.md b/src/KubernetesConfiguration/examples/Remove-AzKubernetesConfigurationFlux.md new file mode 100644 index 000000000000..a3dcab4a91e5 --- /dev/null +++ b/src/KubernetesConfiguration/examples/Remove-AzKubernetesConfigurationFlux.md @@ -0,0 +1,15 @@ +### Example 1: This will delete the YAML file used to set up the Flux Configuration, thus stopping future sync from the source repo. +```powershell +PS C:\> Remove-AzKubernetesConfigurationFlux -ClusterName azpstest_cluster_arc -ClusterType ConnectedClusters -Name azpstestflux-k8s -ResourceGroupName azpstest_gp + +``` + +This will delete the YAML file used to set up the Flux Configuration, thus stopping future sync from the source repo. + +### Example 2: This will delete the YAML file used to set up the Flux Configuration, thus stopping future sync from the source repo. +```powershell +PS C:\> Get-AzKubernetesConfigurationFlux -ClusterName azpstest_cluster_arc -ClusterType ConnectedClusters -Name azpstestflux-k8s -ResourceGroupName azpstest_gp | Remove-AzKubernetesConfigurationFlux + +``` + +This will delete the YAML file used to set up the Flux Configuration, thus stopping future sync from the source repo. \ No newline at end of file diff --git a/src/KubernetesConfiguration/examples/Remove-AzKubernetesExtension.md b/src/KubernetesConfiguration/examples/Remove-AzKubernetesExtension.md index b21d4208cd30..0db2969c062e 100644 --- a/src/KubernetesConfiguration/examples/Remove-AzKubernetesExtension.md +++ b/src/KubernetesConfiguration/examples/Remove-AzKubernetesExtension.md @@ -1,6 +1,6 @@ ### Example 1: Delete a Kubernetes Cluster Extension. ```powershell -PS C:\> Remove-AzKubernetesExtension -ClusterName azps_test_cluster -ClusterType ConnectedClusters -Name azps_test_extension -ResourceGroupName azps_test_group +PS C:\> Remove-AzKubernetesExtension -ClusterName azpstest_cluster_arc -ClusterType ConnectedClusters -Name azpstest-extension -ResourceGroupName azpstest_gp ``` diff --git a/src/KubernetesConfiguration/examples/Update-AzKubernetesConfigurationFlux.md b/src/KubernetesConfiguration/examples/Update-AzKubernetesConfigurationFlux.md new file mode 100644 index 000000000000..0b98f2e3a749 --- /dev/null +++ b/src/KubernetesConfiguration/examples/Update-AzKubernetesConfigurationFlux.md @@ -0,0 +1,21 @@ +### Example 1: Update an existing Kubernetes Flux Configuration. +```powershell +PS C:\> Update-AzKubernetesConfigurationFlux -ClusterName azpstest_cluster_arc -ClusterType ConnectedClusters -Name azpstestflux-k8s -ResourceGroupName azpstest_gp -GitRepositoryUrl https://github.com/fluxcd/flux2-kustomize-helm-example -RepositoryRefBranch main -SourceKind 'GitRepository' -GitRepositorySyncIntervalInSecond 600 -GitRepositoryTimeoutInSecond 600 -Suspend:$false + +Name ResourceGroupName +---- ----------------- +azpstestflux-k8s azpstest_gp +``` + +Update an existing Kubernetes Flux Configuration. + +### Example 2: Update an existing Kubernetes Flux Configuration. +```powershell +PS C:\> Get-AzKubernetesConfigurationFlux -ClusterName azpstest_cluster_arc -ClusterType ConnectedClusters -Name azpstestflux-k8s -ResourceGroupName azpstest_gp | Update-AzKubernetesConfigurationFlux -GitRepositoryUrl https://github.com/fluxcd/flux2-kustomize-helm-example -RepositoryRefBranch main -SourceKind 'GitRepository' -GitRepositorySyncIntervalInSecond 600 -GitRepositoryTimeoutInSecond 600 -Suspend:$false + +Name ResourceGroupName +---- ----------------- +azpstestflux-k8s azpstest_gp +``` + +Update an existing Kubernetes Flux Configuration. \ No newline at end of file diff --git a/src/KubernetesConfiguration/examples/Update-AzKubernetesExtension.md b/src/KubernetesConfiguration/examples/Update-AzKubernetesExtension.md index 49a01007693e..a331ef962065 100644 --- a/src/KubernetesConfiguration/examples/Update-AzKubernetesExtension.md +++ b/src/KubernetesConfiguration/examples/Update-AzKubernetesExtension.md @@ -1,10 +1,10 @@ ### Example 1: Update an existing Kubernetes Cluster Extension. ```powershell -PS C:\> Update-AzKubernetesExtension -ClusterName azps_test_cluster -ClusterType ConnectedClusters -Name azps_test_extension -ResourceGroupName azps_test_group -ConfigurationProtectedSetting @{"aa"="bb"} +PS C:\> Update-AzKubernetesExtension -ClusterName azpstest_cluster_arc -ClusterType ConnectedClusters -Name azpstest-extension -ResourceGroupName azpstest_gp -ConfigurationProtectedSetting @{"aa"="bb"} -Name ExtensionType Version ProvisioningState AutoUpgradeMinorVersion ReleaseTrain ResourceGroupName ----- ------------- ------- ----------------- ----------------------- ------------ ----------------- -azps_test_extension microsoft.arcdataservices 1.0.16701001 Succeeded True Stable azps_test_group +Name ExtensionType Version ProvisioningState AutoUpgradeMinorVersion ReleaseTrain +---- ------------- ------- ----------------- ----------------------- ------------ +azpstest-extension azuremonitor-containers 2.9.2 Succeeded True Stable ``` Update an existing Kubernetes Cluster Extension. \ No newline at end of file diff --git a/src/KubernetesConfiguration/exports/Get-AzKubernetesConfigFluxOperationStatus.ps1 b/src/KubernetesConfiguration/exports/Get-AzKubernetesConfigFluxOperationStatus.ps1 new file mode 100644 index 000000000000..42def9c01184 --- /dev/null +++ b/src/KubernetesConfiguration/exports/Get-AzKubernetesConfigFluxOperationStatus.ps1 @@ -0,0 +1,227 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Get Async Operation status +.Description +Get Async Operation status +.Example +PS C:\> Get-AzKubernetesConfigFluxOperationStatus -ClusterName azpstest_cluster_arc -ClusterType ConnectedClusters -FluxConfigurationName azpstestflux-k8s -ResourceGroupName azpstest_gp -OperationId e9871335-7ba8-4100-8cb4-73b3464eb863 + +Name ResourceGroupName Status +---- ----------------- ------ +e9871335-7ba8-4100-8cb4-73b3464eb863 azpstest_gp Succeeded + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResult +.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. + [ClusterResourceName ]: The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. + [ClusterRp ]: The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. + [ExtensionName ]: Name of the Extension. + [FluxConfigurationName ]: Name of the Flux Configuration. + [Id ]: Resource identity path + [OperationId ]: operation Id + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SourceControlConfigurationName ]: Name of the Source Control Configuration. + [SubscriptionId ]: The ID of the target subscription. +.Link +https://docs.microsoft.com/powershell/module/az.kubernetesconfiguration/get-azkubernetesconfigfluxoperationstatus +#> +function Get-AzKubernetesConfigFluxOperationStatus { +[Alias('Get-AzK8sConfigFluxOperationStatus')] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResult])] +[CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [System.String] + # The name of the kubernetes cluster. + ${ClusterName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [System.String] + # The Kubernetes cluster resource name - i.e. + # managedClusters, connectedClusters, provisionedClusters. + ${ClusterType}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [System.String] + # Name of the Flux Configuration. + ${FluxConfigurationName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [System.String] + # operation Id + ${OperationId}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Get')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentity] + # 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.KubernetesConfiguration.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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 + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Get = 'Az.KubernetesConfiguration.custom\Get-AzKubernetesConfigFluxOperationStatus'; + GetViaIdentity = 'Az.KubernetesConfiguration.custom\Get-AzKubernetesConfigFluxOperationStatus'; + } + if (('Get') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/KubernetesConfiguration/exports/Get-AzKubernetesConfiguration.ps1 b/src/KubernetesConfiguration/exports/Get-AzKubernetesConfiguration.ps1 index 9a07e2752667..24449342b4a3 100644 --- a/src/KubernetesConfiguration/exports/Get-AzKubernetesConfiguration.ps1 +++ b/src/KubernetesConfiguration/exports/Get-AzKubernetesConfiguration.ps1 @@ -20,23 +20,23 @@ Gets details of the Source Control Configuration. .Description Gets details of the Source Control Configuration. .Example -PS C:\> Get-AzKubernetesConfiguration -ResourceGroupName azps_test_group -ClusterName azps_test_cluster -ClusterType ConnectedClusters +PS C:\> Get-AzKubernetesConfiguration -ResourceGroupName azpstest_gp -ClusterName azpstest_cluster_arc -ClusterType ConnectedClusters -Name Type ----- ---- -azpstestk8s01 Microsoft.KubernetesConfiguration/sourceControlConfigurations -azpstestk8s02 Microsoft.KubernetesConfiguration/sourceControlConfigurations +Name RepositoryUrl ResourceGroupName +---- ------------- ----------------- +azpstestk8s http://github.com/xxxx azpstest_gp +azpstestk8s-operator http://github.com/xxxx azpstest_gp .Example -PS C:\> Get-AzKubernetesConfiguration -ResourceGroupName azps_test_group -ClusterName azps_test_cluster -ClusterType ConnectedClusters -Name azpstestk8s01 +PS C:\> Get-AzKubernetesConfiguration -ResourceGroupName azpstest_gp -ClusterName azpstest_cluster_arc -ClusterType ConnectedClusters -Name azpstestk8s -Name Type ----- ---- -azpstestk8s01 Microsoft.KubernetesConfiguration/sourceControlConfigurations +Name RepositoryUrl ResourceGroupName +---- ------------- ----------------- +azpstestk8s http://github.com/xxxx azpstest_gp .Inputs Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfiguration +Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfiguration .Notes COMPLEX PARAMETER PROPERTIES @@ -44,20 +44,21 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ClusterName ]: The name of the kubernetes cluster. - [ClusterResourceName ]: The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or connectedClusters (for OnPrem K8S clusters). - [ClusterRp ]: The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or Microsoft.Kubernetes (for OnPrem K8S clusters). + [ClusterResourceName ]: The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. + [ClusterRp ]: The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. [ExtensionName ]: Name of the Extension. + [FluxConfigurationName ]: Name of the Flux Configuration. [Id ]: Resource identity path [OperationId ]: operation Id - [ResourceGroupName ]: The name of the resource group. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [SourceControlConfigurationName ]: Name of the Source Control Configuration. - [SubscriptionId ]: The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000) + [SubscriptionId ]: The ID of the target subscription. .Link https://docs.microsoft.com/powershell/module/az.kubernetesconfiguration/get-azkubernetesconfiguration #> function Get-AzKubernetesConfiguration { [Alias('Get-AzK8sConfiguration')] -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfiguration])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfiguration])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='List', Mandatory)] @@ -71,7 +72,8 @@ param( [Parameter(ParameterSetName='Get', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [System.String] - # The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or connectedClusters (for OnPrem K8S clusters). + # The Kubernetes cluster resource name - i.e. + # managedClusters, connectedClusters, provisionedClusters. ${ClusterType}, [Parameter(ParameterSetName='List', Mandatory)] @@ -79,6 +81,7 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [System.String] # The name of the resource group. + # The name is case insensitive. ${ResourceGroupName}, [Parameter(ParameterSetName='List')] @@ -86,9 +89,7 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String[]] - # The Azure subscription ID. - # This is a GUID-formatted string (e.g. - # 00000000-0000-0000-0000-000000000000) + # The ID of the target subscription. ${SubscriptionId}, [Parameter(ParameterSetName='Get', Mandatory)] @@ -160,6 +161,24 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + $mapping = @{ List = 'Az.KubernetesConfiguration.custom\Get-AzKubernetesConfiguration'; Get = 'Az.KubernetesConfiguration.custom\Get-AzKubernetesConfiguration'; @@ -175,6 +194,7 @@ begin { $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } @@ -183,15 +203,32 @@ process { try { $steppablePipeline.Process($_) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} end { try { $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} +} } diff --git a/src/KubernetesConfiguration/exports/Get-AzKubernetesConfigurationFlux.ps1 b/src/KubernetesConfiguration/exports/Get-AzKubernetesConfigurationFlux.ps1 new file mode 100644 index 000000000000..cc08c6b5fe6c --- /dev/null +++ b/src/KubernetesConfiguration/exports/Get-AzKubernetesConfigurationFlux.ps1 @@ -0,0 +1,233 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Gets details of the Flux Configuration. +.Description +Gets details of the Flux Configuration. +.Example +PS C:\> Get-AzKubernetesConfigurationFlux -ClusterName azpstest_cluster_arc -ClusterType ConnectedClusters -ResourceGroupName azpstest_gp + +Name ResourceGroupName +---- ----------------- +azpstestflux-k8s azpstest_gp +.Example +PS C:\> Get-AzKubernetesConfigurationFlux -ClusterName azpstest_cluster_arc -ClusterType ConnectedClusters -Name azpstestflux-k8s -ResourceGroupName azpstest_gp + +Name ResourceGroupName +---- ----------------- +azpstestflux-k8s azpstest_gp + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfiguration +.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. + [ClusterResourceName ]: The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. + [ClusterRp ]: The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. + [ExtensionName ]: Name of the Extension. + [FluxConfigurationName ]: Name of the Flux Configuration. + [Id ]: Resource identity path + [OperationId ]: operation Id + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SourceControlConfigurationName ]: Name of the Source Control Configuration. + [SubscriptionId ]: The ID of the target subscription. +.Link +https://docs.microsoft.com/powershell/module/az.kubernetesconfiguration/get-azkubernetesconfigurationflux +#> +function Get-AzKubernetesConfigurationFlux { +[Alias('Get-AzK8sConfigurationFlux')] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfiguration])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='List', Mandatory)] + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [System.String] + # The name of the kubernetes cluster. + ${ClusterName}, + + [Parameter(ParameterSetName='List', Mandatory)] + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [System.String] + # The Kubernetes cluster resource name - i.e. + # managedClusters, connectedClusters, provisionedClusters. + ${ClusterType}, + + [Parameter(ParameterSetName='List', Mandatory)] + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='List')] + [Parameter(ParameterSetName='Get')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + ${SubscriptionId}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Alias('FluxConfigurationName')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [System.String] + # Name of the Flux Configuration. + ${Name}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentity] + # 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.KubernetesConfiguration.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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 + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + List = 'Az.KubernetesConfiguration.custom\Get-AzKubernetesConfigurationFlux'; + Get = 'Az.KubernetesConfiguration.custom\Get-AzKubernetesConfigurationFlux'; + GetViaIdentity = 'Az.KubernetesConfiguration.custom\Get-AzKubernetesConfigurationFlux'; + } + if (('List', 'Get') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/KubernetesConfiguration/exports/Get-AzKubernetesExtension.ps1 b/src/KubernetesConfiguration/exports/Get-AzKubernetesExtension.ps1 index ab4e107c90d4..35ee66aefd9f 100644 --- a/src/KubernetesConfiguration/exports/Get-AzKubernetesExtension.ps1 +++ b/src/KubernetesConfiguration/exports/Get-AzKubernetesExtension.ps1 @@ -20,22 +20,23 @@ Gets Kubernetes Cluster Extension. .Description Gets Kubernetes Cluster Extension. .Example -PS C:\> Get-AzKubernetesExtension -ClusterName azps_test_cluster -ClusterType ConnectedClusters -Name azps_test_extension -ResourceGroupName azps_test_group +PS C:\> Get-AzKubernetesExtension -ClusterName azpstest_cluster_arc -ClusterType ConnectedClusters -Name azpstest-extension -ResourceGroupName azpstest_gp -Name ExtensionType Version ProvisioningState AutoUpgradeMinorVersion ReleaseTrain ResourceGroupName ----- ------------- ------- ----------------- ----------------------- ------------ ----------------- -azps_test_extension microsoft.arcdataservices 1.0.16701001 Succeeded True Stable azps_test_group +Name ExtensionType Version ProvisioningState AutoUpgradeMinorVersion ReleaseTrain +---- ------------- ------- ----------------- ----------------------- ------------ +azpstest-extension azuremonitor-containers 2.9.2 Succeeded True Stable .Example -PS C:\> Get-AzKubernetesExtension -ClusterName azps_test_cluster -ClusterType ConnectedClusters -ResourceGroupName azps_test_group +PS C:\> Get-AzKubernetesExtension -ClusterName azpstest_cluster_arc -ClusterType ConnectedClusters -ResourceGroupName azpstest_gp -Name ExtensionType Version ProvisioningState AutoUpgradeMinorVersion ReleaseTrain ResourceGroupName ----- ------------- ------- ----------------- ----------------------- ------------ ----------------- -azps_test_extension microsoft.arcdataservices 1.0.16701001 Succeeded True Stable azps_test_group +Name ExtensionType Version ProvisioningState AutoUpgradeMinorVersion ReleaseTrain +---- ------------- ------- ----------------- ----------------------- ------------ +azpstest-extension azuremonitor-containers 2.9.2 Succeeded True Stable +flux microsoft.flux 1.0.0 Succeeded True Stable .Inputs Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtension +Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtension .Notes COMPLEX PARAMETER PROPERTIES @@ -43,20 +44,21 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ClusterName ]: The name of the kubernetes cluster. - [ClusterResourceName ]: The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or connectedClusters (for OnPrem K8S clusters). - [ClusterRp ]: The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or Microsoft.Kubernetes (for OnPrem K8S clusters). + [ClusterResourceName ]: The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. + [ClusterRp ]: The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. [ExtensionName ]: Name of the Extension. + [FluxConfigurationName ]: Name of the Flux Configuration. [Id ]: Resource identity path [OperationId ]: operation Id - [ResourceGroupName ]: The name of the resource group. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [SourceControlConfigurationName ]: Name of the Source Control Configuration. - [SubscriptionId ]: The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000) + [SubscriptionId ]: The ID of the target subscription. .Link https://docs.microsoft.com/powershell/module/az.kubernetesconfiguration/get-azkubernetesextension #> function Get-AzKubernetesExtension { [Alias('Get-AzK8sExtension')] -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtension])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtension])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='List', Mandatory)] @@ -70,7 +72,8 @@ param( [Parameter(ParameterSetName='Get', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [System.String] - # The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or connectedClusters (for OnPrem K8S clusters). + # The Kubernetes cluster resource name - i.e. + # managedClusters, connectedClusters, provisionedClusters. ${ClusterType}, [Parameter(ParameterSetName='List', Mandatory)] @@ -86,9 +89,7 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String[]] - # The Azure subscription ID. - # This is a GUID-formatted string (e.g. - # 00000000-0000-0000-0000-000000000000) + # The ID of the target subscription. ${SubscriptionId}, [Parameter(ParameterSetName='Get', Mandatory)] @@ -160,6 +161,24 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + $mapping = @{ List = 'Az.KubernetesConfiguration.custom\Get-AzKubernetesExtension'; Get = 'Az.KubernetesConfiguration.custom\Get-AzKubernetesExtension'; @@ -175,6 +194,7 @@ begin { $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } @@ -183,15 +203,32 @@ process { try { $steppablePipeline.Process($_) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} end { try { $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} +} } diff --git a/src/KubernetesConfiguration/exports/New-AzKubernetesConfiguration.ps1 b/src/KubernetesConfiguration/exports/New-AzKubernetesConfiguration.ps1 index 87794b765a36..9023b071ba9e 100644 --- a/src/KubernetesConfiguration/exports/New-AzKubernetesConfiguration.ps1 +++ b/src/KubernetesConfiguration/exports/New-AzKubernetesConfiguration.ps1 @@ -20,26 +20,28 @@ Create a new Kubernetes Source Control Configuration. .Description Create a new Kubernetes Source Control Configuration. .Example -PS C:\> New-AzKubernetesConfiguration -ResourceGroupName azps_test_group -ClusterName azps_test_cluster -Name azpstestk8s01 -RepositoryUrl http://github.com/xxxx +PS C:\> New-AzConnectedKubernetes -ClusterName azpstest_cluster_arc -ResourceGroupName azpstest_gp -Location eastus +PS C:\> New-AzKubernetesConfiguration -ResourceGroupName azpstest_gp -ClusterName azpstest_cluster_arc -Name azpstestk8s -RepositoryUrl http://github.com/xxxx -ClusterType ConnectedClusters -Name Type ----- ---- -azpstestk8s01 Microsoft.KubernetesConfiguration/sourceControlConfigurations +Name RepositoryUrl ResourceGroupName +---- ------------- ----------------- +azpstestk8s http://github.com/xxxx azpstest_gp .Example -PS C:\> New-AzKubernetesConfiguration -ResourceGroupName azps_test_group -ClusterName azps_test_cluster -Name azpstestk8s02 -RepositoryUrl http://github.com/xxxx -OperatorNamespace namespace-t01 +PS C:\> New-AzConnectedKubernetes -ClusterName azpstest_cluster_arc -ResourceGroupName azpstest_gp -Location eastus +PS C:\> New-AzKubernetesConfiguration -ResourceGroupName azpstest_gp -ClusterName azpstest_cluster_arc -Name azpstestk8s-operator -RepositoryUrl http://github.com/xxxx -OperatorNamespace namespace-t01 -ClusterType ConnectedClusters -Name Type ----- ---- -azpstestk8s02 Microsoft.KubernetesConfiguration/sourceControlConfigurations +Name RepositoryUrl ResourceGroupName +---- ------------- ----------------- +azpstestk8s-operator http://github.com/xxxx azpstest_gp .Outputs -Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfiguration +Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfiguration .Link https://docs.microsoft.com/powershell/module/az.kubernetesconfiguration/new-azkubernetesconfiguration #> function New-AzKubernetesConfiguration { [Alias('New-AzK8sConfiguration')] -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfiguration])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfiguration])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -48,6 +50,13 @@ param( # The name of the kubernetes cluster. ${ClusterName}, + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [System.String] + # The Kubernetes cluster resource name - i.e. + # managedClusters, connectedClusters, provisionedClusters. + ${ClusterType}, + [Parameter(Mandatory)] [Alias('SourceControlConfigurationName')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] @@ -59,26 +68,22 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [System.String] # The name of the resource group. + # The name is case insensitive. ${ResourceGroupName}, - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] - [System.String] - # The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or connectedClusters (for OnPrem K8S clusters). - ${ClusterType}, - [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] - # The Azure subscription ID. + # The ID of the target subscription. ${SubscriptionId}, - [Parameter(Mandatory)] + [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] - [System.String] - # Url of the SourceControl Repository. - ${RepositoryUrl}, + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IConfigurationProtectedSettings]))] + [System.Collections.Hashtable] + # Name-value pairs of protected configuration settings for the configuration + ${ConfigurationProtectedSetting}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] @@ -115,7 +120,7 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] # Any Parameters for the Operator instance in string format. - ${OperatorParameter}, + ${OperatorParam}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] @@ -126,15 +131,14 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] - # If passed set the scope of the Configuration to Cluster (default is nameSpace). - ${SshKnownHost}, + # Url of the SourceControl Repository. + ${RepositoryUrl}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IConfigurationProtectedSettings]))] - [System.Collections.Hashtable] - # Name-value pairs of protected configuration settings for the configuration - ${ConfigurationProtectedSetting}, + [System.String] + # Base64-encoded known_hosts contents containing public SSH keys required to access private Git instances + ${SshKnownHost}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] @@ -191,6 +195,24 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + $mapping = @{ CreateExpanded = 'Az.KubernetesConfiguration.custom\New-AzKubernetesConfiguration'; } @@ -204,6 +226,7 @@ begin { $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } @@ -212,15 +235,32 @@ process { try { $steppablePipeline.Process($_) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} end { try { $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} +} } diff --git a/src/KubernetesConfiguration/exports/New-AzKubernetesConfigurationFlux.ps1 b/src/KubernetesConfiguration/exports/New-AzKubernetesConfigurationFlux.ps1 new file mode 100644 index 000000000000..b4b767bfd7e6 --- /dev/null +++ b/src/KubernetesConfiguration/exports/New-AzKubernetesConfigurationFlux.ps1 @@ -0,0 +1,374 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create a new Kubernetes Flux Configuration. +.Description +Create a new Kubernetes Flux Configuration. +.Example +PS C:\> $kustomizations = @{ + infra=@{ + Name = "infra" + Path = "./infrastructure" + Prune = "true" + }; + apps=@{ + Name = "apps" + Path = "./apps/staging" + Prune = "true" + DependsOn = @("infra") + } +} +PS C:\> New-AzKubernetesConfigurationFlux -ClusterName azpstest_cluster_arc -ClusterType ConnectedClusters -Name azpstestflux-k8s -ResourceGroupName azpstest_gp -Namespace namespace-t01 -Scope 'cluster' -GitRepositoryUrl https://github.com/Azure/gitops-flux2-kustomize-helm-mt -RepositoryRefBranch main -SourceKind 'GitRepository' -GitRepositorySyncIntervalInSecond 600 -GitRepositoryTimeoutInSecond 600 -Suspend:$false -Kustomization $kustomizations + +Name ResourceGroupName +---- ----------------- +azpstestflux-k8s azpstest_gp + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfiguration +.Link +https://docs.microsoft.com/powershell/module/az.kubernetesconfiguration/new-azkubernetesconfigurationflux +#> +function New-AzKubernetesConfigurationFlux { +[Alias('New-AzK8sConfigurationFlux')] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfiguration])] +[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [System.String] + # The name of the kubernetes cluster. + ${ClusterName}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [System.String] + # The Kubernetes cluster resource name - i.e. + # managedClusters, connectedClusters, provisionedClusters. + ${ClusterType}, + + [Parameter(Mandatory)] + [Alias('FluxConfigurationName')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [System.String] + # Name of the Flux Configuration. + ${Name}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + ${SubscriptionId}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.Security.SecureString] + # Plaintext access key used to securely access the S3 bucket + ${BucketAccessKey}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Specify whether to use insecure communication when puling data from the S3 bucket. + ${BucketInsecure}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided configuration secrets. + ${BucketLocalAuthRef}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # The bucket name to sync from the url endpoint for the flux configuration. + ${BucketName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.Int64] + # The interval at which to re-reconcile the cluster git repository source with the remote. + ${BucketSyncIntervalInSecond}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.Int64] + # The maximum time to attempt to reconcile the cluster git repository source with the remote. + ${BucketTimeoutInSecond}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # The URL to sync for the flux configuration S3 bucket. + ${BucketUrl}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesConfigurationProtectedSettings]))] + [System.Collections.Hashtable] + # Key-value pairs of protected configuration settings for the configuration + ${ConfigurationProtectedSetting}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # Base64-encoded HTTPS certificate authority contents used to access git private git repositories over HTTPS + ${GitRepositoryHttpsCaCert}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # Plaintext HTTPS username used to access private git repositories over HTTPS + ${GitRepositoryHttpsUser}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided configuration secrets. + ${GitRepositoryLocalAuthRef}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # Base64-encoded known_hosts value containing public SSH keys required to access private git repositories over SSH + ${GitRepositorySshKnownHost}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.Int64] + # The interval at which to re-reconcile the cluster git repository source with the remote. + ${GitRepositorySyncIntervalInSecond}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.Int64] + # The maximum time to attempt to reconcile the cluster git repository source with the remote. + ${GitRepositoryTimeoutInSecond}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # The URL to sync for the flux configuration git repository. + ${GitRepositoryUrl}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesKustomizations]))] + [System.Collections.Hashtable] + # Array of kustomizations used to reconcile the artifact pulled by the source type on the cluster. + ${Kustomization}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # The namespace to which this configuration is installed to. + # Maximum of 253 lower case alphanumeric characters, hyphen and period only. + ${Namespace}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # The git repository branch name to checkout. + ${RepositoryRefBranch}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # The commit SHA to checkout. + # This value must be combined with the branch name to be valid. + # This takes precedence over semver. + ${RepositoryRefCommit}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # The semver range used to match against git repository tags. + # This takes precedence over tag. + ${RepositoryRefSemver}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # The git repository tag name to checkout. + # This takes precedence over branch. + ${RepositoryRefTag}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ScopeType])] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ScopeType] + # Scope at which the operator will be installed. + ${Scope}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType])] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType] + # Source Kind to pull the configuration data from. + ${SourceKind}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Whether this configuration should suspend its reconciliation of its kustomizations and sources. + ${Suspend}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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 + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + CreateExpanded = 'Az.KubernetesConfiguration.custom\New-AzKubernetesConfigurationFlux'; + } + if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/KubernetesConfiguration/exports/New-AzKubernetesExtension.ps1 b/src/KubernetesConfiguration/exports/New-AzKubernetesExtension.ps1 index 71eb954dc0dd..dfb13f547d85 100644 --- a/src/KubernetesConfiguration/exports/New-AzKubernetesExtension.ps1 +++ b/src/KubernetesConfiguration/exports/New-AzKubernetesExtension.ps1 @@ -20,20 +20,26 @@ Create a new Kubernetes Cluster Extension. .Description Create a new Kubernetes Cluster Extension. .Example -PS C:\> New-AzKubernetesExtension -ClusterName azps_test_cluster -ClusterType ConnectedClusters -Name azps_test_extension -ResourceGroupName azps_test_group -ExtensionType Microsoft.Arcdataservices +PS C:\> New-AzKubernetesExtension -ClusterName azpstest_cluster_arc -ClusterType ConnectedClusters -Name azpstest-extension -ResourceGroupName azpstest_gp -ExtensionType azuremonitor-containers -Name ExtensionType Version ProvisioningState AutoUpgradeMinorVersion ReleaseTrain ResourceGroupName ----- ------------- ------- ----------------- ----------------------- ------------ ----------------- -azps_test_extension microsoft.arcdataservices 1.0.16701001 Succeeded True Stable azps_test_group +Name ExtensionType Version ProvisioningState AutoUpgradeMinorVersion ReleaseTrain +---- ------------- ------- ----------------- ----------------------- ------------ +azpstest-extension azuremonitor-containers 2.9.2 Succeeded True Stable +.Example +PS C:\> New-AzKubernetesExtension -ClusterName azpstest_cluster_arc -ClusterType ConnectedClusters -Name flux -ResourceGroupName azpstest_gp -ExtensionType microsoft.flux -AutoUpgradeMinorVersion -ClusterReleaseNamespace flux-system -IdentityType 'SystemAssigned' + +Name ExtensionType Version ProvisioningState AutoUpgradeMinorVersion ReleaseTrain +---- ------------- ------- ----------------- ----------------------- ------------ +flux microsoft.flux 1.0.0 Succeeded True Stable .Outputs -Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtension +Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtension .Link https://docs.microsoft.com/powershell/module/az.kubernetesconfiguration/new-azkubernetesextension #> function New-AzKubernetesExtension { [Alias('New-AzK8sExtension')] -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtension])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtension])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -45,7 +51,8 @@ param( [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [System.String] - # The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or connectedClusters (for OnPrem K8S clusters). + # The Kubernetes cluster resource name - i.e. + # managedClusters, connectedClusters, provisionedClusters. ${ClusterType}, [Parameter(Mandatory)] @@ -66,9 +73,7 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] - # The Azure subscription ID. - # This is a GUID-formatted string (e.g. - # 00000000-0000-0000-0000-000000000000) + # The ID of the target subscription. ${SubscriptionId}, [Parameter(Mandatory)] @@ -79,9 +84,9 @@ param( ${ExtensionType}, [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ResourceIdentityType])] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.AksIdentityType])] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ResourceIdentityType] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.AksIdentityType] # The identity type. ${AkAssignedIdentityType}, @@ -100,14 +105,14 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesConfigurationProtectedSettings]))] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesConfigurationProtectedSettings]))] [System.Collections.Hashtable] # Configuration settings that are sensitive, as name-value pairs for configuring this extension. ${ConfigurationProtectedSetting}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesConfigurationSettings]))] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesConfigurationSettings]))] [System.Collections.Hashtable] # Configuration settings, as name-value pairs for configuring this extension. ${ConfigurationSetting}, @@ -136,8 +141,8 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] - # Version of the extension for this extension, if it is 'pinned' to a specific version. - # autoUpgradeMinorVersion must be 'false'. + # User-specified version of the extension for this extension to 'pin'. + # To use 'version', autoUpgradeMinorVersion must be 'false'. ${Version}, [Parameter()] @@ -207,6 +212,24 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + $mapping = @{ CreateExpanded = 'Az.KubernetesConfiguration.custom\New-AzKubernetesExtension'; } @@ -220,6 +243,7 @@ begin { $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } @@ -228,15 +252,32 @@ process { try { $steppablePipeline.Process($_) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} end { try { $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} +} } diff --git a/src/KubernetesConfiguration/exports/ProxyCmdletDefinitions.ps1 b/src/KubernetesConfiguration/exports/ProxyCmdletDefinitions.ps1 index 0722ce1c9e27..d3566615ff61 100644 --- a/src/KubernetesConfiguration/exports/ProxyCmdletDefinitions.ps1 +++ b/src/KubernetesConfiguration/exports/ProxyCmdletDefinitions.ps1 @@ -16,27 +16,20 @@ <# .Synopsis -Gets details of the Source Control Configuration. +Get Async Operation status .Description -Gets details of the Source Control Configuration. -.Example -PS C:\> Get-AzKubernetesConfiguration -ResourceGroupName azps_test_group -ClusterName azps_test_cluster -ClusterType ConnectedClusters - -Name Type ----- ---- -azpstestk8s01 Microsoft.KubernetesConfiguration/sourceControlConfigurations -azpstestk8s02 Microsoft.KubernetesConfiguration/sourceControlConfigurations +Get Async Operation status .Example -PS C:\> Get-AzKubernetesConfiguration -ResourceGroupName azps_test_group -ClusterName azps_test_cluster -ClusterType ConnectedClusters -Name azpstestk8s01 +PS C:\> Get-AzKubernetesConfigFluxOperationStatus -ClusterName azpstest_cluster_arc -ClusterType ConnectedClusters -FluxConfigurationName azpstestflux-k8s -ResourceGroupName azpstest_gp -OperationId e9871335-7ba8-4100-8cb4-73b3464eb863 -Name Type ----- ---- -azpstestk8s01 Microsoft.KubernetesConfiguration/sourceControlConfigurations +Name ResourceGroupName Status +---- ----------------- ------ +e9871335-7ba8-4100-8cb4-73b3464eb863 azpstest_gp Succeeded .Inputs Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfiguration +Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResult .Notes COMPLEX PARAMETER PROPERTIES @@ -44,60 +37,62 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ClusterName ]: The name of the kubernetes cluster. - [ClusterResourceName ]: The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or connectedClusters (for OnPrem K8S clusters). - [ClusterRp ]: The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or Microsoft.Kubernetes (for OnPrem K8S clusters). + [ClusterResourceName ]: The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. + [ClusterRp ]: The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. [ExtensionName ]: Name of the Extension. + [FluxConfigurationName ]: Name of the Flux Configuration. [Id ]: Resource identity path [OperationId ]: operation Id - [ResourceGroupName ]: The name of the resource group. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [SourceControlConfigurationName ]: Name of the Source Control Configuration. - [SubscriptionId ]: The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000) + [SubscriptionId ]: The ID of the target subscription. .Link -https://docs.microsoft.com/powershell/module/az.kubernetesconfiguration/get-azkubernetesconfiguration +https://docs.microsoft.com/powershell/module/az.kubernetesconfiguration/get-azkubernetesconfigfluxoperationstatus #> -function Get-AzKubernetesConfiguration { -[Alias('Get-AzK8sConfiguration')] -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfiguration])] -[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +function Get-AzKubernetesConfigFluxOperationStatus { +[Alias('Get-AzK8sConfigFluxOperationStatus')] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResult])] +[CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] param( - [Parameter(ParameterSetName='List', Mandatory)] [Parameter(ParameterSetName='Get', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [System.String] # The name of the kubernetes cluster. ${ClusterName}, - [Parameter(ParameterSetName='List', Mandatory)] [Parameter(ParameterSetName='Get', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [System.String] - # The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or connectedClusters (for OnPrem K8S clusters). + # The Kubernetes cluster resource name - i.e. + # managedClusters, connectedClusters, provisionedClusters. ${ClusterType}, - [Parameter(ParameterSetName='List', Mandatory)] + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [System.String] + # Name of the Flux Configuration. + ${FluxConfigurationName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [System.String] + # operation Id + ${OperationId}, + [Parameter(ParameterSetName='Get', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [System.String] # The name of the resource group. + # The name is case insensitive. ${ResourceGroupName}, - [Parameter(ParameterSetName='List')] [Parameter(ParameterSetName='Get')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String[]] - # The Azure subscription ID. - # This is a GUID-formatted string (e.g. - # 00000000-0000-0000-0000-000000000000) + # The ID of the target subscription. ${SubscriptionId}, - [Parameter(ParameterSetName='Get', Mandatory)] - [Alias('SourceControlConfigurationName')] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] - [System.String] - # Name of the Source Control Configuration. - ${Name}, - [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentity] @@ -160,12 +155,29 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + $mapping = @{ - List = 'Az.KubernetesConfiguration.custom\Get-AzKubernetesConfiguration'; - Get = 'Az.KubernetesConfiguration.custom\Get-AzKubernetesConfiguration'; - GetViaIdentity = 'Az.KubernetesConfiguration.custom\Get-AzKubernetesConfiguration'; + Get = 'Az.KubernetesConfiguration.custom\Get-AzKubernetesConfigFluxOperationStatus'; + GetViaIdentity = 'Az.KubernetesConfiguration.custom\Get-AzKubernetesConfigFluxOperationStatus'; } - if (('List', 'Get') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Get') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } $cmdInfo = Get-Command -Name $mapping[$parameterSet] @@ -175,6 +187,7 @@ begin { $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } @@ -183,41 +196,59 @@ process { try { $steppablePipeline.Process($_) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} end { try { $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} +} } <# .Synopsis -Gets Kubernetes Cluster Extension. +Gets details of the Source Control Configuration. .Description -Gets Kubernetes Cluster Extension. +Gets details of the Source Control Configuration. .Example -PS C:\> Get-AzKubernetesExtension -ClusterName azps_test_cluster -ClusterType ConnectedClusters -Name azps_test_extension -ResourceGroupName azps_test_group +PS C:\> Get-AzKubernetesConfiguration -ResourceGroupName azpstest_gp -ClusterName azpstest_cluster_arc -ClusterType ConnectedClusters -Name ExtensionType Version ProvisioningState AutoUpgradeMinorVersion ReleaseTrain ResourceGroupName ----- ------------- ------- ----------------- ----------------------- ------------ ----------------- -azps_test_extension microsoft.arcdataservices 1.0.16701001 Succeeded True Stable azps_test_group +Name RepositoryUrl ResourceGroupName +---- ------------- ----------------- +azpstestk8s http://github.com/xxxx azpstest_gp +azpstestk8s-operator http://github.com/xxxx azpstest_gp .Example -PS C:\> Get-AzKubernetesExtension -ClusterName azps_test_cluster -ClusterType ConnectedClusters -ResourceGroupName azps_test_group +PS C:\> Get-AzKubernetesConfiguration -ResourceGroupName azpstest_gp -ClusterName azpstest_cluster_arc -ClusterType ConnectedClusters -Name azpstestk8s -Name ExtensionType Version ProvisioningState AutoUpgradeMinorVersion ReleaseTrain ResourceGroupName ----- ------------- ------- ----------------- ----------------------- ------------ ----------------- -azps_test_extension microsoft.arcdataservices 1.0.16701001 Succeeded True Stable azps_test_group +Name RepositoryUrl ResourceGroupName +---- ------------- ----------------- +azpstestk8s http://github.com/xxxx azpstest_gp .Inputs Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtension +Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfiguration .Notes COMPLEX PARAMETER PROPERTIES @@ -225,20 +256,21 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ClusterName ]: The name of the kubernetes cluster. - [ClusterResourceName ]: The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or connectedClusters (for OnPrem K8S clusters). - [ClusterRp ]: The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or Microsoft.Kubernetes (for OnPrem K8S clusters). + [ClusterResourceName ]: The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. + [ClusterRp ]: The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. [ExtensionName ]: Name of the Extension. + [FluxConfigurationName ]: Name of the Flux Configuration. [Id ]: Resource identity path [OperationId ]: operation Id - [ResourceGroupName ]: The name of the resource group. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [SourceControlConfigurationName ]: Name of the Source Control Configuration. - [SubscriptionId ]: The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000) + [SubscriptionId ]: The ID of the target subscription. .Link -https://docs.microsoft.com/powershell/module/az.kubernetesconfiguration/get-azextension +https://docs.microsoft.com/powershell/module/az.kubernetesconfiguration/get-azkubernetesconfiguration #> -function Get-AzKubernetesExtension { -[Alias('Get-AzK8sExtension')] -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtension])] +function Get-AzKubernetesConfiguration { +[Alias('Get-AzK8sConfiguration')] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfiguration])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='List', Mandatory)] @@ -252,7 +284,8 @@ param( [Parameter(ParameterSetName='Get', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [System.String] - # The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or connectedClusters (for OnPrem K8S clusters). + # The Kubernetes cluster resource name - i.e. + # managedClusters, connectedClusters, provisionedClusters. ${ClusterType}, [Parameter(ParameterSetName='List', Mandatory)] @@ -268,16 +301,14 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String[]] - # The Azure subscription ID. - # This is a GUID-formatted string (e.g. - # 00000000-0000-0000-0000-000000000000) + # The ID of the target subscription. ${SubscriptionId}, [Parameter(ParameterSetName='Get', Mandatory)] - [Alias('ExtensionName')] + [Alias('SourceControlConfigurationName')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [System.String] - # Name of the Extension. + # Name of the Source Control Configuration. ${Name}, [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] @@ -342,10 +373,28 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + $mapping = @{ - List = 'Az.KubernetesConfiguration.custom\Get-AzKubernetesExtension'; - Get = 'Az.KubernetesConfiguration.custom\Get-AzKubernetesExtension'; - GetViaIdentity = 'Az.KubernetesConfiguration.custom\Get-AzKubernetesExtension'; + List = 'Az.KubernetesConfiguration.custom\Get-AzKubernetesConfiguration'; + Get = 'Az.KubernetesConfiguration.custom\Get-AzKubernetesConfiguration'; + GetViaIdentity = 'Az.KubernetesConfiguration.custom\Get-AzKubernetesConfiguration'; } if (('List', 'Get') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id @@ -357,6 +406,7 @@ begin { $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } @@ -365,140 +415,126 @@ process { try { $steppablePipeline.Process($_) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} end { try { $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} +} } <# .Synopsis -Create a new Kubernetes Source Control Configuration. +Gets details of the Flux Configuration. .Description -Create a new Kubernetes Source Control Configuration. +Gets details of the Flux Configuration. .Example -PS C:\> New-AzKubernetesConfiguration -ResourceGroupName azps_test_group -ClusterName azps_test_cluster -Name azpstestk8s01 -RepositoryUrl http://github.com/xxxx +PS C:\> Get-AzKubernetesConfigurationFlux -ClusterName azpstest_cluster_arc -ClusterType ConnectedClusters -ResourceGroupName azpstest_gp -Name Type ----- ---- -azpstestk8s01 Microsoft.KubernetesConfiguration/sourceControlConfigurations +Name ResourceGroupName +---- ----------------- +azpstestflux-k8s azpstest_gp .Example -PS C:\> New-AzKubernetesConfiguration -ResourceGroupName azps_test_group -ClusterName azps_test_cluster -Name azpstestk8s02 -RepositoryUrl http://github.com/xxxx -OperatorNamespace namespace-t01 +PS C:\> Get-AzKubernetesConfigurationFlux -ClusterName azpstest_cluster_arc -ClusterType ConnectedClusters -Name azpstestflux-k8s -ResourceGroupName azpstest_gp -Name Type ----- ---- -azpstestk8s02 Microsoft.KubernetesConfiguration/sourceControlConfigurations +Name ResourceGroupName +---- ----------------- +azpstestflux-k8s azpstest_gp +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfiguration +Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfiguration +.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. + [ClusterResourceName ]: The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. + [ClusterRp ]: The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. + [ExtensionName ]: Name of the Extension. + [FluxConfigurationName ]: Name of the Flux Configuration. + [Id ]: Resource identity path + [OperationId ]: operation Id + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SourceControlConfigurationName ]: Name of the Source Control Configuration. + [SubscriptionId ]: The ID of the target subscription. .Link -https://docs.microsoft.com/powershell/module/az.kubernetesconfiguration/new-azkubernetesconfiguration +https://docs.microsoft.com/powershell/module/az.kubernetesconfiguration/get-azkubernetesconfigurationflux #> -function New-AzKubernetesConfiguration { -[Alias('New-AzK8sConfiguration')] -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfiguration])] -[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +function Get-AzKubernetesConfigurationFlux { +[Alias('Get-AzK8sConfigurationFlux')] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfiguration])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( - [Parameter(Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Parameter(ParameterSetName='Get', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [System.String] # The name of the kubernetes cluster. ${ClusterName}, - [Parameter(Mandatory)] - [Alias('SourceControlConfigurationName')] + [Parameter(ParameterSetName='List', Mandatory)] + [Parameter(ParameterSetName='Get', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [System.String] - # Name of the Source Control Configuration. - ${Name}, + # The Kubernetes cluster resource name - i.e. + # managedClusters, connectedClusters, provisionedClusters. + ${ClusterType}, - [Parameter(Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Parameter(ParameterSetName='Get', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [System.String] # The name of the resource group. + # The name is case insensitive. ${ResourceGroupName}, - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] - [System.String] - # The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or connectedClusters (for OnPrem K8S clusters). - ${ClusterType}, - - [Parameter()] + [Parameter(ParameterSetName='List')] + [Parameter(ParameterSetName='Get')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] - [System.String] - # The Azure subscription ID. + [System.String[]] + # The ID of the target subscription. ${SubscriptionId}, - [Parameter(Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] - [System.String] - # Url of the SourceControl Repository. - ${RepositoryUrl}, - - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] - [System.Management.Automation.SwitchParameter] - # Option to enable Helm Operator for this git configuration. - ${EnableHelmOperator}, - - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] - [System.String] - # Values override for the operator Helm chart. - ${HelmOperatorChartValue}, - - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] - [System.String] - # Version of the operator Helm chart. - ${HelmOperatorChartVersion}, - - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] - [System.String] - # Instance name of the operator - identifying the specific configuration. - ${OperatorInstanceName}, - - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] - [System.String] - # The namespace to which this operator is installed to. - # Maximum of 253 lower case alphanumeric characters, hyphen and period only. - ${OperatorNamespace}, - - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] - [System.String] - # Any Parameters for the Operator instance in string format. - ${OperatorParameter}, - - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] - [System.Management.Automation.SwitchParameter] - # If passed set the scope of the Configuration to Cluster (default is nameSpace). - ${ClusterScoped}, - - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [Parameter(ParameterSetName='Get', Mandatory)] + [Alias('FluxConfigurationName')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [System.String] - # If passed set the scope of the Configuration to Cluster (default is nameSpace). - ${SshKnownHost}, + # Name of the Flux Configuration. + ${Name}, - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IConfigurationProtectedSettings]))] - [System.Collections.Hashtable] - # Name-value pairs of protected configuration settings for the configuration - ${ConfigurationProtectedSetting}, + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] @@ -555,10 +591,30 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + $mapping = @{ - CreateExpanded = 'Az.KubernetesConfiguration.custom\New-AzKubernetesConfiguration'; + List = 'Az.KubernetesConfiguration.custom\Get-AzKubernetesConfigurationFlux'; + Get = 'Az.KubernetesConfiguration.custom\Get-AzKubernetesConfigurationFlux'; + GetViaIdentity = 'Az.KubernetesConfiguration.custom\Get-AzKubernetesConfigurationFlux'; } - if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('List', 'Get') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } $cmdInfo = Get-Command -Name $mapping[$parameterSet] @@ -568,6 +624,7 @@ begin { $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } @@ -576,144 +633,1445 @@ process { try { $steppablePipeline.Process($_) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} end { try { $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} +} } <# .Synopsis -Create a new Kubernetes Cluster Extension. +Gets Kubernetes Cluster Extension. .Description -Create a new Kubernetes Cluster Extension. +Gets Kubernetes Cluster Extension. +.Example +PS C:\> Get-AzKubernetesExtension -ClusterName azpstest_cluster_arc -ClusterType ConnectedClusters -Name azpstest-extension -ResourceGroupName azpstest_gp + +Name ExtensionType Version ProvisioningState AutoUpgradeMinorVersion ReleaseTrain +---- ------------- ------- ----------------- ----------------------- ------------ +azpstest-extension azuremonitor-containers 2.9.2 Succeeded True Stable .Example -PS C:\> New-AzKubernetesExtension -ClusterName azps_test_cluster -ClusterType ConnectedClusters -Name azps_test_extension -ResourceGroupName azps_test_group -ExtensionType Microsoft.Arcdataservices +PS C:\> Get-AzKubernetesExtension -ClusterName azpstest_cluster_arc -ClusterType ConnectedClusters -ResourceGroupName azpstest_gp -Name ExtensionType Version ProvisioningState AutoUpgradeMinorVersion ReleaseTrain ResourceGroupName ----- ------------- ------- ----------------- ----------------------- ------------ ----------------- -azps_test_extension microsoft.arcdataservices 1.0.16701001 Succeeded True Stable azps_test_group +Name ExtensionType Version ProvisioningState AutoUpgradeMinorVersion ReleaseTrain +---- ------------- ------- ----------------- ----------------------- ------------ +azpstest-extension azuremonitor-containers 2.9.2 Succeeded True Stable +flux microsoft.flux 1.0.0 Succeeded True Stable +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtension +Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtension +.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. + [ClusterResourceName ]: The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. + [ClusterRp ]: The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. + [ExtensionName ]: Name of the Extension. + [FluxConfigurationName ]: Name of the Flux Configuration. + [Id ]: Resource identity path + [OperationId ]: operation Id + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SourceControlConfigurationName ]: Name of the Source Control Configuration. + [SubscriptionId ]: The ID of the target subscription. .Link -https://docs.microsoft.com/powershell/module/az.kubernetesconfiguration/new-azextension +https://docs.microsoft.com/powershell/module/az.kubernetesconfiguration/get-azkubernetesextension #> -function New-AzKubernetesExtension { -[Alias('New-AzK8sExtension')] -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtension])] -[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +function Get-AzKubernetesExtension { +[Alias('Get-AzK8sExtension')] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtension])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( - [Parameter(Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Parameter(ParameterSetName='Get', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [System.String] # The name of the kubernetes cluster. ${ClusterName}, - [Parameter(Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Parameter(ParameterSetName='Get', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [System.String] - # The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or connectedClusters (for OnPrem K8S clusters). + # The Kubernetes cluster resource name - i.e. + # managedClusters, connectedClusters, provisionedClusters. ${ClusterType}, - [Parameter(Mandatory)] - [Alias('ExtensionName')] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] - [System.String] - # Name of the Extension. - ${Name}, - - [Parameter(Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Parameter(ParameterSetName='Get', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, - [Parameter()] + [Parameter(ParameterSetName='List')] + [Parameter(ParameterSetName='Get')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] - [System.String] - # The Azure subscription ID. - # This is a GUID-formatted string (e.g. - # 00000000-0000-0000-0000-000000000000) + [System.String[]] + # The ID of the target subscription. ${SubscriptionId}, - [Parameter(Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [Parameter(ParameterSetName='Get', Mandatory)] + [Alias('ExtensionName')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [System.String] - # Type of the Extension, of which this resource is an instance of. - # It must be one of the Extension Types registered with Microsoft.KubernetesConfiguration by the Extension publisher. - ${ExtensionType}, + # Name of the Extension. + ${Name}, - [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ResourceIdentityType])] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ResourceIdentityType] - # The identity type. - ${AkAssignedIdentityType}, + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] [System.Management.Automation.SwitchParameter] - # Flag to note if this extension participates in auto upgrade of minor version, or not. - ${AutoUpgradeMinorVersion}, + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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 + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + List = 'Az.KubernetesConfiguration.custom\Get-AzKubernetesExtension'; + Get = 'Az.KubernetesConfiguration.custom\Get-AzKubernetesExtension'; + GetViaIdentity = 'Az.KubernetesConfiguration.custom\Get-AzKubernetesExtension'; + } + if (('List', 'Get') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Create a new Kubernetes Source Control Configuration. +.Description +Create a new Kubernetes Source Control Configuration. +.Example +PS C:\> New-AzConnectedKubernetes -ClusterName azpstest_cluster_arc -ResourceGroupName azpstest_gp -Location eastus +PS C:\> New-AzKubernetesConfiguration -ResourceGroupName azpstest_gp -ClusterName azpstest_cluster_arc -Name azpstestk8s -RepositoryUrl http://github.com/xxxx -ClusterType ConnectedClusters + +Name RepositoryUrl ResourceGroupName +---- ------------- ----------------- +azpstestk8s http://github.com/xxxx azpstest_gp +.Example +PS C:\> New-AzConnectedKubernetes -ClusterName azpstest_cluster_arc -ResourceGroupName azpstest_gp -Location eastus +PS C:\> New-AzKubernetesConfiguration -ResourceGroupName azpstest_gp -ClusterName azpstest_cluster_arc -Name azpstestk8s-operator -RepositoryUrl http://github.com/xxxx -OperatorNamespace namespace-t01 -ClusterType ConnectedClusters + +Name RepositoryUrl ResourceGroupName +---- ------------- ----------------- +azpstestk8s-operator http://github.com/xxxx azpstest_gp + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfiguration +.Link +https://docs.microsoft.com/powershell/module/az.kubernetesconfiguration/new-azkubernetesconfiguration +#> +function New-AzKubernetesConfiguration { +[Alias('New-AzK8sConfiguration')] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfiguration])] +[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [System.String] + # The name of the kubernetes cluster. + ${ClusterName}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [System.String] + # The Kubernetes cluster resource name - i.e. + # managedClusters, connectedClusters, provisionedClusters. + ${ClusterType}, + + [Parameter(Mandatory)] + [Alias('SourceControlConfigurationName')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [System.String] + # Name of the Source Control Configuration. + ${Name}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] - # Namespace where the extension Release must be placed, for a Cluster scoped extension. - # If this namespace does not exist, it will be created - ${ClusterReleaseNamespace}, + # The ID of the target subscription. + ${SubscriptionId}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesConfigurationProtectedSettings]))] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IConfigurationProtectedSettings]))] [System.Collections.Hashtable] - # Configuration settings that are sensitive, as name-value pairs for configuring this extension. + # Name-value pairs of protected configuration settings for the configuration ${ConfigurationProtectedSetting}, - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesConfigurationSettings]))] - [System.Collections.Hashtable] - # Configuration settings, as name-value pairs for configuring this extension. - ${ConfigurationSetting}, + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Option to enable Helm Operator for this git configuration. + ${EnableHelmOperator}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # Values override for the operator Helm chart. + ${HelmOperatorChartValue}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # Version of the operator Helm chart. + ${HelmOperatorChartVersion}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # Instance name of the operator - identifying the specific configuration. + ${OperatorInstanceName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # The namespace to which this operator is installed to. + # Maximum of 253 lower case alphanumeric characters, hyphen and period only. + ${OperatorNamespace}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # Any Parameters for the Operator instance in string format. + ${OperatorParam}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.Management.Automation.SwitchParameter] + # If passed set the scope of the Configuration to Cluster (default is nameSpace). + ${ClusterScoped}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # Url of the SourceControl Repository. + ${RepositoryUrl}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # Base64-encoded known_hosts contents containing public SSH keys required to access private Git instances + ${SshKnownHost}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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 + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + CreateExpanded = 'Az.KubernetesConfiguration.custom\New-AzKubernetesConfiguration'; + } + if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Create a new Kubernetes Flux Configuration. +.Description +Create a new Kubernetes Flux Configuration. +.Example +PS C:\> $kustomizations = @{ + infra=@{ + Name = "infra" + Path = "./infrastructure" + Prune = "true" + }; + apps=@{ + Name = "apps" + Path = "./apps/staging" + Prune = "true" + DependsOn = @("infra") + } +} +PS C:\> New-AzKubernetesConfigurationFlux -ClusterName azpstest_cluster_arc -ClusterType ConnectedClusters -Name azpstestflux-k8s -ResourceGroupName azpstest_gp -Namespace namespace-t01 -Scope 'cluster' -GitRepositoryUrl https://github.com/Azure/gitops-flux2-kustomize-helm-mt -RepositoryRefBranch main -SourceKind 'GitRepository' -GitRepositorySyncIntervalInSecond 600 -GitRepositoryTimeoutInSecond 600 -Suspend:$false -Kustomization $kustomizations + +Name ResourceGroupName +---- ----------------- +azpstestflux-k8s azpstest_gp + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfiguration +.Link +https://docs.microsoft.com/powershell/module/az.kubernetesconfiguration/new-azkubernetesconfigurationflux +#> +function New-AzKubernetesConfigurationFlux { +[Alias('New-AzK8sConfigurationFlux')] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfiguration])] +[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [System.String] + # The name of the kubernetes cluster. + ${ClusterName}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [System.String] + # The Kubernetes cluster resource name - i.e. + # managedClusters, connectedClusters, provisionedClusters. + ${ClusterType}, + + [Parameter(Mandatory)] + [Alias('FluxConfigurationName')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [System.String] + # Name of the Flux Configuration. + ${Name}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + ${SubscriptionId}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.Security.SecureString] + # Plaintext access key used to securely access the S3 bucket + ${BucketAccessKey}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Specify whether to use insecure communication when puling data from the S3 bucket. + ${BucketInsecure}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided configuration secrets. + ${BucketLocalAuthRef}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # The bucket name to sync from the url endpoint for the flux configuration. + ${BucketName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.Int64] + # The interval at which to re-reconcile the cluster git repository source with the remote. + ${BucketSyncIntervalInSecond}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.Int64] + # The maximum time to attempt to reconcile the cluster git repository source with the remote. + ${BucketTimeoutInSecond}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # The URL to sync for the flux configuration S3 bucket. + ${BucketUrl}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesConfigurationProtectedSettings]))] + [System.Collections.Hashtable] + # Key-value pairs of protected configuration settings for the configuration + ${ConfigurationProtectedSetting}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # Base64-encoded HTTPS certificate authority contents used to access git private git repositories over HTTPS + ${GitRepositoryHttpsCaCert}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # Plaintext HTTPS username used to access private git repositories over HTTPS + ${GitRepositoryHttpsUser}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided configuration secrets. + ${GitRepositoryLocalAuthRef}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # Base64-encoded known_hosts value containing public SSH keys required to access private git repositories over SSH + ${GitRepositorySshKnownHost}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.Int64] + # The interval at which to re-reconcile the cluster git repository source with the remote. + ${GitRepositorySyncIntervalInSecond}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.Int64] + # The maximum time to attempt to reconcile the cluster git repository source with the remote. + ${GitRepositoryTimeoutInSecond}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # The URL to sync for the flux configuration git repository. + ${GitRepositoryUrl}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesKustomizations]))] + [System.Collections.Hashtable] + # Array of kustomizations used to reconcile the artifact pulled by the source type on the cluster. + ${Kustomization}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # The namespace to which this configuration is installed to. + # Maximum of 253 lower case alphanumeric characters, hyphen and period only. + ${Namespace}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # The git repository branch name to checkout. + ${RepositoryRefBranch}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # The commit SHA to checkout. + # This value must be combined with the branch name to be valid. + # This takes precedence over semver. + ${RepositoryRefCommit}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # The semver range used to match against git repository tags. + # This takes precedence over tag. + ${RepositoryRefSemver}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # The git repository tag name to checkout. + # This takes precedence over branch. + ${RepositoryRefTag}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ScopeType])] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ScopeType] + # Scope at which the operator will be installed. + ${Scope}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType])] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType] + # Source Kind to pull the configuration data from. + ${SourceKind}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Whether this configuration should suspend its reconciliation of its kustomizations and sources. + ${Suspend}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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 + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + CreateExpanded = 'Az.KubernetesConfiguration.custom\New-AzKubernetesConfigurationFlux'; + } + if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Create a new Kubernetes Cluster Extension. +.Description +Create a new Kubernetes Cluster Extension. +.Example +PS C:\> New-AzKubernetesExtension -ClusterName azpstest_cluster_arc -ClusterType ConnectedClusters -Name azpstest-extension -ResourceGroupName azpstest_gp -ExtensionType azuremonitor-containers + +Name ExtensionType Version ProvisioningState AutoUpgradeMinorVersion ReleaseTrain +---- ------------- ------- ----------------- ----------------------- ------------ +azpstest-extension azuremonitor-containers 2.9.2 Succeeded True Stable +.Example +PS C:\> New-AzKubernetesExtension -ClusterName azpstest_cluster_arc -ClusterType ConnectedClusters -Name flux -ResourceGroupName azpstest_gp -ExtensionType microsoft.flux -AutoUpgradeMinorVersion -ClusterReleaseNamespace flux-system -IdentityType 'SystemAssigned' + +Name ExtensionType Version ProvisioningState AutoUpgradeMinorVersion ReleaseTrain +---- ------------- ------- ----------------- ----------------------- ------------ +flux microsoft.flux 1.0.0 Succeeded True Stable + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtension +.Link +https://docs.microsoft.com/powershell/module/az.kubernetesconfiguration/new-azkubernetesextension +#> +function New-AzKubernetesExtension { +[Alias('New-AzK8sExtension')] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtension])] +[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [System.String] + # The name of the kubernetes cluster. + ${ClusterName}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [System.String] + # The Kubernetes cluster resource name - i.e. + # managedClusters, connectedClusters, provisionedClusters. + ${ClusterType}, + + [Parameter(Mandatory)] + [Alias('ExtensionName')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [System.String] + # Name of the Extension. + ${Name}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + ${SubscriptionId}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # Type of the Extension, of which this resource is an instance of. + # It must be one of the Extension Types registered with Microsoft.KubernetesConfiguration by the Extension publisher. + ${ExtensionType}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.AksIdentityType])] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.AksIdentityType] + # The identity type. + ${AkAssignedIdentityType}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Flag to note if this extension participates in auto upgrade of minor version, or not. + ${AutoUpgradeMinorVersion}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # Namespace where the extension Release must be placed, for a Cluster scoped extension. + # If this namespace does not exist, it will be created + ${ClusterReleaseNamespace}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesConfigurationProtectedSettings]))] + [System.Collections.Hashtable] + # Configuration settings that are sensitive, as name-value pairs for configuring this extension. + ${ConfigurationProtectedSetting}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesConfigurationSettings]))] + [System.Collections.Hashtable] + # Configuration settings, as name-value pairs for configuring this extension. + ${ConfigurationSetting}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ResourceIdentityType])] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ResourceIdentityType] + # The identity type. + ${IdentityType}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # Namespace where the extension will be created for an Namespace scoped extension. + # If this namespace does not exist, it will be created + ${NamespaceTargetNamespace}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # ReleaseTrain this extension participates in for auto-upgrade (e.g. + # Stable, Preview, etc.) - only if autoUpgradeMinorVersion is 'true'. + ${ReleaseTrain}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # User-specified version of the extension for this extension to 'pin'. + # To use 'version', autoUpgradeMinorVersion must be 'false'. + ${Version}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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 + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + CreateExpanded = 'Az.KubernetesConfiguration.custom\New-AzKubernetesExtension'; + } + if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +This will delete the YAML file used to set up the Source control configuration, thus stopping future sync from the source repo. +.Description +This will delete the YAML file used to set up the Source control configuration, thus stopping future sync from the source repo. +.Example +PS C:\> Remove-AzKubernetesConfiguration -ResourceGroupName azpstest_gp -ClusterName azpstest_cluster_arc -Name azpstestk8s -ClusterType ConnectedClusters + +.Example +PS C:\> $kubConf = Get-AzKubernetesConfiguration -ClusterName azpstest_cluster_arc -ClusterType ConnectedClusters -ResourceGroupName azpstest_gp -Name azpstestk8s-operator +Remove-AzKubernetesConfiguration -InputObject $kubConf + + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentity +.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. + [ClusterResourceName ]: The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. + [ClusterRp ]: The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. + [ExtensionName ]: Name of the Extension. + [FluxConfigurationName ]: Name of the Flux Configuration. + [Id ]: Resource identity path + [OperationId ]: operation Id + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SourceControlConfigurationName ]: Name of the Source Control Configuration. + [SubscriptionId ]: The ID of the target subscription. +.Link +https://docs.microsoft.com/powershell/module/az.kubernetesconfiguration/remove-azkubernetesconfiguration +#> +function Remove-AzKubernetesConfiguration { +[Alias('Remove-AzK8sConfiguration')] +[OutputType([System.Boolean])] +[CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Delete', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [System.String] + # The name of the kubernetes cluster. + ${ClusterName}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [System.String] + # The Kubernetes cluster resource name - i.e. + # managedClusters, connectedClusters, provisionedClusters. + ${ClusterType}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [Alias('SourceControlConfigurationName')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [System.String] + # Name of the Source Control Configuration. + ${Name}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Delete')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentity] + # 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.KubernetesConfiguration.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Returns true when the command succeeds + ${PassThru}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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 + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Delete = 'Az.KubernetesConfiguration.custom\Remove-AzKubernetesConfiguration'; + DeleteViaIdentity = 'Az.KubernetesConfiguration.custom\Remove-AzKubernetesConfiguration'; + } + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +This will delete the YAML file used to set up the Flux Configuration, thus stopping future sync from the source repo. +.Description +This will delete the YAML file used to set up the Flux Configuration, thus stopping future sync from the source repo. +.Example +PS C:\> Remove-AzKubernetesConfigurationFlux -ClusterName azpstest_cluster_arc -ClusterType ConnectedClusters -Name azpstestflux-k8s -ResourceGroupName azpstest_gp + +.Example +PS C:\> Get-AzKubernetesConfigurationFlux -ClusterName azpstest_cluster_arc -ClusterType ConnectedClusters -Name azpstestflux-k8s -ResourceGroupName azpstest_gp | Remove-AzKubernetesConfigurationFlux + + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentity +.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. + [ClusterResourceName ]: The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. + [ClusterRp ]: The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. + [ExtensionName ]: Name of the Extension. + [FluxConfigurationName ]: Name of the Flux Configuration. + [Id ]: Resource identity path + [OperationId ]: operation Id + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SourceControlConfigurationName ]: Name of the Source Control Configuration. + [SubscriptionId ]: The ID of the target subscription. +.Link +https://docs.microsoft.com/powershell/module/az.kubernetesconfiguration/remove-azkubernetesconfigurationflux +#> +function Remove-AzKubernetesConfigurationFlux { +[Alias('Remove-AzK8sConfigurationFlux')] +[OutputType([System.Boolean])] +[CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Delete', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [System.String] + # The name of the kubernetes cluster. + ${ClusterName}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [System.String] + # The Kubernetes cluster resource name - i.e. + # managedClusters, connectedClusters, provisionedClusters. + ${ClusterType}, - [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ResourceIdentityType])] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ResourceIdentityType] - # The identity type. - ${IdentityType}, + [Parameter(ParameterSetName='Delete', Mandatory)] + [Alias('FluxConfigurationName')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [System.String] + # Name of the Flux Configuration. + ${Name}, - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [Parameter(ParameterSetName='Delete', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [System.String] - # Namespace where the extension will be created for an Namespace scoped extension. - # If this namespace does not exist, it will be created - ${NamespaceTargetNamespace}, + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [Parameter(ParameterSetName='Delete')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] - # ReleaseTrain this extension participates in for auto-upgrade (e.g. - # Stable, Preview, etc.) - only if autoUpgradeMinorVersion is 'true'. - ${ReleaseTrain}, + # The ID of the target subscription. + ${SubscriptionId}, + + [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] - [System.String] - # Version of the extension for this extension, if it is 'pinned' to a specific version. - # autoUpgradeMinorVersion must be 'false'. - ${Version}, + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Query')] + [System.Management.Automation.SwitchParameter] + # Delete the extension resource in Azure - not the normal asynchronous delete. + ${ForceDelete}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] @@ -755,6 +2113,12 @@ param( # Run the command asynchronously ${NoWait}, + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Returns true when the command succeeds + ${PassThru}, + [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] [System.Uri] @@ -782,10 +2146,29 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + $mapping = @{ - CreateExpanded = 'Az.KubernetesConfiguration.custom\New-AzKubernetesExtension'; + Delete = 'Az.KubernetesConfiguration.custom\Remove-AzKubernetesConfigurationFlux'; + DeleteViaIdentity = 'Az.KubernetesConfiguration.custom\Remove-AzKubernetesConfigurationFlux'; } - if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } $cmdInfo = Get-Command -Name $mapping[$parameterSet] @@ -795,6 +2178,7 @@ begin { $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } @@ -803,30 +2187,45 @@ process { try { $steppablePipeline.Process($_) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} end { try { $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} +} } <# .Synopsis -This will delete the YAML file used to set up the Source control configuration, thus stopping future sync from the source repo. +Delete a Kubernetes Cluster Extension. +This will cause the Agent to Uninstall the extension from the cluster. .Description -This will delete the YAML file used to set up the Source control configuration, thus stopping future sync from the source repo. -.Example -PS C:\> Remove-AzKubernetesConfiguration -ResourceGroupName azps_test_group -ClusterName azps_test_cluster -Name azpstestk8s01 -ClusterType ConnectedClusters - +Delete a Kubernetes Cluster Extension. +This will cause the Agent to Uninstall the extension from the cluster. .Example -PS C:\> $kubConf = Get-AzKubernetesConfiguration -ClusterName azps_test_cluster -ClusterType ConnectedClusters -ResourceGroupName azps_test_group -Name azpstestk8s02 -PS C:\> Remove-AzKubernetesConfiguration -InputObject $kubConf +PS C:\> Remove-AzKubernetesExtension -ClusterName azpstest_cluster_arc -ClusterType ConnectedClusters -Name azpstest-extension -ResourceGroupName azpstest_gp .Inputs @@ -840,19 +2239,20 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ClusterName ]: The name of the kubernetes cluster. - [ClusterResourceName ]: The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or connectedClusters (for OnPrem K8S clusters). - [ClusterRp ]: The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or Microsoft.Kubernetes (for OnPrem K8S clusters). + [ClusterResourceName ]: The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. + [ClusterRp ]: The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. [ExtensionName ]: Name of the Extension. + [FluxConfigurationName ]: Name of the Flux Configuration. [Id ]: Resource identity path [OperationId ]: operation Id - [ResourceGroupName ]: The name of the resource group. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [SourceControlConfigurationName ]: Name of the Source Control Configuration. - [SubscriptionId ]: The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000) + [SubscriptionId ]: The ID of the target subscription. .Link -https://docs.microsoft.com/powershell/module/az.kubernetesconfiguration/remove-azkubernetesconfiguration +https://docs.microsoft.com/powershell/module/az.kubernetesconfiguration/remove-azkubernetesextension #> -function Remove-AzKubernetesConfiguration { -[Alias('Remove-AzK8sConfiguration')] +function Remove-AzKubernetesExtension { +[Alias('Remove-AzK8sExtension')] [OutputType([System.Boolean])] [CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( @@ -865,27 +2265,29 @@ param( [Parameter(ParameterSetName='Delete', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [System.String] - # The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or connectedClusters (for OnPrem K8S clusters). + # The Kubernetes cluster resource name - i.e. + # managedClusters, connectedClusters, provisionedClusters. ${ClusterType}, [Parameter(ParameterSetName='Delete', Mandatory)] - [Alias('SourceControlConfigurationName')] + [Alias('ExtensionName')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [System.String] - # Name of the Source Control Configuration. + # Name of the Extension. ${Name}, [Parameter(ParameterSetName='Delete', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [System.String] # The name of the resource group. + # The name is case insensitive. ${ResourceGroupName}, [Parameter(ParameterSetName='Delete')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] - # The Azure subscription ID. + # The ID of the target subscription. ${SubscriptionId}, [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] @@ -895,6 +2297,12 @@ param( # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Query')] + [System.Management.Automation.SwitchParameter] + # Delete the extension resource in Azure - not the normal asynchronous delete. + ${ForceDelete}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -968,9 +2376,27 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + $mapping = @{ - Delete = 'Az.KubernetesConfiguration.custom\Remove-AzKubernetesConfiguration'; - DeleteViaIdentity = 'Az.KubernetesConfiguration.custom\Remove-AzKubernetesConfiguration'; + Delete = 'Az.KubernetesConfiguration.custom\Remove-AzKubernetesExtension'; + DeleteViaIdentity = 'Az.KubernetesConfiguration.custom\Remove-AzKubernetesExtension'; } if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id @@ -982,6 +2408,7 @@ begin { $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } @@ -990,29 +2417,53 @@ process { try { $steppablePipeline.Process($_) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} end { try { $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} +} } <# .Synopsis -Delete a Kubernetes Cluster Extension. -This will cause the Agent to Uninstall the extension from the cluster. +Update an existing Kubernetes Flux Configuration. .Description -Delete a Kubernetes Cluster Extension. -This will cause the Agent to Uninstall the extension from the cluster. +Update an existing Kubernetes Flux Configuration. +.Example +PS C:\> Update-AzKubernetesConfigurationFlux -ClusterName azpstest_cluster_arc -ClusterType ConnectedClusters -Name azpstestflux-k8s -ResourceGroupName azpstest_gp -GitRepositoryUrl https://github.com/fluxcd/flux2-kustomize-helm-example -RepositoryRefBranch main -SourceKind 'GitRepository' -GitRepositorySyncIntervalInSecond 600 -GitRepositoryTimeoutInSecond 600 -Suspend:$false + +Name ResourceGroupName +---- ----------------- +azpstestflux-k8s azpstest_gp .Example -PS C:\> Remove-AzKubernetesExtension -ClusterName azps_test_cluster -ClusterType ConnectedClusters -Name azps_test_extension -ResourceGroupName azps_test_group +PS C:\> Get-AzKubernetesConfigurationFlux -ClusterName azpstest_cluster_arc -ClusterType ConnectedClusters -Name azpstestflux-k8s -ResourceGroupName azpstest_gp | Update-AzKubernetesConfigurationFlux -GitRepositoryUrl https://github.com/fluxcd/flux2-kustomize-helm-example -RepositoryRefBranch main -SourceKind 'GitRepository' -GitRepositorySyncIntervalInSecond 600 -GitRepositoryTimeoutInSecond 600 -Suspend:$false +Name ResourceGroupName +---- ----------------- +azpstestflux-k8s azpstest_gp .Inputs Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentity @@ -1025,58 +2476,58 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ClusterName ]: The name of the kubernetes cluster. - [ClusterResourceName ]: The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or connectedClusters (for OnPrem K8S clusters). - [ClusterRp ]: The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or Microsoft.Kubernetes (for OnPrem K8S clusters). + [ClusterResourceName ]: The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. + [ClusterRp ]: The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. [ExtensionName ]: Name of the Extension. + [FluxConfigurationName ]: Name of the Flux Configuration. [Id ]: Resource identity path [OperationId ]: operation Id - [ResourceGroupName ]: The name of the resource group. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [SourceControlConfigurationName ]: Name of the Source Control Configuration. - [SubscriptionId ]: The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000) + [SubscriptionId ]: The ID of the target subscription. .Link -https://docs.microsoft.com/powershell/module/az.kubernetesconfiguration/remove-azextension +https://docs.microsoft.com/powershell/module/az.kubernetesconfiguration/update-azkubernetesconfigurationflux #> -function Remove-AzKubernetesExtension { -[Alias('Remove-AzK8sExtension')] +function Update-AzKubernetesConfigurationFlux { +[Alias('Update-AzK8sConfigurationFlux')] [OutputType([System.Boolean])] -[CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( - [Parameter(ParameterSetName='Delete', Mandatory)] + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [System.String] # The name of the kubernetes cluster. ${ClusterName}, - [Parameter(ParameterSetName='Delete', Mandatory)] + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [System.String] - # The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or connectedClusters (for OnPrem K8S clusters). + # The Kubernetes cluster resource name - i.e. + # managedClusters, connectedClusters, provisionedClusters. ${ClusterType}, - [Parameter(ParameterSetName='Delete', Mandatory)] - [Alias('ExtensionName')] + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Alias('FluxConfigurationName')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [System.String] - # Name of the Extension. + # Name of the Flux Configuration. ${Name}, - [Parameter(ParameterSetName='Delete', Mandatory)] + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, - [Parameter(ParameterSetName='Delete')] + [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] - # The Azure subscription ID. - # This is a GUID-formatted string (e.g. - # 00000000-0000-0000-0000-000000000000) + # The ID of the target subscription. ${SubscriptionId}, - [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentity] # Identity Parameter @@ -1084,10 +2535,143 @@ param( ${InputObject}, [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Query')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.Security.SecureString] + # Plaintext access key used to securely access the S3 bucket + ${BucketAccessKey}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.Management.Automation.SwitchParameter] - # Delete the extension resource in Azure - not the normal asynchronous delete. - ${ForceDelete}, + # Specify whether to use insecure communication when puling data from the S3 bucket. + ${BucketInsecure}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided configuration secrets. + ${BucketLocalAuthRef}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # The bucket name to sync from the url endpoint for the flux configuration. + ${BucketName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.Int64] + # The interval at which to re-reconcile the cluster git repository source with the remote. + ${BucketSyncIntervalInSecond}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.Int64] + # The maximum time to attempt to reconcile the cluster git repository source with the remote. + ${BucketTimeoutInSecond}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # The URL to sync for the flux configuration S3 bucket. + ${BucketUrl}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesConfigurationProtectedSettings]))] + [System.Collections.Hashtable] + # Key-value pairs of protected configuration settings for the configuration + ${ConfigurationProtectedSetting}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # Base64-encoded HTTPS certificate authority contents used to access git private git repositories over HTTPS + ${GitRepositoryHttpsCaCert}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # Plaintext HTTPS username used to access private git repositories over HTTPS + ${GitRepositoryHttpsUser}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided configuration secrets. + ${GitRepositoryLocalAuthRef}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # Base64-encoded known_hosts value containing public SSH keys required to access private git repositories over SSH + ${GitRepositorySshKnownHost}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.Int64] + # The interval at which to re-reconcile the cluster git repository source with the remote. + ${GitRepositorySyncIntervalInSecond}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.Int64] + # The maximum time to attempt to reconcile the cluster git repository source with the remote. + ${GitRepositoryTimeoutInSecond}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # The URL to sync for the flux configuration git repository. + ${GitRepositoryUrl}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesKustomizations]))] + [System.Collections.Hashtable] + # Array of kustomizations used to reconcile the artifact pulled by the source type on the cluster. + ${Kustomization}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # The git repository branch name to checkout. + ${RepositoryRefBranch}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # The commit SHA to checkout. + # This value must be combined with the branch name to be valid. + # This takes precedence over semver. + ${RepositoryRefCommit}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # The semver range used to match against git repository tags. + # This takes precedence over tag. + ${RepositoryRefSemver}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # The git repository tag name to checkout. + # This takes precedence over branch. + ${RepositoryRefTag}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType])] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType] + # Source Kind to pull the configuration data from. + ${SourceKind}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Whether this configuration should suspend its reconciliation of its kustomizations and sources. + ${Suspend}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] @@ -1129,12 +2713,6 @@ param( # Run the command asynchronously ${NoWait}, - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] - [System.Management.Automation.SwitchParameter] - # Returns true when the command succeeds - ${PassThru}, - [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] [System.Uri] @@ -1162,11 +2740,29 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + $mapping = @{ - Delete = 'Az.KubernetesConfiguration.custom\Remove-AzKubernetesExtension'; - DeleteViaIdentity = 'Az.KubernetesConfiguration.custom\Remove-AzKubernetesExtension'; + UpdateExpanded = 'Az.KubernetesConfiguration.custom\Update-AzKubernetesConfigurationFlux'; + UpdateViaIdentityExpanded = 'Az.KubernetesConfiguration.custom\Update-AzKubernetesConfigurationFlux'; } - if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } $cmdInfo = Get-Command -Name $mapping[$parameterSet] @@ -1176,6 +2772,7 @@ begin { $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } @@ -1184,17 +2781,34 @@ process { try { $steppablePipeline.Process($_) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} end { try { $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} +} } <# @@ -1203,16 +2817,16 @@ Patch an existing Kubernetes Cluster Extension. .Description Patch an existing Kubernetes Cluster Extension. .Example -PS C:\> Update-AzKubernetesExtension -ClusterName azps_test_cluster -ClusterType ConnectedClusters -Name azps_test_extension -ResourceGroupName azps_test_group -ConfigurationProtectedSetting @{"aa"="bb"} +PS C:\> Update-AzKubernetesExtension -ClusterName azpstest_cluster_arc -ClusterType ConnectedClusters -Name azpstest-extension -ResourceGroupName azpstest_gp -ConfigurationProtectedSetting @{"aa"="bb"} -Name ExtensionType Version ProvisioningState AutoUpgradeMinorVersion ReleaseTrain ResourceGroupName ----- ------------- ------- ----------------- ----------------------- ------------ ----------------- -azps_test_extension microsoft.arcdataservices 1.0.16701001 Succeeded True Stable azps_test_group +Name ExtensionType Version ProvisioningState AutoUpgradeMinorVersion ReleaseTrain +---- ------------- ------- ----------------- ----------------------- ------------ +azpstest-extension azuremonitor-containers 2.9.2 Succeeded True Stable .Inputs Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtension +Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtension .Notes COMPLEX PARAMETER PROPERTIES @@ -1220,20 +2834,21 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ClusterName ]: The name of the kubernetes cluster. - [ClusterResourceName ]: The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or connectedClusters (for OnPrem K8S clusters). - [ClusterRp ]: The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or Microsoft.Kubernetes (for OnPrem K8S clusters). + [ClusterResourceName ]: The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. + [ClusterRp ]: The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. [ExtensionName ]: Name of the Extension. + [FluxConfigurationName ]: Name of the Flux Configuration. [Id ]: Resource identity path [OperationId ]: operation Id - [ResourceGroupName ]: The name of the resource group. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [SourceControlConfigurationName ]: Name of the Source Control Configuration. - [SubscriptionId ]: The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000) + [SubscriptionId ]: The ID of the target subscription. .Link https://docs.microsoft.com/powershell/module/az.kubernetesconfiguration/update-azkubernetesextension #> function Update-AzKubernetesExtension { [Alias('Update-AzK8sExtension')] -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtension])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtension])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] @@ -1245,7 +2860,8 @@ param( [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [System.String] - # The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or connectedClusters (for OnPrem K8S clusters). + # The Kubernetes cluster resource name - i.e. + # managedClusters, connectedClusters, provisionedClusters. ${ClusterType}, [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] @@ -1266,9 +2882,7 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] - # The Azure subscription ID. - # This is a GUID-formatted string (e.g. - # 00000000-0000-0000-0000-000000000000) + # The ID of the target subscription. ${SubscriptionId}, [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)] @@ -1286,14 +2900,14 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtensionPropertiesConfigurationProtectedSettings]))] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtensionPropertiesConfigurationProtectedSettings]))] [System.Collections.Hashtable] # Configuration settings that are sensitive, as name-value pairs for configuring this extension. ${ConfigurationProtectedSetting}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtensionPropertiesConfigurationSettings]))] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtensionPropertiesConfigurationSettings]))] [System.Collections.Hashtable] # Configuration settings, as name-value pairs for configuring this extension. ${ConfigurationSetting}, @@ -1379,6 +2993,24 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + $mapping = @{ UpdateExpanded = 'Az.KubernetesConfiguration.custom\Update-AzKubernetesExtension'; UpdateViaIdentityExpanded = 'Az.KubernetesConfiguration.custom\Update-AzKubernetesExtension'; @@ -1393,6 +3025,7 @@ begin { $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } @@ -1401,15 +3034,32 @@ process { try { $steppablePipeline.Process($_) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} end { try { $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} +} } diff --git a/src/KubernetesConfiguration/exports/Remove-AzKubernetesConfiguration.ps1 b/src/KubernetesConfiguration/exports/Remove-AzKubernetesConfiguration.ps1 index 0d1f11071d4b..8882f2faca19 100644 --- a/src/KubernetesConfiguration/exports/Remove-AzKubernetesConfiguration.ps1 +++ b/src/KubernetesConfiguration/exports/Remove-AzKubernetesConfiguration.ps1 @@ -20,11 +20,11 @@ This will delete the YAML file used to set up the Source control configuration, .Description This will delete the YAML file used to set up the Source control configuration, thus stopping future sync from the source repo. .Example -PS C:\> Remove-AzKubernetesConfiguration -ResourceGroupName azps_test_group -ClusterName azps_test_cluster -Name azpstestk8s01 -ClusterType ConnectedClusters +PS C:\> Remove-AzKubernetesConfiguration -ResourceGroupName azpstest_gp -ClusterName azpstest_cluster_arc -Name azpstestk8s -ClusterType ConnectedClusters .Example -PS C:\> $kubConf = Get-AzKubernetesConfiguration -ClusterName azps_test_cluster -ClusterType ConnectedClusters -ResourceGroupName azps_test_group -Name azpstestk8s02 -PS C:\> Remove-AzKubernetesConfiguration -InputObject $kubConf +PS C:\> $kubConf = Get-AzKubernetesConfiguration -ClusterName azpstest_cluster_arc -ClusterType ConnectedClusters -ResourceGroupName azpstest_gp -Name azpstestk8s-operator +Remove-AzKubernetesConfiguration -InputObject $kubConf .Inputs @@ -38,14 +38,15 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ClusterName ]: The name of the kubernetes cluster. - [ClusterResourceName ]: The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or connectedClusters (for OnPrem K8S clusters). - [ClusterRp ]: The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or Microsoft.Kubernetes (for OnPrem K8S clusters). + [ClusterResourceName ]: The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. + [ClusterRp ]: The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. [ExtensionName ]: Name of the Extension. + [FluxConfigurationName ]: Name of the Flux Configuration. [Id ]: Resource identity path [OperationId ]: operation Id - [ResourceGroupName ]: The name of the resource group. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [SourceControlConfigurationName ]: Name of the Source Control Configuration. - [SubscriptionId ]: The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000) + [SubscriptionId ]: The ID of the target subscription. .Link https://docs.microsoft.com/powershell/module/az.kubernetesconfiguration/remove-azkubernetesconfiguration #> @@ -63,7 +64,8 @@ param( [Parameter(ParameterSetName='Delete', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [System.String] - # The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or connectedClusters (for OnPrem K8S clusters). + # The Kubernetes cluster resource name - i.e. + # managedClusters, connectedClusters, provisionedClusters. ${ClusterType}, [Parameter(ParameterSetName='Delete', Mandatory)] @@ -77,13 +79,14 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [System.String] # The name of the resource group. + # The name is case insensitive. ${ResourceGroupName}, [Parameter(ParameterSetName='Delete')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] - # The Azure subscription ID. + # The ID of the target subscription. ${SubscriptionId}, [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] @@ -166,6 +169,24 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + $mapping = @{ Delete = 'Az.KubernetesConfiguration.custom\Remove-AzKubernetesConfiguration'; DeleteViaIdentity = 'Az.KubernetesConfiguration.custom\Remove-AzKubernetesConfiguration'; @@ -180,6 +201,7 @@ begin { $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } @@ -188,15 +210,32 @@ process { try { $steppablePipeline.Process($_) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} end { try { $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} +} } diff --git a/src/KubernetesConfiguration/exports/Remove-AzKubernetesConfigurationFlux.ps1 b/src/KubernetesConfiguration/exports/Remove-AzKubernetesConfigurationFlux.ps1 new file mode 100644 index 000000000000..ed30cf5ea3a1 --- /dev/null +++ b/src/KubernetesConfiguration/exports/Remove-AzKubernetesConfigurationFlux.ps1 @@ -0,0 +1,246 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +This will delete the YAML file used to set up the Flux Configuration, thus stopping future sync from the source repo. +.Description +This will delete the YAML file used to set up the Flux Configuration, thus stopping future sync from the source repo. +.Example +PS C:\> Remove-AzKubernetesConfigurationFlux -ClusterName azpstest_cluster_arc -ClusterType ConnectedClusters -Name azpstestflux-k8s -ResourceGroupName azpstest_gp + +.Example +PS C:\> Get-AzKubernetesConfigurationFlux -ClusterName azpstest_cluster_arc -ClusterType ConnectedClusters -Name azpstestflux-k8s -ResourceGroupName azpstest_gp | Remove-AzKubernetesConfigurationFlux + + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentity +.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. + [ClusterResourceName ]: The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. + [ClusterRp ]: The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. + [ExtensionName ]: Name of the Extension. + [FluxConfigurationName ]: Name of the Flux Configuration. + [Id ]: Resource identity path + [OperationId ]: operation Id + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SourceControlConfigurationName ]: Name of the Source Control Configuration. + [SubscriptionId ]: The ID of the target subscription. +.Link +https://docs.microsoft.com/powershell/module/az.kubernetesconfiguration/remove-azkubernetesconfigurationflux +#> +function Remove-AzKubernetesConfigurationFlux { +[Alias('Remove-AzK8sConfigurationFlux')] +[OutputType([System.Boolean])] +[CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Delete', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [System.String] + # The name of the kubernetes cluster. + ${ClusterName}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [System.String] + # The Kubernetes cluster resource name - i.e. + # managedClusters, connectedClusters, provisionedClusters. + ${ClusterType}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [Alias('FluxConfigurationName')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [System.String] + # Name of the Flux Configuration. + ${Name}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Delete')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Query')] + [System.Management.Automation.SwitchParameter] + # Delete the extension resource in Azure - not the normal asynchronous delete. + ${ForceDelete}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Returns true when the command succeeds + ${PassThru}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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 + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Delete = 'Az.KubernetesConfiguration.custom\Remove-AzKubernetesConfigurationFlux'; + DeleteViaIdentity = 'Az.KubernetesConfiguration.custom\Remove-AzKubernetesConfigurationFlux'; + } + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/KubernetesConfiguration/exports/Remove-AzKubernetesExtension.ps1 b/src/KubernetesConfiguration/exports/Remove-AzKubernetesExtension.ps1 index a10e1f4c51ea..c45a7b16da81 100644 --- a/src/KubernetesConfiguration/exports/Remove-AzKubernetesExtension.ps1 +++ b/src/KubernetesConfiguration/exports/Remove-AzKubernetesExtension.ps1 @@ -22,7 +22,7 @@ This will cause the Agent to Uninstall the extension from the cluster. Delete a Kubernetes Cluster Extension. This will cause the Agent to Uninstall the extension from the cluster. .Example -PS C:\> Remove-AzKubernetesExtension -ClusterName azps_test_cluster -ClusterType ConnectedClusters -Name azps_test_extension -ResourceGroupName azps_test_group +PS C:\> Remove-AzKubernetesExtension -ClusterName azpstest_cluster_arc -ClusterType ConnectedClusters -Name azpstest-extension -ResourceGroupName azpstest_gp .Inputs @@ -36,16 +36,17 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ClusterName ]: The name of the kubernetes cluster. - [ClusterResourceName ]: The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or connectedClusters (for OnPrem K8S clusters). - [ClusterRp ]: The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or Microsoft.Kubernetes (for OnPrem K8S clusters). + [ClusterResourceName ]: The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. + [ClusterRp ]: The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. [ExtensionName ]: Name of the Extension. + [FluxConfigurationName ]: Name of the Flux Configuration. [Id ]: Resource identity path [OperationId ]: operation Id - [ResourceGroupName ]: The name of the resource group. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [SourceControlConfigurationName ]: Name of the Source Control Configuration. - [SubscriptionId ]: The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000) + [SubscriptionId ]: The ID of the target subscription. .Link -https://docs.microsoft.com/powershell/module/az.kubernetesconfiguration/remove-azkubernetesextension``` +https://docs.microsoft.com/powershell/module/az.kubernetesconfiguration/remove-azkubernetesextension #> function Remove-AzKubernetesExtension { [Alias('Remove-AzK8sExtension')] @@ -61,7 +62,8 @@ param( [Parameter(ParameterSetName='Delete', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [System.String] - # The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or connectedClusters (for OnPrem K8S clusters). + # The Kubernetes cluster resource name - i.e. + # managedClusters, connectedClusters, provisionedClusters. ${ClusterType}, [Parameter(ParameterSetName='Delete', Mandatory)] @@ -82,9 +84,7 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] - # The Azure subscription ID. - # This is a GUID-formatted string (e.g. - # 00000000-0000-0000-0000-000000000000) + # The ID of the target subscription. ${SubscriptionId}, [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] @@ -173,6 +173,24 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + $mapping = @{ Delete = 'Az.KubernetesConfiguration.custom\Remove-AzKubernetesExtension'; DeleteViaIdentity = 'Az.KubernetesConfiguration.custom\Remove-AzKubernetesExtension'; @@ -187,6 +205,7 @@ begin { $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } @@ -195,15 +214,32 @@ process { try { $steppablePipeline.Process($_) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} end { try { $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} +} } diff --git a/src/KubernetesConfiguration/exports/Update-AzKubernetesConfigurationFlux.ps1 b/src/KubernetesConfiguration/exports/Update-AzKubernetesConfigurationFlux.ps1 new file mode 100644 index 000000000000..c61fadff8165 --- /dev/null +++ b/src/KubernetesConfiguration/exports/Update-AzKubernetesConfigurationFlux.ps1 @@ -0,0 +1,379 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Update an existing Kubernetes Flux Configuration. +.Description +Update an existing Kubernetes Flux Configuration. +.Example +PS C:\> Update-AzKubernetesConfigurationFlux -ClusterName azpstest_cluster_arc -ClusterType ConnectedClusters -Name azpstestflux-k8s -ResourceGroupName azpstest_gp -GitRepositoryUrl https://github.com/fluxcd/flux2-kustomize-helm-example -RepositoryRefBranch main -SourceKind 'GitRepository' -GitRepositorySyncIntervalInSecond 600 -GitRepositoryTimeoutInSecond 600 -Suspend:$false + +Name ResourceGroupName +---- ----------------- +azpstestflux-k8s azpstest_gp +.Example +PS C:\> Get-AzKubernetesConfigurationFlux -ClusterName azpstest_cluster_arc -ClusterType ConnectedClusters -Name azpstestflux-k8s -ResourceGroupName azpstest_gp | Update-AzKubernetesConfigurationFlux -GitRepositoryUrl https://github.com/fluxcd/flux2-kustomize-helm-example -RepositoryRefBranch main -SourceKind 'GitRepository' -GitRepositorySyncIntervalInSecond 600 -GitRepositoryTimeoutInSecond 600 -Suspend:$false + +Name ResourceGroupName +---- ----------------- +azpstestflux-k8s azpstest_gp + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentity +.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. + [ClusterResourceName ]: The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. + [ClusterRp ]: The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. + [ExtensionName ]: Name of the Extension. + [FluxConfigurationName ]: Name of the Flux Configuration. + [Id ]: Resource identity path + [OperationId ]: operation Id + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SourceControlConfigurationName ]: Name of the Source Control Configuration. + [SubscriptionId ]: The ID of the target subscription. +.Link +https://docs.microsoft.com/powershell/module/az.kubernetesconfiguration/update-azkubernetesconfigurationflux +#> +function Update-AzKubernetesConfigurationFlux { +[Alias('Update-AzK8sConfigurationFlux')] +[OutputType([System.Boolean])] +[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [System.String] + # The name of the kubernetes cluster. + ${ClusterName}, + + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [System.String] + # The Kubernetes cluster resource name - i.e. + # managedClusters, connectedClusters, provisionedClusters. + ${ClusterType}, + + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Alias('FluxConfigurationName')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [System.String] + # Name of the Flux Configuration. + ${Name}, + + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.Security.SecureString] + # Plaintext access key used to securely access the S3 bucket + ${BucketAccessKey}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Specify whether to use insecure communication when puling data from the S3 bucket. + ${BucketInsecure}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided configuration secrets. + ${BucketLocalAuthRef}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # The bucket name to sync from the url endpoint for the flux configuration. + ${BucketName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.Int64] + # The interval at which to re-reconcile the cluster git repository source with the remote. + ${BucketSyncIntervalInSecond}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.Int64] + # The maximum time to attempt to reconcile the cluster git repository source with the remote. + ${BucketTimeoutInSecond}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # The URL to sync for the flux configuration S3 bucket. + ${BucketUrl}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesConfigurationProtectedSettings]))] + [System.Collections.Hashtable] + # Key-value pairs of protected configuration settings for the configuration + ${ConfigurationProtectedSetting}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # Base64-encoded HTTPS certificate authority contents used to access git private git repositories over HTTPS + ${GitRepositoryHttpsCaCert}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # Plaintext HTTPS username used to access private git repositories over HTTPS + ${GitRepositoryHttpsUser}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided configuration secrets. + ${GitRepositoryLocalAuthRef}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # Base64-encoded known_hosts value containing public SSH keys required to access private git repositories over SSH + ${GitRepositorySshKnownHost}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.Int64] + # The interval at which to re-reconcile the cluster git repository source with the remote. + ${GitRepositorySyncIntervalInSecond}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.Int64] + # The maximum time to attempt to reconcile the cluster git repository source with the remote. + ${GitRepositoryTimeoutInSecond}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # The URL to sync for the flux configuration git repository. + ${GitRepositoryUrl}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesKustomizations]))] + [System.Collections.Hashtable] + # Array of kustomizations used to reconcile the artifact pulled by the source type on the cluster. + ${Kustomization}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # The git repository branch name to checkout. + ${RepositoryRefBranch}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # The commit SHA to checkout. + # This value must be combined with the branch name to be valid. + # This takes precedence over semver. + ${RepositoryRefCommit}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # The semver range used to match against git repository tags. + # This takes precedence over tag. + ${RepositoryRefSemver}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # The git repository tag name to checkout. + # This takes precedence over branch. + ${RepositoryRefTag}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType])] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType] + # Source Kind to pull the configuration data from. + ${SourceKind}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Whether this configuration should suspend its reconciliation of its kustomizations and sources. + ${Suspend}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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 + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + UpdateExpanded = 'Az.KubernetesConfiguration.custom\Update-AzKubernetesConfigurationFlux'; + UpdateViaIdentityExpanded = 'Az.KubernetesConfiguration.custom\Update-AzKubernetesConfigurationFlux'; + } + if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/KubernetesConfiguration/exports/Update-AzKubernetesExtension.ps1 b/src/KubernetesConfiguration/exports/Update-AzKubernetesExtension.ps1 index e3e2a6fc489e..b5bf3e632ace 100644 --- a/src/KubernetesConfiguration/exports/Update-AzKubernetesExtension.ps1 +++ b/src/KubernetesConfiguration/exports/Update-AzKubernetesExtension.ps1 @@ -20,16 +20,16 @@ Patch an existing Kubernetes Cluster Extension. .Description Patch an existing Kubernetes Cluster Extension. .Example -PS C:\> Update-AzKubernetesExtension -ClusterName azps_test_cluster -ClusterType ConnectedClusters -Name azps_test_extension -ResourceGroupName azps_test_group -ConfigurationProtectedSetting @{"aa"="bb"} +PS C:\> Update-AzKubernetesExtension -ClusterName azpstest_cluster_arc -ClusterType ConnectedClusters -Name azpstest-extension -ResourceGroupName azpstest_gp -ConfigurationProtectedSetting @{"aa"="bb"} -Name ExtensionType Version ProvisioningState AutoUpgradeMinorVersion ReleaseTrain ResourceGroupName ----- ------------- ------- ----------------- ----------------------- ------------ ----------------- -azps_test_extension microsoft.arcdataservices 1.0.16701001 Succeeded True Stable azps_test_group +Name ExtensionType Version ProvisioningState AutoUpgradeMinorVersion ReleaseTrain +---- ------------- ------- ----------------- ----------------------- ------------ +azpstest-extension azuremonitor-containers 2.9.2 Succeeded True Stable .Inputs Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtension +Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtension .Notes COMPLEX PARAMETER PROPERTIES @@ -37,20 +37,21 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ClusterName ]: The name of the kubernetes cluster. - [ClusterResourceName ]: The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or connectedClusters (for OnPrem K8S clusters). - [ClusterRp ]: The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or Microsoft.Kubernetes (for OnPrem K8S clusters). + [ClusterResourceName ]: The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. + [ClusterRp ]: The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. [ExtensionName ]: Name of the Extension. + [FluxConfigurationName ]: Name of the Flux Configuration. [Id ]: Resource identity path [OperationId ]: operation Id - [ResourceGroupName ]: The name of the resource group. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [SourceControlConfigurationName ]: Name of the Source Control Configuration. - [SubscriptionId ]: The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000) + [SubscriptionId ]: The ID of the target subscription. .Link https://docs.microsoft.com/powershell/module/az.kubernetesconfiguration/update-azkubernetesextension #> function Update-AzKubernetesExtension { [Alias('Update-AzK8sExtension')] -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtension])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtension])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] @@ -62,7 +63,8 @@ param( [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [System.String] - # The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or connectedClusters (for OnPrem K8S clusters). + # The Kubernetes cluster resource name - i.e. + # managedClusters, connectedClusters, provisionedClusters. ${ClusterType}, [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] @@ -83,9 +85,7 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] - # The Azure subscription ID. - # This is a GUID-formatted string (e.g. - # 00000000-0000-0000-0000-000000000000) + # The ID of the target subscription. ${SubscriptionId}, [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)] @@ -103,14 +103,14 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtensionPropertiesConfigurationProtectedSettings]))] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtensionPropertiesConfigurationProtectedSettings]))] [System.Collections.Hashtable] # Configuration settings that are sensitive, as name-value pairs for configuring this extension. ${ConfigurationProtectedSetting}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtensionPropertiesConfigurationSettings]))] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtensionPropertiesConfigurationSettings]))] [System.Collections.Hashtable] # Configuration settings, as name-value pairs for configuring this extension. ${ConfigurationSetting}, @@ -196,6 +196,24 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + $mapping = @{ UpdateExpanded = 'Az.KubernetesConfiguration.custom\Update-AzKubernetesExtension'; UpdateViaIdentityExpanded = 'Az.KubernetesConfiguration.custom\Update-AzKubernetesExtension'; @@ -210,6 +228,7 @@ begin { $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } @@ -218,15 +237,32 @@ process { try { $steppablePipeline.Process($_) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} end { try { $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} +} } diff --git a/src/KubernetesConfiguration/generate-info.json b/src/KubernetesConfiguration/generate-info.json index 5e2c5bb22975..17ddb870a6e4 100644 --- a/src/KubernetesConfiguration/generate-info.json +++ b/src/KubernetesConfiguration/generate-info.json @@ -1,8 +1,8 @@ { - "autorest_core": "3.6.6", - "autorest_modelerfour": "4.15.414", + "autorest_core": "3.8.4", + "autorest_powershell": "3.0.487", "node": "v14.15.5", - "autorest_powershell": "3.0.461", - "swagger_commit": "2b56c8a3da0e04aea6f6d80a9ac04741d1ae5904", - "autorest": "`-- (empty)" + "swagger_commit": "792db17291c758b2bfdbbc0d35d0e2f5b5a1bd05", + "autorest": "`-- (empty)", + "autorest_modelerfour": "4.15.414" } diff --git a/src/KubernetesConfiguration/generated/Module.cs b/src/KubernetesConfiguration/generated/Module.cs index f9da62fc7e1e..bcf8b704fcc6 100644 --- a/src/KubernetesConfiguration/generated/Module.cs +++ b/src/KubernetesConfiguration/generated/Module.cs @@ -11,6 +11,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration 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 ArgumentCompleterDelegate = global::System.Func; + using GetTelemetryIdDelegate = global::System.Func; + using TelemetryDelegate = global::System.Action; 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 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>; @@ -30,6 +32,8 @@ public partial class Module /// the ISendAsync pipeline instance (when proxy is enabled) private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.HttpPipeline _pipelineWithProxy; + public bool _useProxy = false; + public global::System.Net.WebProxy _webProxy = new global::System.Net.WebProxy(); /// Gets completion data for azure specific fields @@ -44,6 +48,9 @@ public partial class Module /// The delegate to call to get parameter data from a common module. public GetParameterDelegate GetParameterValue { get; set; } + /// The delegate to get the telemetry Id. + public GetTelemetryIdDelegate GetTelemetryId { get; set; } + /// Backing field for property. private static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module _instance; @@ -65,6 +72,9 @@ public partial class Module /// The ResourceID for this module (azure arm). public string ResourceId => @"Az.KubernetesConfiguration"; + /// The delegate for creating a telemetry. + public TelemetryDelegate Telemetry { get; set; } + /// The from the cmdlet /// The HttpPipeline for the request @@ -88,7 +98,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.HttpPi { Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.HttpPipeline pipeline = null; BeforeCreatePipeline(invocationInfo, ref pipeline); - pipeline = (pipeline ?? (_handler.UseProxy ? _pipelineWithProxy : _pipeline)).Clone(); + pipeline = (pipeline ?? (_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); } ); @@ -115,7 +125,7 @@ public void Init() /// Creates the module instance. private Module() { - /// constructor + // constructor ClientAPI = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.KubernetesConfiguration(); _handler.Proxy = _webProxy; _pipeline = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.HttpPipeline(new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.HttpClientFactory(new global::System.Net.Http.HttpClient())); @@ -127,12 +137,24 @@ private Module() /// True if the proxy should use default credentials public void SetProxyConfiguration(global::System.Uri proxy, global::System.Management.Automation.PSCredential proxyCredential, bool proxyUseDefaultCredentials) { + _useProxy = proxy != null; + if (proxy == null) + { + return; + } // set the proxy configuration _webProxy.Address = proxy; _webProxy.BypassProxyOnLocal = false; - _webProxy.Credentials = proxyCredential ?.GetNetworkCredential(); - _webProxy.UseDefaultCredentials = proxyUseDefaultCredentials; - _handler.UseProxy = proxy != null; + if (proxyUseDefaultCredentials) + { + _webProxy.Credentials = null; + _webProxy.UseDefaultCredentials = true; + } + else + { + _webProxy.UseDefaultCredentials = false; + _webProxy.Credentials = proxyCredential ?.GetNetworkCredential(); + } } /// Called to dispatch events to the common module listener diff --git a/src/KubernetesConfiguration/generated/api/KubernetesConfiguration.cs b/src/KubernetesConfiguration/generated/api/KubernetesConfiguration.cs index 8c088c8add54..c6ee2338d1ea 100644 --- a/src/KubernetesConfiguration/generated/api/KubernetesConfiguration.cs +++ b/src/KubernetesConfiguration/generated/api/KubernetesConfiguration.cs @@ -9,18 +9,16 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration /// /// Low-level API implementation for the KubernetesConfiguration service. - /// Use these APIs to create Source Control Configuration resources through ARM, for Kubernetes Clusters. + /// Use these APIs to create extension resources through ARM, for Kubernetes Clusters. /// public partial class KubernetesConfiguration { /// Create a new Kubernetes Cluster Extension. - /// The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000) + /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or Microsoft.Kubernetes - /// (for OnPrem K8S clusters). - /// The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or - /// connectedClusters (for OnPrem K8S clusters). + /// The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. + /// The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. /// The name of the kubernetes cluster. /// Name of the Extension. /// Properties necessary to Create an Extension. @@ -32,9 +30,9 @@ public partial class KubernetesConfiguration /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ExtensionsCreate(string subscriptionId, string resourceGroupName, string clusterRp, string clusterResourceName, string clusterName, string extensionName, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtension body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ExtensionsCreate(string subscriptionId, string resourceGroupName, string clusterRp, string clusterResourceName, string clusterName, string extensionName, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtension body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) { - var apiVersion = @"2021-09-01"; + var apiVersion = @"2022-03-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -84,15 +82,15 @@ public partial class KubernetesConfiguration /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ExtensionsCreateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtension body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ExtensionsCreateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtension body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) { - var apiVersion = @"2021-09-01"; + var apiVersion = @"2022-03-01"; // 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/(?[^/]+)/(?[^/]+)/(?[^/]+)/providers/Microsoft.KubernetesConfiguration/extensions/(?[^/]+)$").Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/(?[^/]+)/(?[^/]+)/(?[^/]+)/providers/Microsoft.KubernetesConfiguration/extensions/(?[^/]+)$", 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/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/extensions/{extensionName}'"); @@ -150,7 +148,7 @@ public partial class KubernetesConfiguration /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task ExtensionsCreate_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.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task ExtensionsCreate_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.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -263,13 +261,13 @@ public partial class KubernetesConfiguration case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.Extension.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.Extension.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorResponseAutoGenerated.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -288,12 +286,10 @@ public partial class KubernetesConfiguration /// Validation method for method. Call this like the actual call, but you will get validation /// events back. /// - /// The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000) + /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or Microsoft.Kubernetes - /// (for OnPrem K8S clusters). - /// The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or - /// connectedClusters (for OnPrem K8S clusters). + /// The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. + /// The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. /// The name of the kubernetes cluster. /// Name of the Extension. /// Properties necessary to Create an Extension. @@ -301,11 +297,12 @@ public partial class KubernetesConfiguration /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task ExtensionsCreate_Validate(string subscriptionId, string resourceGroupName, string clusterRp, string clusterResourceName, string clusterName, string extensionName, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtension body, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task ExtensionsCreate_Validate(string subscriptionId, string resourceGroupName, string clusterRp, string clusterResourceName, string clusterName, string extensionName, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtension body, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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); @@ -321,12 +318,10 @@ public partial class KubernetesConfiguration /// /// Delete a Kubernetes Cluster Extension. This will cause the Agent to Uninstall the extension from the cluster. /// - /// The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000) + /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or Microsoft.Kubernetes - /// (for OnPrem K8S clusters). - /// The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or - /// connectedClusters (for OnPrem K8S clusters). + /// The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. + /// The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. /// The name of the kubernetes cluster. /// Name of the Extension. /// Delete the extension resource in Azure - not the normal asynchronous delete. @@ -339,9 +334,9 @@ public partial class KubernetesConfiguration /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ExtensionsDelete(string subscriptionId, string resourceGroupName, string clusterRp, string clusterResourceName, string clusterName, string extensionName, bool? forceDelete, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ExtensionsDelete(string subscriptionId, string resourceGroupName, string clusterRp, string clusterResourceName, string clusterName, string extensionName, bool? forceDelete, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) { - var apiVersion = @"2021-09-01"; + var apiVersion = @"2022-03-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -392,15 +387,15 @@ public partial class KubernetesConfiguration /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ExtensionsDeleteViaIdentity(global::System.String viaIdentity, bool? forceDelete, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ExtensionsDeleteViaIdentity(global::System.String viaIdentity, bool? forceDelete, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) { - var apiVersion = @"2021-09-01"; + var apiVersion = @"2022-03-01"; // 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/(?[^/]+)/(?[^/]+)/(?[^/]+)/providers/Microsoft.KubernetesConfiguration/extensions/(?[^/]+)$").Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/(?[^/]+)/(?[^/]+)/(?[^/]+)/providers/Microsoft.KubernetesConfiguration/extensions/(?[^/]+)$", 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/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/extensions/{extensionName}'"); @@ -457,7 +452,7 @@ public partial class KubernetesConfiguration /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task ExtensionsDelete_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.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task ExtensionsDelete_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.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -583,7 +578,7 @@ public partial class KubernetesConfiguration default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorResponseAutoGenerated.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -602,12 +597,10 @@ public partial class KubernetesConfiguration /// Validation method for method. Call this like the actual call, but you will get validation /// events back. /// - /// The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000) + /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or Microsoft.Kubernetes - /// (for OnPrem K8S clusters). - /// The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or - /// connectedClusters (for OnPrem K8S clusters). + /// The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. + /// The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. /// The name of the kubernetes cluster. /// Name of the Extension. /// Delete the extension resource in Azure - not the normal asynchronous delete. @@ -620,6 +613,7 @@ public partial class KubernetesConfiguration 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); @@ -631,12 +625,10 @@ public partial class KubernetesConfiguration } /// Gets Kubernetes Cluster Extension. - /// The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000) + /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or Microsoft.Kubernetes - /// (for OnPrem K8S clusters). - /// The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or - /// connectedClusters (for OnPrem K8S clusters). + /// The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. + /// The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. /// The name of the kubernetes cluster. /// Name of the Extension. /// a delegate that is called when the remote service returns 200 (OK). @@ -647,9 +639,9 @@ public partial class KubernetesConfiguration /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ExtensionsGet(string subscriptionId, string resourceGroupName, string clusterRp, string clusterResourceName, string clusterName, string extensionName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ExtensionsGet(string subscriptionId, string resourceGroupName, string clusterRp, string clusterResourceName, string clusterName, string extensionName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) { - var apiVersion = @"2021-09-01"; + var apiVersion = @"2022-03-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -694,15 +686,15 @@ public partial class KubernetesConfiguration /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ExtensionsGetViaIdentity(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.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ExtensionsGetViaIdentity(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.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) { - var apiVersion = @"2021-09-01"; + var apiVersion = @"2022-03-01"; // 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/(?[^/]+)/(?[^/]+)/(?[^/]+)/providers/Microsoft.KubernetesConfiguration/extensions/(?[^/]+)$").Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/(?[^/]+)/(?[^/]+)/(?[^/]+)/providers/Microsoft.KubernetesConfiguration/extensions/(?[^/]+)$", 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/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/extensions/{extensionName}'"); @@ -756,7 +748,7 @@ public partial class KubernetesConfiguration /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task ExtensionsGet_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.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task ExtensionsGet_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.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -774,13 +766,13 @@ public partial class KubernetesConfiguration case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.Extension.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.Extension.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorResponseAutoGenerated.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -799,12 +791,10 @@ public partial class KubernetesConfiguration /// Validation method for method. Call this like the actual call, but you will get validation /// events back. /// - /// The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000) + /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or Microsoft.Kubernetes - /// (for OnPrem K8S clusters). - /// The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or - /// connectedClusters (for OnPrem K8S clusters). + /// The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. + /// The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. /// The name of the kubernetes cluster. /// Name of the Extension. /// an instance that will receive events. @@ -816,6 +806,7 @@ public partial class KubernetesConfiguration 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); @@ -827,12 +818,10 @@ public partial class KubernetesConfiguration } /// List all Extensions in the cluster. - /// The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000) + /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or Microsoft.Kubernetes - /// (for OnPrem K8S clusters). - /// The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or - /// connectedClusters (for OnPrem K8S clusters). + /// The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. + /// The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. /// The name of the kubernetes 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 @@ -842,9 +831,9 @@ public partial class KubernetesConfiguration /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ExtensionsList(string subscriptionId, string resourceGroupName, string clusterRp, string clusterResourceName, string clusterName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ExtensionsList(string subscriptionId, string resourceGroupName, string clusterRp, string clusterResourceName, string clusterName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) { - var apiVersion = @"2021-09-01"; + var apiVersion = @"2022-03-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -888,15 +877,15 @@ public partial class KubernetesConfiguration /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ExtensionsListViaIdentity(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.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ExtensionsListViaIdentity(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.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) { - var apiVersion = @"2021-09-01"; + var apiVersion = @"2022-03-01"; // 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/(?[^/]+)/(?[^/]+)/(?[^/]+)/providers/Microsoft.KubernetesConfiguration/extensions$").Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/(?[^/]+)/(?[^/]+)/(?[^/]+)/providers/Microsoft.KubernetesConfiguration/extensions$", 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/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/extensions'"); @@ -948,7 +937,7 @@ public partial class KubernetesConfiguration /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task ExtensionsList_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.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task ExtensionsList_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.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -966,13 +955,13 @@ public partial class KubernetesConfiguration case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.ExtensionsList.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ExtensionsList.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorResponseAutoGenerated.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -991,12 +980,10 @@ public partial class KubernetesConfiguration /// Validation method for method. Call this like the actual call, but you will get validation /// events back. /// - /// The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000) + /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or Microsoft.Kubernetes - /// (for OnPrem K8S clusters). - /// The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or - /// connectedClusters (for OnPrem K8S clusters). + /// The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. + /// The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. /// The name of the kubernetes cluster. /// an instance that will receive events. /// @@ -1007,6 +994,7 @@ public partial class KubernetesConfiguration 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); @@ -1017,12 +1005,10 @@ public partial class KubernetesConfiguration } /// Patch an existing Kubernetes Cluster Extension. - /// The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000) + /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or Microsoft.Kubernetes - /// (for OnPrem K8S clusters). - /// The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or - /// connectedClusters (for OnPrem K8S clusters). + /// The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. + /// The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. /// The name of the kubernetes cluster. /// Name of the Extension. /// Properties to Patch in an existing Extension. @@ -1035,9 +1021,9 @@ public partial class KubernetesConfiguration /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ExtensionsUpdate(string subscriptionId, string resourceGroupName, string clusterRp, string clusterResourceName, string clusterName, string extensionName, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtension body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onConflict, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ExtensionsUpdate(string subscriptionId, string resourceGroupName, string clusterRp, string clusterResourceName, string clusterName, string extensionName, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtension body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onConflict, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) { - var apiVersion = @"2021-09-01"; + var apiVersion = @"2022-03-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -1088,15 +1074,15 @@ public partial class KubernetesConfiguration /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ExtensionsUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtension body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onConflict, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ExtensionsUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtension body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onConflict, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) { - var apiVersion = @"2021-09-01"; + var apiVersion = @"2022-03-01"; // 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/(?[^/]+)/(?[^/]+)/(?[^/]+)/providers/Microsoft.KubernetesConfiguration/extensions/(?[^/]+)$").Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/(?[^/]+)/(?[^/]+)/(?[^/]+)/providers/Microsoft.KubernetesConfiguration/extensions/(?[^/]+)$", 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/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/extensions/{extensionName}'"); @@ -1155,7 +1141,7 @@ public partial class KubernetesConfiguration /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task ExtensionsUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onConflict, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task ExtensionsUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onConflict, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -1268,19 +1254,19 @@ public partial class KubernetesConfiguration case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.Extension.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.Extension.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } case global::System.Net.HttpStatusCode.Conflict: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onConflict(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorResponseAutoGenerated.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onConflict(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorResponseAutoGenerated.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -1299,12 +1285,10 @@ public partial class KubernetesConfiguration /// Validation method for method. Call this like the actual call, but you will get validation /// events back. /// - /// The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000) + /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or Microsoft.Kubernetes - /// (for OnPrem K8S clusters). - /// The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or - /// connectedClusters (for OnPrem K8S clusters). + /// The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. + /// The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. /// The name of the kubernetes cluster. /// Name of the Extension. /// Properties to Patch in an existing Extension. @@ -1312,11 +1296,12 @@ public partial class KubernetesConfiguration /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task ExtensionsUpdate_Validate(string subscriptionId, string resourceGroupName, string clusterRp, string clusterResourceName, string clusterName, string extensionName, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtension body, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task ExtensionsUpdate_Validate(string subscriptionId, string resourceGroupName, string clusterRp, string clusterResourceName, string clusterName, string extensionName, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtension body, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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); @@ -1330,12 +1315,1511 @@ public partial class KubernetesConfiguration } /// Get Async Operation status - /// The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000) + /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or Microsoft.Kubernetes - /// (for OnPrem K8S clusters). - /// The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or - /// connectedClusters (for OnPrem K8S clusters). + /// The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. + /// The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. + /// The name of the kubernetes cluster. + /// Name of the Flux Configuration. + /// operation Id + /// 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.KubernetesConfiguration.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 FluxConfigOperationStatusGet(string subscriptionId, string resourceGroupName, string clusterRp, string clusterResourceName, string clusterName, string fluxConfigurationName, string operationId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/" + + global::System.Uri.EscapeDataString(clusterRp) + + "/" + + global::System.Uri.EscapeDataString(clusterResourceName) + + "/" + + global::System.Uri.EscapeDataString(clusterName) + + "/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/" + + global::System.Uri.EscapeDataString(fluxConfigurationName) + + "/operations/" + + global::System.Uri.EscapeDataString(operationId) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.FluxConfigOperationStatusGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Get Async Operation status + /// + /// 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.KubernetesConfiguration.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 FluxConfigOperationStatusGetViaIdentity(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.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-03-01"; + // 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/(?[^/]+)/(?[^/]+)/(?[^/]+)/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/(?[^/]+)/operations/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/{fluxConfigurationName}/operations/{operationId}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var clusterRp = _match.Groups["clusterRp"].Value; + var clusterResourceName = _match.Groups["clusterResourceName"].Value; + var clusterName = _match.Groups["clusterName"].Value; + var fluxConfigurationName = _match.Groups["fluxConfigurationName"].Value; + var operationId = _match.Groups["operationId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/" + + clusterRp + + "/" + + clusterResourceName + + "/" + + clusterName + + "/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/" + + fluxConfigurationName + + "/operations/" + + operationId + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.FluxConfigOperationStatusGet_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.KubernetesConfiguration.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 FluxConfigOperationStatusGet_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.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.OperationStatusResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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 Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. + /// The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. + /// The name of the kubernetes cluster. + /// Name of the Flux Configuration. + /// operation Id + /// 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 FluxConfigOperationStatusGet_Validate(string subscriptionId, string resourceGroupName, string clusterRp, string clusterResourceName, string clusterName, string fluxConfigurationName, string operationId, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.AssertNotNull(nameof(clusterRp),clusterRp); + await eventListener.AssertNotNull(nameof(clusterResourceName),clusterResourceName); + await eventListener.AssertNotNull(nameof(clusterName),clusterName); + await eventListener.AssertNotNull(nameof(fluxConfigurationName),fluxConfigurationName); + await eventListener.AssertNotNull(nameof(operationId),operationId); + } + } + + /// Create a new Kubernetes Flux Configuration. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. + /// The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. + /// The name of the kubernetes cluster. + /// Name of the Flux Configuration. + /// Properties necessary to Create a FluxConfiguration. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 400 (BadRequest). + /// 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.KubernetesConfiguration.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 FluxConfigurationsCreateOrUpdate(string subscriptionId, string resourceGroupName, string clusterRp, string clusterResourceName, string clusterName, string fluxConfigurationName, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfiguration body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onBadRequest, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/" + + global::System.Uri.EscapeDataString(clusterRp) + + "/" + + global::System.Uri.EscapeDataString(clusterResourceName) + + "/" + + global::System.Uri.EscapeDataString(clusterName) + + "/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/" + + global::System.Uri.EscapeDataString(fluxConfigurationName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.FluxConfigurationsCreateOrUpdate_Call(request,onOk,onBadRequest,onDefault,eventListener,sender); + } + } + + /// Create a new Kubernetes Flux Configuration. + /// + /// Properties necessary to Create a FluxConfiguration. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 400 (BadRequest). + /// 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.KubernetesConfiguration.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 FluxConfigurationsCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfiguration body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onBadRequest, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-03-01"; + // 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/(?[^/]+)/(?[^/]+)/(?[^/]+)/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/(?[^/]+)$", 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/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/{fluxConfigurationName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var clusterRp = _match.Groups["clusterRp"].Value; + var clusterResourceName = _match.Groups["clusterResourceName"].Value; + var clusterName = _match.Groups["clusterName"].Value; + var fluxConfigurationName = _match.Groups["fluxConfigurationName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/" + + clusterRp + + "/" + + clusterResourceName + + "/" + + clusterName + + "/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/" + + fluxConfigurationName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.FluxConfigurationsCreateOrUpdate_Call(request,onOk,onBadRequest,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 400 (BadRequest). + /// 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.KubernetesConfiguration.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 FluxConfigurationsCreateOrUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onBadRequest, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: azure-async-operation + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.FluxConfiguration.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + case global::System.Net.HttpStatusCode.BadRequest: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onBadRequest(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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 Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. + /// The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. + /// The name of the kubernetes cluster. + /// Name of the Flux Configuration. + /// Properties necessary to Create a FluxConfiguration. + /// 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 FluxConfigurationsCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string clusterRp, string clusterResourceName, string clusterName, string fluxConfigurationName, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfiguration body, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.AssertNotNull(nameof(clusterRp),clusterRp); + await eventListener.AssertNotNull(nameof(clusterResourceName),clusterResourceName); + await eventListener.AssertNotNull(nameof(clusterName),clusterName); + await eventListener.AssertNotNull(nameof(fluxConfigurationName),fluxConfigurationName); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// + /// This will delete the YAML file used to set up the Flux Configuration, thus stopping future sync from the source repo. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. + /// The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. + /// The name of the kubernetes cluster. + /// Name of the Flux Configuration. + /// Delete the extension resource in Azure - not the normal asynchronous delete. + /// 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.KubernetesConfiguration.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 FluxConfigurationsDelete(string subscriptionId, string resourceGroupName, string clusterRp, string clusterResourceName, string clusterName, string fluxConfigurationName, bool? forceDelete, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/" + + global::System.Uri.EscapeDataString(clusterRp) + + "/" + + global::System.Uri.EscapeDataString(clusterResourceName) + + "/" + + global::System.Uri.EscapeDataString(clusterName) + + "/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/" + + global::System.Uri.EscapeDataString(fluxConfigurationName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (null == forceDelete ? global::System.String.Empty : "forceDelete=" + global::System.Uri.EscapeDataString(forceDelete.ToString())) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.FluxConfigurationsDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + } + } + + /// + /// This will delete the YAML file used to set up the Flux Configuration, thus stopping future sync from the source repo. + /// + /// + /// Delete the extension resource in Azure - not the normal asynchronous delete. + /// 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.KubernetesConfiguration.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 FluxConfigurationsDeleteViaIdentity(global::System.String viaIdentity, bool? forceDelete, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-03-01"; + // 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/(?[^/]+)/(?[^/]+)/(?[^/]+)/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/(?[^/]+)$", 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/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/{fluxConfigurationName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var clusterRp = _match.Groups["clusterRp"].Value; + var clusterResourceName = _match.Groups["clusterResourceName"].Value; + var clusterName = _match.Groups["clusterName"].Value; + var fluxConfigurationName = _match.Groups["fluxConfigurationName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/" + + clusterRp + + "/" + + clusterResourceName + + "/" + + clusterName + + "/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/" + + fluxConfigurationName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (null == forceDelete ? global::System.String.Empty : "forceDelete=" + global::System.Uri.EscapeDataString(forceDelete.ToString())) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.FluxConfigurationsDelete_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.KubernetesConfiguration.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 FluxConfigurationsDelete_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.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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 _finalUri = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onNoContent(_response); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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 Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. + /// The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. + /// The name of the kubernetes cluster. + /// Name of the Flux Configuration. + /// Delete the extension resource in Azure - not the normal asynchronous delete. + /// 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 FluxConfigurationsDelete_Validate(string subscriptionId, string resourceGroupName, string clusterRp, string clusterResourceName, string clusterName, string fluxConfigurationName, bool? forceDelete, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.AssertNotNull(nameof(clusterRp),clusterRp); + await eventListener.AssertNotNull(nameof(clusterResourceName),clusterResourceName); + await eventListener.AssertNotNull(nameof(clusterName),clusterName); + await eventListener.AssertNotNull(nameof(fluxConfigurationName),fluxConfigurationName); + } + } + + /// Gets details of the Flux Configuration. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. + /// The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. + /// The name of the kubernetes cluster. + /// Name of the Flux Configuration. + /// 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.KubernetesConfiguration.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 FluxConfigurationsGet(string subscriptionId, string resourceGroupName, string clusterRp, string clusterResourceName, string clusterName, string fluxConfigurationName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/" + + global::System.Uri.EscapeDataString(clusterRp) + + "/" + + global::System.Uri.EscapeDataString(clusterResourceName) + + "/" + + global::System.Uri.EscapeDataString(clusterName) + + "/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/" + + global::System.Uri.EscapeDataString(fluxConfigurationName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.FluxConfigurationsGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Gets details of the Flux Configuration. + /// + /// 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.KubernetesConfiguration.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 FluxConfigurationsGetViaIdentity(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.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-03-01"; + // 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/(?[^/]+)/(?[^/]+)/(?[^/]+)/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/(?[^/]+)$", 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/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/{fluxConfigurationName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var clusterRp = _match.Groups["clusterRp"].Value; + var clusterResourceName = _match.Groups["clusterResourceName"].Value; + var clusterName = _match.Groups["clusterName"].Value; + var fluxConfigurationName = _match.Groups["fluxConfigurationName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/" + + clusterRp + + "/" + + clusterResourceName + + "/" + + clusterName + + "/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/" + + fluxConfigurationName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.FluxConfigurationsGet_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.KubernetesConfiguration.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 FluxConfigurationsGet_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.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.FluxConfiguration.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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 Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. + /// The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. + /// The name of the kubernetes cluster. + /// Name of the Flux Configuration. + /// 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 FluxConfigurationsGet_Validate(string subscriptionId, string resourceGroupName, string clusterRp, string clusterResourceName, string clusterName, string fluxConfigurationName, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.AssertNotNull(nameof(clusterRp),clusterRp); + await eventListener.AssertNotNull(nameof(clusterResourceName),clusterResourceName); + await eventListener.AssertNotNull(nameof(clusterName),clusterName); + await eventListener.AssertNotNull(nameof(fluxConfigurationName),fluxConfigurationName); + } + } + + /// List all Flux Configurations. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. + /// The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. + /// The name of the kubernetes 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.KubernetesConfiguration.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 FluxConfigurationsList(string subscriptionId, string resourceGroupName, string clusterRp, string clusterResourceName, string clusterName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/" + + global::System.Uri.EscapeDataString(clusterRp) + + "/" + + global::System.Uri.EscapeDataString(clusterResourceName) + + "/" + + global::System.Uri.EscapeDataString(clusterName) + + "/providers/Microsoft.KubernetesConfiguration/fluxConfigurations" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.FluxConfigurationsList_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// List all Flux Configurations. + /// + /// 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.KubernetesConfiguration.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 FluxConfigurationsListViaIdentity(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.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-03-01"; + // 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/(?[^/]+)/(?[^/]+)/(?[^/]+)/providers/Microsoft.KubernetesConfiguration/fluxConfigurations$", 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/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/fluxConfigurations'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var clusterRp = _match.Groups["clusterRp"].Value; + var clusterResourceName = _match.Groups["clusterResourceName"].Value; + var clusterName = _match.Groups["clusterName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/" + + clusterRp + + "/" + + clusterResourceName + + "/" + + clusterName + + "/providers/Microsoft.KubernetesConfiguration/fluxConfigurations" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.FluxConfigurationsList_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.KubernetesConfiguration.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 FluxConfigurationsList_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.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.FluxConfigurationsList.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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 Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. + /// The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. + /// The name of the kubernetes 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 FluxConfigurationsList_Validate(string subscriptionId, string resourceGroupName, string clusterRp, string clusterResourceName, string clusterName, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.AssertNotNull(nameof(clusterRp),clusterRp); + await eventListener.AssertNotNull(nameof(clusterResourceName),clusterResourceName); + await eventListener.AssertNotNull(nameof(clusterName),clusterName); + } + } + + /// Update an existing Kubernetes Flux Configuration. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. + /// The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. + /// The name of the kubernetes cluster. + /// Name of the Flux Configuration. + /// Properties to Patch in an existing Flux Configuration. + /// 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.KubernetesConfiguration.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 FluxConfigurationsUpdate(string subscriptionId, string resourceGroupName, string clusterRp, string clusterResourceName, string clusterName, string fluxConfigurationName, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatch body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/" + + global::System.Uri.EscapeDataString(clusterRp) + + "/" + + global::System.Uri.EscapeDataString(clusterResourceName) + + "/" + + global::System.Uri.EscapeDataString(clusterName) + + "/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/" + + global::System.Uri.EscapeDataString(fluxConfigurationName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.FluxConfigurationsUpdate_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Update an existing Kubernetes Flux Configuration. + /// + /// Properties to Patch in an existing Flux Configuration. + /// 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.KubernetesConfiguration.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 FluxConfigurationsUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatch body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + { + var apiVersion = @"2022-03-01"; + // 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/(?[^/]+)/(?[^/]+)/(?[^/]+)/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/(?[^/]+)$", 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/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/{fluxConfigurationName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var clusterRp = _match.Groups["clusterRp"].Value; + var clusterResourceName = _match.Groups["clusterResourceName"].Value; + var clusterName = _match.Groups["clusterName"].Value; + var fluxConfigurationName = _match.Groups["fluxConfigurationName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/" + + clusterRp + + "/" + + clusterResourceName + + "/" + + clusterName + + "/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/" + + fluxConfigurationName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.FluxConfigurationsUpdate_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.KubernetesConfiguration.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 FluxConfigurationsUpdate_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.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: azure-async-operation + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.FluxConfiguration.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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 Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. + /// The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. + /// The name of the kubernetes cluster. + /// Name of the Flux Configuration. + /// Properties to Patch in an existing Flux Configuration. + /// 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 FluxConfigurationsUpdate_Validate(string subscriptionId, string resourceGroupName, string clusterRp, string clusterResourceName, string clusterName, string fluxConfigurationName, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatch body, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.AssertNotNull(nameof(clusterRp),clusterRp); + await eventListener.AssertNotNull(nameof(clusterResourceName),clusterResourceName); + await eventListener.AssertNotNull(nameof(clusterName),clusterName); + await eventListener.AssertNotNull(nameof(fluxConfigurationName),fluxConfigurationName); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// Get Async Operation status + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. + /// The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. /// The name of the kubernetes cluster. /// Name of the Extension. /// operation Id @@ -1347,9 +2831,9 @@ public partial class KubernetesConfiguration /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task OperationStatusGet(string subscriptionId, string resourceGroupName, string clusterRp, string clusterResourceName, string clusterName, string extensionName, string operationId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task OperationStatusGet(string subscriptionId, string resourceGroupName, string clusterRp, string clusterResourceName, string clusterName, string extensionName, string operationId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) { - var apiVersion = @"2021-09-01"; + var apiVersion = @"2022-03-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -1396,15 +2880,15 @@ public partial class KubernetesConfiguration /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task OperationStatusGetViaIdentity(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.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task OperationStatusGetViaIdentity(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.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) { - var apiVersion = @"2021-09-01"; + var apiVersion = @"2022-03-01"; // 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/(?[^/]+)/(?[^/]+)/(?[^/]+)/providers/Microsoft.KubernetesConfiguration/extensions/(?[^/]+)/operations/(?[^/]+)$").Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/(?[^/]+)/(?[^/]+)/(?[^/]+)/providers/Microsoft.KubernetesConfiguration/extensions/(?[^/]+)/operations/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/extensions/{extensionName}/operations/{operationId}'"); @@ -1461,7 +2945,7 @@ public partial class KubernetesConfiguration /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task OperationStatusGet_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.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task OperationStatusGet_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.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -1479,13 +2963,13 @@ public partial class KubernetesConfiguration case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.OperationStatusResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.OperationStatusResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorResponseAutoGenerated.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -1504,12 +2988,10 @@ public partial class KubernetesConfiguration /// Validation method for method. Call this like the actual call, but you will get validation /// events back. /// - /// The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000) + /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or Microsoft.Kubernetes - /// (for OnPrem K8S clusters). - /// The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or - /// connectedClusters (for OnPrem K8S clusters). + /// The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. + /// The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. /// The name of the kubernetes cluster. /// Name of the Extension. /// operation Id @@ -1522,6 +3004,7 @@ public partial class KubernetesConfiguration 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); @@ -1534,12 +3017,10 @@ public partial class KubernetesConfiguration } /// List Async Operations, currently in progress, in a cluster - /// The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000) + /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or Microsoft.Kubernetes - /// (for OnPrem K8S clusters). - /// The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or - /// connectedClusters (for OnPrem K8S clusters). + /// The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. + /// The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. /// The name of the kubernetes 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 @@ -1549,9 +3030,9 @@ public partial class KubernetesConfiguration /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task OperationStatusList(string subscriptionId, string resourceGroupName, string clusterRp, string clusterResourceName, string clusterName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task OperationStatusList(string subscriptionId, string resourceGroupName, string clusterRp, string clusterResourceName, string clusterName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) { - var apiVersion = @"2021-09-01"; + var apiVersion = @"2022-03-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -1595,15 +3076,15 @@ public partial class KubernetesConfiguration /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task OperationStatusListViaIdentity(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.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task OperationStatusListViaIdentity(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.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) { - var apiVersion = @"2021-09-01"; + var apiVersion = @"2022-03-01"; // 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/(?[^/]+)/(?[^/]+)/(?[^/]+)/providers/Microsoft.KubernetesConfiguration/operations$").Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/(?[^/]+)/(?[^/]+)/(?[^/]+)/providers/Microsoft.KubernetesConfiguration/operations$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/operations'"); @@ -1655,7 +3136,7 @@ public partial class KubernetesConfiguration /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task OperationStatusList_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.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task OperationStatusList_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.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -1673,13 +3154,13 @@ public partial class KubernetesConfiguration case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.OperationStatusList.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.OperationStatusList.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorResponseAutoGenerated.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -1698,12 +3179,10 @@ public partial class KubernetesConfiguration /// Validation method for method. Call this like the actual call, but you will get validation /// events back. /// - /// The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000) + /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or Microsoft.Kubernetes - /// (for OnPrem K8S clusters). - /// The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or - /// connectedClusters (for OnPrem K8S clusters). + /// The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. + /// The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. /// The name of the kubernetes cluster. /// an instance that will receive events. /// @@ -1714,6 +3193,7 @@ public partial class KubernetesConfiguration 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); @@ -1734,9 +3214,9 @@ public partial class KubernetesConfiguration /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task OperationsList(global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task OperationsList(global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) { - var apiVersion = @"2021-03-01"; + var apiVersion = @"2022-03-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -1760,155 +3240,6 @@ public partial class KubernetesConfiguration } } - /// - /// List all the available operations the KubernetesConfiguration resource provider supports, in this api-version. - /// - /// 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.KubernetesConfiguration.Runtime.ISendAsync pipeline to use to make the request. - /// - /// A that will be complete when handling of the response is completed. - /// - public async global::System.Threading.Tasks.Task OperationsList1(global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) - { - var apiVersion = @"2021-09-01"; - // Constant Parameters - using( NoSynchronizationContext ) - { - // construct URL - var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/providers/Microsoft.KubernetesConfiguration/operations" - + "?" - + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - - // generate request object - var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Method.Get, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // make the call - await this.OperationsList1_Call(request,onOk,onDefault,eventListener,sender); - } - } - - /// - /// List all the available operations the KubernetesConfiguration resource provider supports, in this api-version. - /// - /// - /// 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.KubernetesConfiguration.Runtime.ISendAsync pipeline to use to make the request. - /// - /// A that will be complete when handling of the response is completed. - /// - public async global::System.Threading.Tasks.Task OperationsList1ViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) - { - var apiVersion = @"2021-09-01"; - // Constant Parameters - using( NoSynchronizationContext ) - { - // verify that Identity format is an exact match for uri - - var _match = new global::System.Text.RegularExpressions.Regex("^/providers/Microsoft.KubernetesConfiguration/operations$").Match(viaIdentity); - if (!_match.Success) - { - throw new global::System.Exception("Invalid identity for URI '/providers/Microsoft.KubernetesConfiguration/operations'"); - } - - // replace URI parameters with values from identity - // construct URL - var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/providers/Microsoft.KubernetesConfiguration/operations" - + "?" - + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - - // generate request object - var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Method.Get, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // make the call - await this.OperationsList1_Call(request,onOk,onDefault,eventListener,sender); - } - } - - /// Actual wire call for method. - /// the prepared HttpRequestMessage to send. - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). - /// an instance that will receive events. - /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync pipeline to use to make the request. - /// - /// A that will be complete when handling of the response is completed. - /// - internal async global::System.Threading.Tasks.Task OperationsList1_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) - { - using( NoSynchronizationContext ) - { - global::System.Net.Http.HttpResponseMessage _response = null; - try - { - var sendTask = sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } - _response = await sendTask; - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.ResourceProviderOperationListAutoGenerated.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - default: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorResponseAutoGenerated.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - } - } - finally - { - // finally statements - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Finally, request, _response); - _response?.Dispose(); - request?.Dispose(); - } - } - } - - /// - /// Validation method for method. Call this like the actual call, but you will get validation - /// events back. - /// - /// an instance that will receive events. - /// - /// A that will be complete when handling of the response is completed. - /// - internal async global::System.Threading.Tasks.Task OperationsList1_Validate(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener) - { - using( NoSynchronizationContext ) - { - - } - } - /// /// List all the available operations the KubernetesConfiguration resource provider supports. /// @@ -1921,15 +3252,15 @@ public partial class KubernetesConfiguration /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task OperationsListViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task OperationsListViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) { - var apiVersion = @"2021-03-01"; + var apiVersion = @"2022-03-01"; // Constant Parameters using( NoSynchronizationContext ) { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/providers/Microsoft.KubernetesConfiguration/operations$").Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/providers/Microsoft.KubernetesConfiguration/operations$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { throw new global::System.Exception("Invalid identity for URI '/providers/Microsoft.KubernetesConfiguration/operations'"); @@ -1966,7 +3297,7 @@ public partial class KubernetesConfiguration /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task OperationsList_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task OperationsList_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -1984,13 +3315,13 @@ public partial class KubernetesConfiguration case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ResourceProviderOperationList.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ResourceProviderOperationList.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -2022,12 +3353,10 @@ public partial class KubernetesConfiguration } /// Create a new Kubernetes Source Control Configuration. - /// The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000) - /// The name of the resource group. - /// The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or Microsoft.Kubernetes - /// (for OnPrem K8S clusters). - /// The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or - /// connectedClusters (for OnPrem K8S clusters). + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. + /// The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. /// The name of the kubernetes cluster. /// Name of the Source Control Configuration. /// Properties necessary to Create KubernetesConfiguration. @@ -2040,9 +3369,9 @@ public partial class KubernetesConfiguration /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task SourceControlConfigurationsCreateOrUpdate(string subscriptionId, string resourceGroupName, string clusterRp, string clusterResourceName, string clusterName, string sourceControlConfigurationName, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfiguration body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task SourceControlConfigurationsCreateOrUpdate(string subscriptionId, string resourceGroupName, string clusterRp, string clusterResourceName, string clusterName, string sourceControlConfigurationName, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfiguration body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) { - var apiVersion = @"2021-03-01"; + var apiVersion = @"2022-03-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -2093,15 +3422,15 @@ public partial class KubernetesConfiguration /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task SourceControlConfigurationsCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfiguration body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task SourceControlConfigurationsCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfiguration body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) { - var apiVersion = @"2021-03-01"; + var apiVersion = @"2022-03-01"; // 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/(?[^/]+)/(?[^/]+)/(?[^/]+)/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/(?[^/]+)$").Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/(?[^/]+)/(?[^/]+)/(?[^/]+)/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/(?[^/]+)$", 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/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/{sourceControlConfigurationName}'"); @@ -2162,7 +3491,7 @@ public partial class KubernetesConfiguration /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task SourceControlConfigurationsCreateOrUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task SourceControlConfigurationsCreateOrUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -2180,19 +3509,19 @@ public partial class KubernetesConfiguration case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.SourceControlConfiguration.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.SourceControlConfiguration.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } case global::System.Net.HttpStatusCode.Created: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onCreated(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.SourceControlConfiguration.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onCreated(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.SourceControlConfiguration.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -2211,12 +3540,10 @@ public partial class KubernetesConfiguration /// Validation method for method. Call this like the actual call, /// but you will get validation events back. /// - /// The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000) - /// The name of the resource group. - /// The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or Microsoft.Kubernetes - /// (for OnPrem K8S clusters). - /// The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or - /// connectedClusters (for OnPrem K8S clusters). + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. + /// The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. /// The name of the kubernetes cluster. /// Name of the Source Control Configuration. /// Properties necessary to Create KubernetesConfiguration. @@ -2224,12 +3551,15 @@ public partial class KubernetesConfiguration /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task SourceControlConfigurationsCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string clusterRp, string clusterResourceName, string clusterName, string sourceControlConfigurationName, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfiguration body, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task SourceControlConfigurationsCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string clusterRp, string clusterResourceName, string clusterName, string sourceControlConfigurationName, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfiguration body, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.AssertNotNull(nameof(clusterRp),clusterRp); await eventListener.AssertNotNull(nameof(clusterResourceName),clusterResourceName); await eventListener.AssertNotNull(nameof(clusterName),clusterName); @@ -2243,12 +3573,10 @@ public partial class KubernetesConfiguration /// This will delete the YAML file used to set up the Source control configuration, thus stopping future sync from the source /// repo. /// - /// The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000) - /// The name of the resource group. - /// The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or Microsoft.Kubernetes - /// (for OnPrem K8S clusters). - /// The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or - /// connectedClusters (for OnPrem K8S clusters). + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. + /// The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. /// The name of the kubernetes cluster. /// Name of the Source Control Configuration. /// a delegate that is called when the remote service returns 200 (OK). @@ -2260,9 +3588,9 @@ public partial class KubernetesConfiguration /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task SourceControlConfigurationsDelete(string subscriptionId, string resourceGroupName, string clusterRp, string clusterResourceName, string clusterName, string sourceControlConfigurationName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task SourceControlConfigurationsDelete(string subscriptionId, string resourceGroupName, string clusterRp, string clusterResourceName, string clusterName, string sourceControlConfigurationName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) { - var apiVersion = @"2021-03-01"; + var apiVersion = @"2022-03-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -2311,15 +3639,15 @@ public partial class KubernetesConfiguration /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task SourceControlConfigurationsDeleteViaIdentity(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.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task SourceControlConfigurationsDeleteViaIdentity(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.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) { - var apiVersion = @"2021-03-01"; + var apiVersion = @"2022-03-01"; // 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/(?[^/]+)/(?[^/]+)/(?[^/]+)/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/(?[^/]+)$").Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/(?[^/]+)/(?[^/]+)/(?[^/]+)/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/(?[^/]+)$", 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/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/{sourceControlConfigurationName}'"); @@ -2374,7 +3702,7 @@ public partial class KubernetesConfiguration /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task SourceControlConfigurationsDelete_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.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task SourceControlConfigurationsDelete_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.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -2503,7 +3831,7 @@ public partial class KubernetesConfiguration default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -2522,12 +3850,10 @@ public partial class KubernetesConfiguration /// Validation method for method. Call this like the actual call, but you /// will get validation events back. /// - /// The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000) - /// The name of the resource group. - /// The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or Microsoft.Kubernetes - /// (for OnPrem K8S clusters). - /// The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or - /// connectedClusters (for OnPrem K8S clusters). + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. + /// The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. /// The name of the kubernetes cluster. /// Name of the Source Control Configuration. /// an instance that will receive events. @@ -2539,7 +3865,10 @@ public partial class KubernetesConfiguration 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.AssertNotNull(nameof(clusterRp),clusterRp); await eventListener.AssertNotNull(nameof(clusterResourceName),clusterResourceName); await eventListener.AssertNotNull(nameof(clusterName),clusterName); @@ -2548,12 +3877,10 @@ public partial class KubernetesConfiguration } /// Gets details of the Source Control Configuration. - /// The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000) - /// The name of the resource group. - /// The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or Microsoft.Kubernetes - /// (for OnPrem K8S clusters). - /// The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or - /// connectedClusters (for OnPrem K8S clusters). + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. + /// The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. /// The name of the kubernetes cluster. /// Name of the Source Control Configuration. /// a delegate that is called when the remote service returns 200 (OK). @@ -2564,9 +3891,9 @@ public partial class KubernetesConfiguration /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task SourceControlConfigurationsGet(string subscriptionId, string resourceGroupName, string clusterRp, string clusterResourceName, string clusterName, string sourceControlConfigurationName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task SourceControlConfigurationsGet(string subscriptionId, string resourceGroupName, string clusterRp, string clusterResourceName, string clusterName, string sourceControlConfigurationName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) { - var apiVersion = @"2021-03-01"; + var apiVersion = @"2022-03-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -2611,15 +3938,15 @@ public partial class KubernetesConfiguration /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task SourceControlConfigurationsGetViaIdentity(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.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task SourceControlConfigurationsGetViaIdentity(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.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) { - var apiVersion = @"2021-03-01"; + var apiVersion = @"2022-03-01"; // 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/(?[^/]+)/(?[^/]+)/(?[^/]+)/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/(?[^/]+)$").Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/(?[^/]+)/(?[^/]+)/(?[^/]+)/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/(?[^/]+)$", 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/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/{sourceControlConfigurationName}'"); @@ -2673,7 +4000,7 @@ public partial class KubernetesConfiguration /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task SourceControlConfigurationsGet_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.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task SourceControlConfigurationsGet_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.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -2691,13 +4018,13 @@ public partial class KubernetesConfiguration case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.SourceControlConfiguration.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.SourceControlConfiguration.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -2716,12 +4043,10 @@ public partial class KubernetesConfiguration /// Validation method for method. Call this like the actual call, but you will /// get validation events back. /// - /// The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000) - /// The name of the resource group. - /// The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or Microsoft.Kubernetes - /// (for OnPrem K8S clusters). - /// The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or - /// connectedClusters (for OnPrem K8S clusters). + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. + /// The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. /// The name of the kubernetes cluster. /// Name of the Source Control Configuration. /// an instance that will receive events. @@ -2733,7 +4058,10 @@ public partial class KubernetesConfiguration 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.AssertNotNull(nameof(clusterRp),clusterRp); await eventListener.AssertNotNull(nameof(clusterResourceName),clusterResourceName); await eventListener.AssertNotNull(nameof(clusterName),clusterName); @@ -2742,12 +4070,10 @@ public partial class KubernetesConfiguration } /// List all Source Control Configurations. - /// The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000) - /// The name of the resource group. - /// The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or Microsoft.Kubernetes - /// (for OnPrem K8S clusters). - /// The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or - /// connectedClusters (for OnPrem K8S clusters). + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. + /// The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. /// The name of the kubernetes 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 @@ -2757,9 +4083,9 @@ public partial class KubernetesConfiguration /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task SourceControlConfigurationsList(string subscriptionId, string resourceGroupName, string clusterRp, string clusterResourceName, string clusterName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task SourceControlConfigurationsList(string subscriptionId, string resourceGroupName, string clusterRp, string clusterResourceName, string clusterName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) { - var apiVersion = @"2021-03-01"; + var apiVersion = @"2022-03-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -2803,15 +4129,15 @@ public partial class KubernetesConfiguration /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task SourceControlConfigurationsListViaIdentity(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.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task SourceControlConfigurationsListViaIdentity(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.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) { - var apiVersion = @"2021-03-01"; + var apiVersion = @"2022-03-01"; // 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/(?[^/]+)/(?[^/]+)/(?[^/]+)/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations$").Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/(?[^/]+)/(?[^/]+)/(?[^/]+)/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations$", 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/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations'"); @@ -2863,7 +4189,7 @@ public partial class KubernetesConfiguration /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task SourceControlConfigurationsList_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.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task SourceControlConfigurationsList_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.KubernetesConfiguration.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -2881,13 +4207,13 @@ public partial class KubernetesConfiguration case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.SourceControlConfigurationList.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.SourceControlConfigurationList.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -2906,12 +4232,10 @@ public partial class KubernetesConfiguration /// Validation method for method. Call this like the actual call, but you will /// get validation events back. /// - /// The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000) - /// The name of the resource group. - /// The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or Microsoft.Kubernetes - /// (for OnPrem K8S clusters). - /// The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or - /// connectedClusters (for OnPrem K8S clusters). + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. + /// The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. /// The name of the kubernetes cluster. /// an instance that will receive events. /// @@ -2922,7 +4246,10 @@ public partial class KubernetesConfiguration 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.AssertNotNull(nameof(clusterRp),clusterRp); await eventListener.AssertNotNull(nameof(clusterResourceName),clusterResourceName); await eventListener.AssertNotNull(nameof(clusterName),clusterName); diff --git a/src/KubernetesConfiguration/generated/api/Models/Any.PowerShell.cs b/src/KubernetesConfiguration/generated/api/Models/Any.PowerShell.cs index 25b46db108d9..576b40cf37aa 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Any.PowerShell.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Any.PowerShell.cs @@ -31,7 +31,8 @@ public partial class Any /// /// 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. + /// 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. @@ -43,7 +44,8 @@ public partial class Any /// /// 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. + /// 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. @@ -124,7 +126,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models. /// 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. + /// an instance of the model class. public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAny FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/src/KubernetesConfiguration/generated/api/Models/Any.TypeConverter.cs b/src/KubernetesConfiguration/generated/api/Models/Any.TypeConverter.cs index 5494401f513c..e14c940a3246 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Any.TypeConverter.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Any.TypeConverter.cs @@ -14,20 +14,19 @@ public partial class AnyTypeConverter : global::System.Management.Automation.PST { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// 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. + /// 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. + /// Determines if the converter can convert the parameter to the type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +74,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// 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 + /// 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 + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,8 +99,7 @@ public static bool CanConvertFrom(dynamic sourceValue) 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 + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// diff --git a/src/KubernetesConfiguration/generated/api/Models/Any.json.cs b/src/KubernetesConfiguration/generated/api/Models/Any.json.cs index 36f03ee8421c..96755aaca5a6 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Any.json.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Any.json.cs @@ -20,7 +20,7 @@ public partial class Any partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class Any /// /// 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. + /// 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. @@ -42,7 +43,8 @@ public partial class Any /// /// 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. + /// 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. diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20/ErrorAdditionalInfo.PowerShell.cs b/src/KubernetesConfiguration/generated/api/Models/Api20/ErrorAdditionalInfo.PowerShell.cs index 1d947606954a..d8eff20a39cc 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Api20/ErrorAdditionalInfo.PowerShell.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Api20/ErrorAdditionalInfo.PowerShell.cs @@ -31,7 +31,8 @@ public partial class ErrorAdditionalInfo /// /// 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. + /// 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. @@ -43,7 +44,8 @@ public partial class ErrorAdditionalInfo /// /// 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. + /// 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. @@ -102,8 +104,14 @@ internal ErrorAdditionalInfo(global::System.Collections.IDictionary content) return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorAdditionalInfoInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorAdditionalInfoInternal)this).Type, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorAdditionalInfoInternal)this).Info = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAny) content.GetValueForProperty("Info",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorAdditionalInfoInternal)this).Info, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.AnyTypeConverter.ConvertFrom); + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorAdditionalInfoInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorAdditionalInfoInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Info")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorAdditionalInfoInternal)this).Info = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAny) content.GetValueForProperty("Info",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorAdditionalInfoInternal)this).Info, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.AnyTypeConverter.ConvertFrom); + } AfterDeserializeDictionary(content); } @@ -121,8 +129,14 @@ internal ErrorAdditionalInfo(global::System.Management.Automation.PSObject conte return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorAdditionalInfoInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorAdditionalInfoInternal)this).Type, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorAdditionalInfoInternal)this).Info = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAny) content.GetValueForProperty("Info",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorAdditionalInfoInternal)this).Info, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.AnyTypeConverter.ConvertFrom); + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorAdditionalInfoInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorAdditionalInfoInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Info")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorAdditionalInfoInternal)this).Info = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IAny) content.GetValueForProperty("Info",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorAdditionalInfoInternal)this).Info, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.AnyTypeConverter.ConvertFrom); + } AfterDeserializePSObject(content); } @@ -130,7 +144,7 @@ internal ErrorAdditionalInfo(global::System.Management.Automation.PSObject conte /// 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. + /// an instance of the model class. public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorAdditionalInfo FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20/ErrorAdditionalInfo.TypeConverter.cs b/src/KubernetesConfiguration/generated/api/Models/Api20/ErrorAdditionalInfo.TypeConverter.cs index 0f75890d74de..828cf2ffabe3 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Api20/ErrorAdditionalInfo.TypeConverter.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Api20/ErrorAdditionalInfo.TypeConverter.cs @@ -14,20 +14,20 @@ public partial class ErrorAdditionalInfoTypeConverter : global::System.Managemen { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// 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. + /// 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. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +75,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// 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 + /// 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 + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,8 +100,7 @@ public static bool CanConvertFrom(dynamic sourceValue) 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 + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20/ErrorAdditionalInfo.json.cs b/src/KubernetesConfiguration/generated/api/Models/Api20/ErrorAdditionalInfo.json.cs index 399747a433d7..442bc9a308f4 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Api20/ErrorAdditionalInfo.json.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Api20/ErrorAdditionalInfo.json.cs @@ -20,7 +20,7 @@ public partial class ErrorAdditionalInfo partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class ErrorAdditionalInfo /// /// 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. + /// 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. @@ -42,7 +43,8 @@ public partial class ErrorAdditionalInfo /// /// 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. + /// 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. diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20/ErrorDetail.PowerShell.cs b/src/KubernetesConfiguration/generated/api/Models/Api20/ErrorDetail.PowerShell.cs index f5c04929da33..1bbb448511ea 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Api20/ErrorDetail.PowerShell.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Api20/ErrorDetail.PowerShell.cs @@ -31,7 +31,8 @@ public partial class ErrorDetail /// /// 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. + /// 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. @@ -43,7 +44,8 @@ public partial class ErrorDetail /// /// 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. + /// 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. @@ -100,11 +102,26 @@ internal ErrorDetail(global::System.Collections.IDictionary content) return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)this).Code, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)this).Message, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)this).Target, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetail[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorDetailTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)this).AdditionalInfo = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorAdditionalInfo[]) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorAdditionalInfoTypeConverter.ConvertFrom)); + if (content.Contains("Code")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)this).Code, global::System.Convert.ToString); + } + if (content.Contains("Message")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)this).Message, global::System.Convert.ToString); + } + if (content.Contains("Target")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)this).Target, global::System.Convert.ToString); + } + if (content.Contains("Detail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetail[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorDetailTypeConverter.ConvertFrom)); + } + if (content.Contains("AdditionalInfo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)this).AdditionalInfo = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorAdditionalInfo[]) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorAdditionalInfoTypeConverter.ConvertFrom)); + } AfterDeserializeDictionary(content); } @@ -122,11 +139,26 @@ internal ErrorDetail(global::System.Management.Automation.PSObject content) return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)this).Code, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)this).Message, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)this).Target, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetail[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorDetailTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)this).AdditionalInfo = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorAdditionalInfo[]) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorAdditionalInfoTypeConverter.ConvertFrom)); + if (content.Contains("Code")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)this).Code, global::System.Convert.ToString); + } + if (content.Contains("Message")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)this).Message, global::System.Convert.ToString); + } + if (content.Contains("Target")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)this).Target, global::System.Convert.ToString); + } + if (content.Contains("Detail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetail[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorDetailTypeConverter.ConvertFrom)); + } + if (content.Contains("AdditionalInfo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)this).AdditionalInfo = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorAdditionalInfo[]) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorAdditionalInfoTypeConverter.ConvertFrom)); + } AfterDeserializePSObject(content); } @@ -134,7 +166,7 @@ internal ErrorDetail(global::System.Management.Automation.PSObject 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. + /// an instance of the model class. public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetail FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20/ErrorDetail.TypeConverter.cs b/src/KubernetesConfiguration/generated/api/Models/Api20/ErrorDetail.TypeConverter.cs index 97765d0347c5..e4d63e5374aa 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Api20/ErrorDetail.TypeConverter.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Api20/ErrorDetail.TypeConverter.cs @@ -14,20 +14,20 @@ public partial class ErrorDetailTypeConverter : global::System.Management.Automa { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// 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. + /// 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. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +75,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// 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 + /// 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 + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,8 +100,7 @@ public static bool CanConvertFrom(dynamic sourceValue) 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 + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20/ErrorDetail.json.cs b/src/KubernetesConfiguration/generated/api/Models/Api20/ErrorDetail.json.cs index ec2e61770678..08716aa0dc4b 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Api20/ErrorDetail.json.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Api20/ErrorDetail.json.cs @@ -20,7 +20,7 @@ public partial class ErrorDetail partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class ErrorDetail /// /// 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. + /// 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. @@ -42,7 +43,8 @@ public partial class ErrorDetail /// /// 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. + /// 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. diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20/ErrorResponse.PowerShell.cs b/src/KubernetesConfiguration/generated/api/Models/Api20/ErrorResponse.PowerShell.cs new file mode 100644 index 000000000000..cb278ae450b8 --- /dev/null +++ b/src/KubernetesConfiguration/generated/api/Models/Api20/ErrorResponse.PowerShell.cs @@ -0,0 +1,208 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20 +{ + using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; + + /// + /// Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows + /// the OData error response format.). + /// + [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); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.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.KubernetesConfiguration.Models.Api20.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 + if (content.Contains("Error")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponseInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetail) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponseInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorDetailTypeConverter.ConvertFrom); + } + if (content.Contains("Code")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponseInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponseInternal)this).Code, global::System.Convert.ToString); + } + if (content.Contains("Message")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponseInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponseInternal)this).Message, global::System.Convert.ToString); + } + if (content.Contains("Target")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponseInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponseInternal)this).Target, global::System.Convert.ToString); + } + if (content.Contains("Detail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponseInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetail[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponseInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorDetailTypeConverter.ConvertFrom)); + } + if (content.Contains("AdditionalInfo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponseInternal)this).AdditionalInfo = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorAdditionalInfo[]) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponseInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorAdditionalInfoTypeConverter.ConvertFrom)); + } + 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 + if (content.Contains("Error")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponseInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetail) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponseInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorDetailTypeConverter.ConvertFrom); + } + if (content.Contains("Code")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponseInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponseInternal)this).Code, global::System.Convert.ToString); + } + if (content.Contains("Message")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponseInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponseInternal)this).Message, global::System.Convert.ToString); + } + if (content.Contains("Target")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponseInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponseInternal)this).Target, global::System.Convert.ToString); + } + if (content.Contains("Detail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponseInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetail[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponseInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorDetailTypeConverter.ConvertFrom)); + } + if (content.Contains("AdditionalInfo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponseInternal)this).AdditionalInfo = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorAdditionalInfo[]) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponseInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorAdditionalInfoTypeConverter.ConvertFrom)); + } + AfterDeserializePSObject(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponse FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows + /// the OData error response format.). + [System.ComponentModel.TypeConverter(typeof(ErrorResponseTypeConverter))] + public partial interface IErrorResponse + + { + + } +} \ No newline at end of file diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20210301/ErrorResponse.TypeConverter.cs b/src/KubernetesConfiguration/generated/api/Models/Api20/ErrorResponse.TypeConverter.cs similarity index 82% rename from src/KubernetesConfiguration/generated/api/Models/Api20210301/ErrorResponse.TypeConverter.cs rename to src/KubernetesConfiguration/generated/api/Models/Api20/ErrorResponse.TypeConverter.cs index 970bd8835d1a..140986e480fc 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Api20210301/ErrorResponse.TypeConverter.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Api20/ErrorResponse.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20 { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; @@ -14,20 +14,20 @@ public partial class ErrorResponseTypeConverter : global::System.Management.Auto { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// 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. + /// 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. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +75,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// 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 + /// 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 + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,21 +100,20 @@ public static bool CanConvertFrom(dynamic sourceValue) 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 + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IErrorResponse ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponse ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IErrorResponse).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponse).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20/ErrorResponseAutoGenerated.cs b/src/KubernetesConfiguration/generated/api/Models/Api20/ErrorResponse.cs similarity index 78% rename from src/KubernetesConfiguration/generated/api/Models/Api20/ErrorResponseAutoGenerated.cs rename to src/KubernetesConfiguration/generated/api/Models/Api20/ErrorResponse.cs index 5e0de2d08e4c..c3dfbf129ffb 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Api20/ErrorResponseAutoGenerated.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Api20/ErrorResponse.cs @@ -11,9 +11,9 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api2 /// Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows /// the OData error response format.). /// - public partial class ErrorResponseAutoGenerated : - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponseAutoGenerated, - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponseAutoGeneratedInternal + public partial class ErrorResponse : + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponse, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponseInternal { /// The error additional info. @@ -40,36 +40,36 @@ public partial class ErrorResponseAutoGenerated : public string Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)Error).Message; } /// Internal Acessors for AdditionalInfo - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorAdditionalInfo[] Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponseAutoGeneratedInternal.AdditionalInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)Error).AdditionalInfo; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)Error).AdditionalInfo = value; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorAdditionalInfo[] Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponseInternal.AdditionalInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)Error).AdditionalInfo; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)Error).AdditionalInfo = value; } /// Internal Acessors for Code - string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponseAutoGeneratedInternal.Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)Error).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)Error).Code = value; } + string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponseInternal.Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)Error).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)Error).Code = value; } /// Internal Acessors for Detail - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetail[] Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponseAutoGeneratedInternal.Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)Error).Detail; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)Error).Detail = value; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetail[] Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponseInternal.Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)Error).Detail; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)Error).Detail = value; } /// Internal Acessors for Error - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetail Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponseAutoGeneratedInternal.Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorDetail()); set { {_error = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetail Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponseInternal.Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorDetail()); set { {_error = value;} } } /// Internal Acessors for Message - string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponseAutoGeneratedInternal.Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)Error).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)Error).Message = value; } + string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponseInternal.Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)Error).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)Error).Message = value; } /// Internal Acessors for Target - string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponseAutoGeneratedInternal.Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)Error).Target; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)Error).Target = value; } + string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponseInternal.Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)Error).Target; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)Error).Target = value; } /// The error target. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] public string Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)Error).Target; } - /// Creates an new instance. - public ErrorResponseAutoGenerated() + /// Creates an new instance. + public ErrorResponse() { } } /// Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows /// the OData error response format.). - public partial interface IErrorResponseAutoGenerated : + public partial interface IErrorResponse : Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IJsonSerializable { /// The error additional info. @@ -116,7 +116,7 @@ public partial interface IErrorResponseAutoGenerated : } /// Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows /// the OData error response format.). - internal partial interface IErrorResponseAutoGeneratedInternal + internal partial interface IErrorResponseInternal { /// The error additional info. diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20210301/ErrorResponse.json.cs b/src/KubernetesConfiguration/generated/api/Models/Api20/ErrorResponse.json.cs similarity index 84% rename from src/KubernetesConfiguration/generated/api/Models/Api20210301/ErrorResponse.json.cs rename to src/KubernetesConfiguration/generated/api/Models/Api20/ErrorResponse.json.cs index 431a8562e8c4..acf494e9fc72 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Api20210301/ErrorResponse.json.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Api20/ErrorResponse.json.cs @@ -3,11 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20 { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; - /// Error response. + /// + /// Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows + /// the OData error response format.). + /// public partial class ErrorResponse { @@ -20,7 +23,7 @@ public partial class ErrorResponse partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +33,8 @@ public partial class ErrorResponse /// /// 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. + /// 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. @@ -42,7 +46,8 @@ public partial class ErrorResponse /// /// 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. + /// 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. @@ -63,18 +68,18 @@ internal ErrorResponse(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguratio { return; } - {_error = If( json?.PropertyT("error"), out var __jsonError) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ErrorDefinition.FromJson(__jsonError) : Error;} + {_error = If( json?.PropertyT("error"), out var __jsonError) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorDetail.FromJson(__jsonError) : Error;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IErrorResponse. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponse. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IErrorResponse. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponse. /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IErrorResponse FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponse FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json ? new ErrorResponse(json) : null; } @@ -98,10 +103,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.J { return container; } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeReadOnly)) - { - AddIf( null != this._error ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) this._error.ToJson(null,serializationMode) : null, "error" ,container.Add ); - } + AddIf( null != this._error ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) this._error.ToJson(null,serializationMode) : null, "error" ,container.Add ); AfterToJson(ref container); return container; } diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20/ErrorResponseAutoGenerated.PowerShell.cs b/src/KubernetesConfiguration/generated/api/Models/Api20/ErrorResponseAutoGenerated.PowerShell.cs deleted file mode 100644 index 3ef0795c670a..000000000000 --- a/src/KubernetesConfiguration/generated/api/Models/Api20/ErrorResponseAutoGenerated.PowerShell.cs +++ /dev/null @@ -1,172 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20 -{ - using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; - - /// - /// Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows - /// the OData error response format.). - /// - [System.ComponentModel.TypeConverter(typeof(ErrorResponseAutoGeneratedTypeConverter))] - public partial class ErrorResponseAutoGenerated - { - - /// - /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the - /// object before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Collections.IDictionary content that should be used. - - partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); - - /// - /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Management.Automation.PSObject content that should be used. - - partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); - - /// - /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Collections.IDictionary content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); - - /// - /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); - - /// - /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior - /// - /// /// instance serialized to a string, normally it is a Json - /// /// set returnNow to true if you provide a customized OverrideToString function - - partial void OverrideToString(ref string stringResult, ref bool returnNow); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponseAutoGenerated DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new ErrorResponseAutoGenerated(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.KubernetesConfiguration.Models.Api20.IErrorResponseAutoGenerated DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new ErrorResponseAutoGenerated(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal ErrorResponseAutoGenerated(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponseAutoGeneratedInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetail) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponseAutoGeneratedInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorDetailTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponseAutoGeneratedInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponseAutoGeneratedInternal)this).Code, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponseAutoGeneratedInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponseAutoGeneratedInternal)this).Message, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponseAutoGeneratedInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponseAutoGeneratedInternal)this).Target, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponseAutoGeneratedInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetail[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponseAutoGeneratedInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorDetailTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponseAutoGeneratedInternal)this).AdditionalInfo = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorAdditionalInfo[]) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponseAutoGeneratedInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorAdditionalInfoTypeConverter.ConvertFrom)); - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal ErrorResponseAutoGenerated(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponseAutoGeneratedInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetail) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponseAutoGeneratedInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorDetailTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponseAutoGeneratedInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponseAutoGeneratedInternal)this).Code, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponseAutoGeneratedInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponseAutoGeneratedInternal)this).Message, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponseAutoGeneratedInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponseAutoGeneratedInternal)this).Target, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponseAutoGeneratedInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetail[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponseAutoGeneratedInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorDetailTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponseAutoGeneratedInternal)this).AdditionalInfo = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorAdditionalInfo[]) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponseAutoGeneratedInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorAdditionalInfoTypeConverter.ConvertFrom)); - AfterDeserializePSObject(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponseAutoGenerated FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.SerializationMode.IncludeAll)?.ToString(); - - public override string ToString() - { - var returnNow = false; - var result = global::System.String.Empty; - OverrideToString(ref result, ref returnNow); - if (returnNow) - { - return result; - } - return ToJsonString(); - } - } - /// Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows - /// the OData error response format.). - [System.ComponentModel.TypeConverter(typeof(ErrorResponseAutoGeneratedTypeConverter))] - public partial interface IErrorResponseAutoGenerated - - { - - } -} \ No newline at end of file diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20/Identity.PowerShell.cs b/src/KubernetesConfiguration/generated/api/Models/Api20/Identity.PowerShell.cs index 8c0fbdbaf71a..57059bfca876 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Api20/Identity.PowerShell.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Api20/Identity.PowerShell.cs @@ -31,7 +31,8 @@ public partial class Identity /// /// 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. + /// 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. @@ -43,7 +44,8 @@ public partial class Identity /// /// 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. + /// 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. @@ -90,7 +92,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models. /// 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. + /// an instance of the model class. public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IIdentity FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); /// @@ -107,9 +109,18 @@ internal Identity(global::System.Collections.IDictionary content) return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IIdentityInternal)this).PrincipalId = (string) content.GetValueForProperty("PrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IIdentityInternal)this).PrincipalId, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IIdentityInternal)this).TenantId = (string) content.GetValueForProperty("TenantId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IIdentityInternal)this).TenantId, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IIdentityInternal)this).Type = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ResourceIdentityType?) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IIdentityInternal)this).Type, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ResourceIdentityType.CreateFrom); + if (content.Contains("PrincipalId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IIdentityInternal)this).PrincipalId = (string) content.GetValueForProperty("PrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IIdentityInternal)this).PrincipalId, global::System.Convert.ToString); + } + if (content.Contains("TenantId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IIdentityInternal)this).TenantId = (string) content.GetValueForProperty("TenantId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IIdentityInternal)this).TenantId, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IIdentityInternal)this).Type = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ResourceIdentityType?) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IIdentityInternal)this).Type, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ResourceIdentityType.CreateFrom); + } AfterDeserializeDictionary(content); } @@ -127,9 +138,18 @@ internal Identity(global::System.Management.Automation.PSObject content) return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IIdentityInternal)this).PrincipalId = (string) content.GetValueForProperty("PrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IIdentityInternal)this).PrincipalId, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IIdentityInternal)this).TenantId = (string) content.GetValueForProperty("TenantId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IIdentityInternal)this).TenantId, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IIdentityInternal)this).Type = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ResourceIdentityType?) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IIdentityInternal)this).Type, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ResourceIdentityType.CreateFrom); + if (content.Contains("PrincipalId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IIdentityInternal)this).PrincipalId = (string) content.GetValueForProperty("PrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IIdentityInternal)this).PrincipalId, global::System.Convert.ToString); + } + if (content.Contains("TenantId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IIdentityInternal)this).TenantId = (string) content.GetValueForProperty("TenantId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IIdentityInternal)this).TenantId, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IIdentityInternal)this).Type = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ResourceIdentityType?) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IIdentityInternal)this).Type, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ResourceIdentityType.CreateFrom); + } AfterDeserializePSObject(content); } diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20/Identity.TypeConverter.cs b/src/KubernetesConfiguration/generated/api/Models/Api20/Identity.TypeConverter.cs index 5fe8e7e18c24..1cfbd7eb0a2e 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Api20/Identity.TypeConverter.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Api20/Identity.TypeConverter.cs @@ -14,20 +14,19 @@ public partial class IdentityTypeConverter : global::System.Management.Automatio { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// 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. + /// 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. + /// Determines if the converter can convert the parameter to the type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +74,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// 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 + /// 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 + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,8 +99,7 @@ public static bool CanConvertFrom(dynamic sourceValue) 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 + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20/Identity.json.cs b/src/KubernetesConfiguration/generated/api/Models/Api20/Identity.json.cs index fb46c635c34a..cf168390b4f5 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Api20/Identity.json.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Api20/Identity.json.cs @@ -20,7 +20,7 @@ public partial class Identity partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class Identity /// /// 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. + /// 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. @@ -42,7 +43,8 @@ public partial class Identity /// /// 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. + /// 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. diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20/ProxyResource.PowerShell.cs b/src/KubernetesConfiguration/generated/api/Models/Api20/ProxyResource.PowerShell.cs index ef7c8002a2b4..f41d6a9f2c5a 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Api20/ProxyResource.PowerShell.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Api20/ProxyResource.PowerShell.cs @@ -33,7 +33,8 @@ public partial class ProxyResource /// /// 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. + /// 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. @@ -45,7 +46,8 @@ public partial class ProxyResource /// /// 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. + /// 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. @@ -92,7 +94,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models. /// 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. + /// an instance of the model class. public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IProxyResource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); /// @@ -109,9 +111,18 @@ internal ProxyResource(global::System.Collections.IDictionary content) return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Id, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Name, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Type, global::System.Convert.ToString); + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Type, global::System.Convert.ToString); + } AfterDeserializeDictionary(content); } @@ -129,9 +140,18 @@ internal ProxyResource(global::System.Management.Automation.PSObject content) return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Id, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Name, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Type, global::System.Convert.ToString); + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Type, global::System.Convert.ToString); + } AfterDeserializePSObject(content); } diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20/ProxyResource.TypeConverter.cs b/src/KubernetesConfiguration/generated/api/Models/Api20/ProxyResource.TypeConverter.cs index 5a7abf8f731f..9ba39d29fe9e 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Api20/ProxyResource.TypeConverter.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Api20/ProxyResource.TypeConverter.cs @@ -14,20 +14,20 @@ public partial class ProxyResourceTypeConverter : global::System.Management.Auto { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// 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. + /// 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. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +75,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// 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 + /// 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 + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,8 +100,7 @@ public static bool CanConvertFrom(dynamic sourceValue) 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 + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20/ProxyResource.cs b/src/KubernetesConfiguration/generated/api/Models/Api20/ProxyResource.cs index c75b1b6ac8b7..8fbc8bc455d5 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Api20/ProxyResource.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Api20/ProxyResource.cs @@ -56,7 +56,7 @@ public ProxyResource() /// an instance that will receive validation /// events. /// - /// A < see cref = "global::System.Threading.Tasks.Task" /> that will be complete when validation is completed. + /// A that will be complete when validation is completed. /// public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener) { diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20/ProxyResource.json.cs b/src/KubernetesConfiguration/generated/api/Models/Api20/ProxyResource.json.cs index 9d7693e735af..e9704cb7cbef 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Api20/ProxyResource.json.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Api20/ProxyResource.json.cs @@ -22,7 +22,7 @@ public partial class ProxyResource partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -32,7 +32,8 @@ public partial class ProxyResource /// /// 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. + /// 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. @@ -44,7 +45,8 @@ public partial class ProxyResource /// /// 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. + /// 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. diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20/Resource.PowerShell.cs b/src/KubernetesConfiguration/generated/api/Models/Api20/Resource.PowerShell.cs index 48c81a806982..43226a57e0e4 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Api20/Resource.PowerShell.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Api20/Resource.PowerShell.cs @@ -33,7 +33,8 @@ public partial class Resource /// /// 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. + /// 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. @@ -45,7 +46,8 @@ public partial class Resource /// /// 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. + /// 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. @@ -92,7 +94,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models. /// 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. + /// an instance of the model class. public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); /// @@ -109,9 +111,18 @@ internal Resource(global::System.Collections.IDictionary content) return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Id, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Name, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Type, global::System.Convert.ToString); + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Type, global::System.Convert.ToString); + } AfterDeserializeDictionary(content); } @@ -129,9 +140,18 @@ internal Resource(global::System.Management.Automation.PSObject content) return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Id, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Name, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Type, global::System.Convert.ToString); + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Type, global::System.Convert.ToString); + } AfterDeserializePSObject(content); } diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20/Resource.TypeConverter.cs b/src/KubernetesConfiguration/generated/api/Models/Api20/Resource.TypeConverter.cs index 0e555d0046ed..a13a6d6f5e3a 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Api20/Resource.TypeConverter.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Api20/Resource.TypeConverter.cs @@ -14,20 +14,19 @@ public partial class ResourceTypeConverter : global::System.Management.Automatio { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// 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. + /// 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. + /// Determines if the converter can convert the parameter to the type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +74,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// 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 + /// 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 + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,8 +99,7 @@ public static bool CanConvertFrom(dynamic sourceValue) 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 + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20/Resource.json.cs b/src/KubernetesConfiguration/generated/api/Models/Api20/Resource.json.cs index 683de371ad31..d41d76d50144 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Api20/Resource.json.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Api20/Resource.json.cs @@ -22,7 +22,7 @@ public partial class Resource partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -32,7 +32,8 @@ public partial class Resource /// /// 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. + /// 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. @@ -44,7 +45,8 @@ public partial class Resource /// /// 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. + /// 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. diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20/SystemData.PowerShell.cs b/src/KubernetesConfiguration/generated/api/Models/Api20/SystemData.PowerShell.cs index ca1630ab6734..6ed9cc2dd781 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Api20/SystemData.PowerShell.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Api20/SystemData.PowerShell.cs @@ -31,7 +31,8 @@ public partial class SystemData /// /// 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. + /// 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. @@ -43,7 +44,8 @@ public partial class SystemData /// /// 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. + /// 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. @@ -90,7 +92,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models. /// 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. + /// an instance of the model class. public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemData FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); /// @@ -107,12 +109,30 @@ internal SystemData(global::System.Collections.IDictionary content) return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemDataInternal)this).CreatedBy = (string) content.GetValueForProperty("CreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemDataInternal)this).CreatedBy, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemDataInternal)this).CreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.CreatedByType?) content.GetValueForProperty("CreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemDataInternal)this).CreatedByType, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.CreatedByType.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemDataInternal)this).CreatedAt = (global::System.DateTime?) content.GetValueForProperty("CreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemDataInternal)this).CreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemDataInternal)this).LastModifiedBy = (string) content.GetValueForProperty("LastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemDataInternal)this).LastModifiedBy, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemDataInternal)this).LastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.CreatedByType?) content.GetValueForProperty("LastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemDataInternal)this).LastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.CreatedByType.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemDataInternal)this).LastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("LastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemDataInternal)this).LastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + if (content.Contains("CreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemDataInternal)this).CreatedBy = (string) content.GetValueForProperty("CreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemDataInternal)this).CreatedBy, global::System.Convert.ToString); + } + if (content.Contains("CreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemDataInternal)this).CreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.CreatedByType?) content.GetValueForProperty("CreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemDataInternal)this).CreatedByType, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.CreatedByType.CreateFrom); + } + if (content.Contains("CreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemDataInternal)this).CreatedAt = (global::System.DateTime?) content.GetValueForProperty("CreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemDataInternal)this).CreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("LastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemDataInternal)this).LastModifiedBy = (string) content.GetValueForProperty("LastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemDataInternal)this).LastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("LastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemDataInternal)this).LastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.CreatedByType?) content.GetValueForProperty("LastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemDataInternal)this).LastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.CreatedByType.CreateFrom); + } + if (content.Contains("LastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemDataInternal)this).LastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("LastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemDataInternal)this).LastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } AfterDeserializeDictionary(content); } @@ -130,12 +150,30 @@ internal SystemData(global::System.Management.Automation.PSObject content) return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemDataInternal)this).CreatedBy = (string) content.GetValueForProperty("CreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemDataInternal)this).CreatedBy, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemDataInternal)this).CreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.CreatedByType?) content.GetValueForProperty("CreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemDataInternal)this).CreatedByType, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.CreatedByType.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemDataInternal)this).CreatedAt = (global::System.DateTime?) content.GetValueForProperty("CreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemDataInternal)this).CreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemDataInternal)this).LastModifiedBy = (string) content.GetValueForProperty("LastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemDataInternal)this).LastModifiedBy, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemDataInternal)this).LastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.CreatedByType?) content.GetValueForProperty("LastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemDataInternal)this).LastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.CreatedByType.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemDataInternal)this).LastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("LastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemDataInternal)this).LastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + if (content.Contains("CreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemDataInternal)this).CreatedBy = (string) content.GetValueForProperty("CreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemDataInternal)this).CreatedBy, global::System.Convert.ToString); + } + if (content.Contains("CreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemDataInternal)this).CreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.CreatedByType?) content.GetValueForProperty("CreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemDataInternal)this).CreatedByType, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.CreatedByType.CreateFrom); + } + if (content.Contains("CreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemDataInternal)this).CreatedAt = (global::System.DateTime?) content.GetValueForProperty("CreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemDataInternal)this).CreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("LastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemDataInternal)this).LastModifiedBy = (string) content.GetValueForProperty("LastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemDataInternal)this).LastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("LastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemDataInternal)this).LastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.CreatedByType?) content.GetValueForProperty("LastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemDataInternal)this).LastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.CreatedByType.CreateFrom); + } + if (content.Contains("LastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemDataInternal)this).LastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("LastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemDataInternal)this).LastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } AfterDeserializePSObject(content); } diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20/SystemData.TypeConverter.cs b/src/KubernetesConfiguration/generated/api/Models/Api20/SystemData.TypeConverter.cs index c94dc3d23838..10e52523c986 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Api20/SystemData.TypeConverter.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Api20/SystemData.TypeConverter.cs @@ -14,20 +14,19 @@ public partial class SystemDataTypeConverter : global::System.Management.Automat { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// 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. + /// 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. + /// Determines if the converter can convert the parameter to the type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +74,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// 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 + /// 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 + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,8 +99,7 @@ public static bool CanConvertFrom(dynamic sourceValue) 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 + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20/SystemData.json.cs b/src/KubernetesConfiguration/generated/api/Models/Api20/SystemData.json.cs index d4836f7b9d65..de0957bc8da1 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Api20/SystemData.json.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Api20/SystemData.json.cs @@ -20,7 +20,7 @@ public partial class SystemData partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class SystemData /// /// 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. + /// 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. @@ -42,7 +43,8 @@ public partial class SystemData /// /// 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. + /// 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. diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20210301/ErrorDefinition.cs b/src/KubernetesConfiguration/generated/api/Models/Api20210301/ErrorDefinition.cs deleted file mode 100644 index 69d73ba8dd6e..000000000000 --- a/src/KubernetesConfiguration/generated/api/Models/Api20210301/ErrorDefinition.cs +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301 -{ - using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; - - /// Error definition. - public partial class ErrorDefinition : - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IErrorDefinition, - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IErrorDefinitionInternal - { - - /// Backing field for property. - private string _code; - - /// - /// Service specific error code which serves as the substatus for the HTTP error code. - /// - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] - public string Code { get => this._code; set => this._code = value; } - - /// Backing field for property. - private string _message; - - /// Description of the error. - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] - public string Message { get => this._message; set => this._message = value; } - - /// Creates an new instance. - public ErrorDefinition() - { - - } - } - /// Error definition. - public partial interface IErrorDefinition : - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IJsonSerializable - { - /// - /// Service specific error code which serves as the substatus for the HTTP error code. - /// - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"Service specific error code which serves as the substatus for the HTTP error code.", - SerializedName = @"code", - PossibleTypes = new [] { typeof(string) })] - string Code { get; set; } - /// Description of the error. - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"Description of the error.", - SerializedName = @"message", - PossibleTypes = new [] { typeof(string) })] - string Message { get; set; } - - } - /// Error definition. - internal partial interface IErrorDefinitionInternal - - { - /// - /// Service specific error code which serves as the substatus for the HTTP error code. - /// - string Code { get; set; } - /// Description of the error. - string Message { get; set; } - - } -} \ No newline at end of file diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20210301/ErrorResponse.cs b/src/KubernetesConfiguration/generated/api/Models/Api20210301/ErrorResponse.cs deleted file mode 100644 index 414454d0d0ad..000000000000 --- a/src/KubernetesConfiguration/generated/api/Models/Api20210301/ErrorResponse.cs +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301 -{ - using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; - - /// Error response. - public partial class ErrorResponse : - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IErrorResponse, - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IErrorResponseInternal - { - - /// - /// Service specific error code which serves as the substatus for the HTTP error code. - /// - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IErrorDefinitionInternal)Error).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IErrorDefinitionInternal)Error).Code = value ?? null; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IErrorDefinition _error; - - /// Error definition. - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IErrorDefinition Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ErrorDefinition()); } - - /// Description of the error. - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IErrorDefinitionInternal)Error).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IErrorDefinitionInternal)Error).Message = value ?? null; } - - /// Internal Acessors for Error - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IErrorDefinition Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IErrorResponseInternal.Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ErrorDefinition()); set { {_error = value;} } } - - /// Creates an new instance. - public ErrorResponse() - { - - } - } - /// Error response. - public partial interface IErrorResponse : - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IJsonSerializable - { - /// - /// Service specific error code which serves as the substatus for the HTTP error code. - /// - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Service specific error code which serves as the substatus for the HTTP error code.", - SerializedName = @"code", - PossibleTypes = new [] { typeof(string) })] - string Code { get; set; } - /// Description of the error. - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Description of the error.", - SerializedName = @"message", - PossibleTypes = new [] { typeof(string) })] - string Message { get; set; } - - } - /// Error response. - internal partial interface IErrorResponseInternal - - { - /// - /// Service specific error code which serves as the substatus for the HTTP error code. - /// - string Code { get; set; } - /// Error definition. - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IErrorDefinition Error { get; set; } - /// Description of the error. - string Message { get; set; } - - } -} \ No newline at end of file diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20210301/ResourceProviderOperation.PowerShell.cs b/src/KubernetesConfiguration/generated/api/Models/Api20210301/ResourceProviderOperation.PowerShell.cs deleted file mode 100644 index 01c0f2123ee4..000000000000 --- a/src/KubernetesConfiguration/generated/api/Models/Api20210301/ResourceProviderOperation.PowerShell.cs +++ /dev/null @@ -1,170 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301 -{ - using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; - - /// Supported operation of this resource provider. - [System.ComponentModel.TypeConverter(typeof(ResourceProviderOperationTypeConverter))] - public partial class ResourceProviderOperation - { - - /// - /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the - /// object before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Collections.IDictionary content that should be used. - - partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); - - /// - /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Management.Automation.PSObject content that should be used. - - partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); - - /// - /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Collections.IDictionary content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); - - /// - /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); - - /// - /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior - /// - /// /// instance serialized to a string, normally it is a Json - /// /// set returnNow to true if you provide a customized OverrideToString function - - partial void OverrideToString(ref string stringResult, ref bool returnNow); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IResourceProviderOperation DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new ResourceProviderOperation(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.KubernetesConfiguration.Models.Api20210301.IResourceProviderOperation DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new ResourceProviderOperation(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.KubernetesConfiguration.Models.Api20210301.IResourceProviderOperation FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal ResourceProviderOperation(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IResourceProviderOperationInternal)this).Display = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IResourceProviderOperationDisplay) content.GetValueForProperty("Display",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IResourceProviderOperationInternal)this).Display, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ResourceProviderOperationDisplayTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IResourceProviderOperationInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IResourceProviderOperationInternal)this).Name, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IResourceProviderOperationInternal)this).IsDataAction = (bool?) content.GetValueForProperty("IsDataAction",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IResourceProviderOperationInternal)this).IsDataAction, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IResourceProviderOperationInternal)this).DisplayProvider = (string) content.GetValueForProperty("DisplayProvider",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IResourceProviderOperationInternal)this).DisplayProvider, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IResourceProviderOperationInternal)this).DisplayResource = (string) content.GetValueForProperty("DisplayResource",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IResourceProviderOperationInternal)this).DisplayResource, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IResourceProviderOperationInternal)this).DisplayOperation = (string) content.GetValueForProperty("DisplayOperation",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IResourceProviderOperationInternal)this).DisplayOperation, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IResourceProviderOperationInternal)this).DisplayDescription = (string) content.GetValueForProperty("DisplayDescription",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IResourceProviderOperationInternal)this).DisplayDescription, 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 ResourceProviderOperation(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IResourceProviderOperationInternal)this).Display = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IResourceProviderOperationDisplay) content.GetValueForProperty("Display",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IResourceProviderOperationInternal)this).Display, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ResourceProviderOperationDisplayTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IResourceProviderOperationInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IResourceProviderOperationInternal)this).Name, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IResourceProviderOperationInternal)this).IsDataAction = (bool?) content.GetValueForProperty("IsDataAction",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IResourceProviderOperationInternal)this).IsDataAction, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IResourceProviderOperationInternal)this).DisplayProvider = (string) content.GetValueForProperty("DisplayProvider",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IResourceProviderOperationInternal)this).DisplayProvider, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IResourceProviderOperationInternal)this).DisplayResource = (string) content.GetValueForProperty("DisplayResource",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IResourceProviderOperationInternal)this).DisplayResource, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IResourceProviderOperationInternal)this).DisplayOperation = (string) content.GetValueForProperty("DisplayOperation",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IResourceProviderOperationInternal)this).DisplayOperation, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IResourceProviderOperationInternal)this).DisplayDescription = (string) content.GetValueForProperty("DisplayDescription",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IResourceProviderOperationInternal)this).DisplayDescription, 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.KubernetesConfiguration.Runtime.SerializationMode.IncludeAll)?.ToString(); - - public override string ToString() - { - var returnNow = false; - var result = global::System.String.Empty; - OverrideToString(ref result, ref returnNow); - if (returnNow) - { - return result; - } - return ToJsonString(); - } - } - /// Supported operation of this resource provider. - [System.ComponentModel.TypeConverter(typeof(ResourceProviderOperationTypeConverter))] - public partial interface IResourceProviderOperation - - { - - } -} \ No newline at end of file diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20210301/Result.cs b/src/KubernetesConfiguration/generated/api/Models/Api20210301/Result.cs deleted file mode 100644 index c4c11d0378ef..000000000000 --- a/src/KubernetesConfiguration/generated/api/Models/Api20210301/Result.cs +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301 -{ - using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; - - /// Sample result definition - public partial class Result : - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IResult, - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IResultInternal - { - - /// Backing field for property. - private string _sampleProperty; - - /// Sample property of type string - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] - public string SampleProperty { get => this._sampleProperty; set => this._sampleProperty = value; } - - /// Creates an new instance. - public Result() - { - - } - } - /// Sample result definition - public partial interface IResult : - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IJsonSerializable - { - /// Sample property of type string - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Sample property of type string", - SerializedName = @"sampleProperty", - PossibleTypes = new [] { typeof(string) })] - string SampleProperty { get; set; } - - } - /// Sample result definition - internal partial interface IResultInternal - - { - /// Sample property of type string - string SampleProperty { get; set; } - - } -} \ No newline at end of file diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20210301/SourceControlConfiguration.PowerShell.cs b/src/KubernetesConfiguration/generated/api/Models/Api20210301/SourceControlConfiguration.PowerShell.cs deleted file mode 100644 index 0046c21fb7b1..000000000000 --- a/src/KubernetesConfiguration/generated/api/Models/Api20210301/SourceControlConfiguration.PowerShell.cs +++ /dev/null @@ -1,216 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301 -{ - using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; - - /// The SourceControl Configuration object returned in Get & Put response. - [System.ComponentModel.TypeConverter(typeof(SourceControlConfigurationTypeConverter))] - public partial class SourceControlConfiguration - { - - /// - /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the - /// object before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Collections.IDictionary content that should be used. - - partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); - - /// - /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Management.Automation.PSObject content that should be used. - - partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); - - /// - /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Collections.IDictionary content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); - - /// - /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); - - /// - /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior - /// - /// /// instance serialized to a string, normally it is a Json - /// /// set returnNow to true if you provide a customized OverrideToString function - - partial void OverrideToString(ref string stringResult, ref bool returnNow); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfiguration DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new SourceControlConfiguration(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.KubernetesConfiguration.Models.Api20210301.ISourceControlConfiguration DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new SourceControlConfiguration(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.KubernetesConfiguration.Models.Api20210301.ISourceControlConfiguration FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal SourceControlConfiguration(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.SourceControlConfigurationPropertiesTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.SystemDataTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Id, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Name, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Type, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationInternal)this).ComplianceStatus = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IComplianceStatus) content.GetValueForProperty("ComplianceStatus",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationInternal)this).ComplianceStatus, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ComplianceStatusTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationInternal)this).OperatorType = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.OperatorType?) content.GetValueForProperty("OperatorType",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationInternal)this).OperatorType, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.OperatorType.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationInternal)this).HelmOperatorProperty = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IHelmOperatorProperties) content.GetValueForProperty("HelmOperatorProperty",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationInternal)this).HelmOperatorProperty, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.HelmOperatorPropertiesTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationInternal)this).RepositoryUrl = (string) content.GetValueForProperty("RepositoryUrl",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationInternal)this).RepositoryUrl, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationInternal)this).OperatorNamespace = (string) content.GetValueForProperty("OperatorNamespace",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationInternal)this).OperatorNamespace, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationInternal)this).OperatorInstanceName = (string) content.GetValueForProperty("OperatorInstanceName",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationInternal)this).OperatorInstanceName, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationInternal)this).OperatorParam = (string) content.GetValueForProperty("OperatorParam",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationInternal)this).OperatorParam, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationInternal)this).ConfigurationProtectedSetting = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IConfigurationProtectedSettings) content.GetValueForProperty("ConfigurationProtectedSetting",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationInternal)this).ConfigurationProtectedSetting, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ConfigurationProtectedSettingsTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationInternal)this).OperatorScope = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.OperatorScopeType?) content.GetValueForProperty("OperatorScope",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationInternal)this).OperatorScope, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.OperatorScopeType.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationInternal)this).RepositoryPublicKey = (string) content.GetValueForProperty("RepositoryPublicKey",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationInternal)this).RepositoryPublicKey, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationInternal)this).SshKnownHostsContent = (string) content.GetValueForProperty("SshKnownHostsContent",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationInternal)this).SshKnownHostsContent, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationInternal)this).EnableHelmOperator = (bool?) content.GetValueForProperty("EnableHelmOperator",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationInternal)this).EnableHelmOperator, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningStateType?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningStateType.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationInternal)this).HelmOperatorPropertyChartVersion = (string) content.GetValueForProperty("HelmOperatorPropertyChartVersion",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationInternal)this).HelmOperatorPropertyChartVersion, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationInternal)this).HelmOperatorPropertyChartValue = (string) content.GetValueForProperty("HelmOperatorPropertyChartValue",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationInternal)this).HelmOperatorPropertyChartValue, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationInternal)this).ComplianceStatusMessage = (string) content.GetValueForProperty("ComplianceStatusMessage",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationInternal)this).ComplianceStatusMessage, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.CreatedByType.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.CreatedByType.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationInternal)this).ComplianceStatusComplianceState = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ComplianceStateType?) content.GetValueForProperty("ComplianceStatusComplianceState",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationInternal)this).ComplianceStatusComplianceState, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ComplianceStateType.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationInternal)this).ComplianceStatusLastConfigApplied = (global::System.DateTime?) content.GetValueForProperty("ComplianceStatusLastConfigApplied",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationInternal)this).ComplianceStatusLastConfigApplied, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationInternal)this).ComplianceStatusMessageLevel = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.MessageLevelType?) content.GetValueForProperty("ComplianceStatusMessageLevel",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationInternal)this).ComplianceStatusMessageLevel, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.MessageLevelType.CreateFrom); - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal SourceControlConfiguration(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.SourceControlConfigurationPropertiesTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.SystemDataTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Id, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Name, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Type, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationInternal)this).ComplianceStatus = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IComplianceStatus) content.GetValueForProperty("ComplianceStatus",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationInternal)this).ComplianceStatus, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ComplianceStatusTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationInternal)this).OperatorType = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.OperatorType?) content.GetValueForProperty("OperatorType",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationInternal)this).OperatorType, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.OperatorType.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationInternal)this).HelmOperatorProperty = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IHelmOperatorProperties) content.GetValueForProperty("HelmOperatorProperty",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationInternal)this).HelmOperatorProperty, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.HelmOperatorPropertiesTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationInternal)this).RepositoryUrl = (string) content.GetValueForProperty("RepositoryUrl",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationInternal)this).RepositoryUrl, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationInternal)this).OperatorNamespace = (string) content.GetValueForProperty("OperatorNamespace",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationInternal)this).OperatorNamespace, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationInternal)this).OperatorInstanceName = (string) content.GetValueForProperty("OperatorInstanceName",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationInternal)this).OperatorInstanceName, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationInternal)this).OperatorParam = (string) content.GetValueForProperty("OperatorParam",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationInternal)this).OperatorParam, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationInternal)this).ConfigurationProtectedSetting = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IConfigurationProtectedSettings) content.GetValueForProperty("ConfigurationProtectedSetting",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationInternal)this).ConfigurationProtectedSetting, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ConfigurationProtectedSettingsTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationInternal)this).OperatorScope = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.OperatorScopeType?) content.GetValueForProperty("OperatorScope",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationInternal)this).OperatorScope, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.OperatorScopeType.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationInternal)this).RepositoryPublicKey = (string) content.GetValueForProperty("RepositoryPublicKey",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationInternal)this).RepositoryPublicKey, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationInternal)this).SshKnownHostsContent = (string) content.GetValueForProperty("SshKnownHostsContent",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationInternal)this).SshKnownHostsContent, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationInternal)this).EnableHelmOperator = (bool?) content.GetValueForProperty("EnableHelmOperator",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationInternal)this).EnableHelmOperator, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningStateType?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningStateType.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationInternal)this).HelmOperatorPropertyChartVersion = (string) content.GetValueForProperty("HelmOperatorPropertyChartVersion",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationInternal)this).HelmOperatorPropertyChartVersion, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationInternal)this).HelmOperatorPropertyChartValue = (string) content.GetValueForProperty("HelmOperatorPropertyChartValue",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationInternal)this).HelmOperatorPropertyChartValue, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationInternal)this).ComplianceStatusMessage = (string) content.GetValueForProperty("ComplianceStatusMessage",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationInternal)this).ComplianceStatusMessage, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.CreatedByType.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.CreatedByType.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationInternal)this).ComplianceStatusComplianceState = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ComplianceStateType?) content.GetValueForProperty("ComplianceStatusComplianceState",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationInternal)this).ComplianceStatusComplianceState, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ComplianceStateType.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationInternal)this).ComplianceStatusLastConfigApplied = (global::System.DateTime?) content.GetValueForProperty("ComplianceStatusLastConfigApplied",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationInternal)this).ComplianceStatusLastConfigApplied, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationInternal)this).ComplianceStatusMessageLevel = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.MessageLevelType?) content.GetValueForProperty("ComplianceStatusMessageLevel",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationInternal)this).ComplianceStatusMessageLevel, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.MessageLevelType.CreateFrom); - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeAll)?.ToString(); - - public override string ToString() - { - var returnNow = false; - var result = global::System.String.Empty; - OverrideToString(ref result, ref returnNow); - if (returnNow) - { - return result; - } - return ToJsonString(); - } - } - /// The SourceControl Configuration object returned in Get & Put response. - [System.ComponentModel.TypeConverter(typeof(SourceControlConfigurationTypeConverter))] - public partial interface ISourceControlConfiguration - - { - - } -} \ No newline at end of file diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20210301/SourceControlConfigurationProperties.PowerShell.cs b/src/KubernetesConfiguration/generated/api/Models/Api20210301/SourceControlConfigurationProperties.PowerShell.cs deleted file mode 100644 index 13032f1621e7..000000000000 --- a/src/KubernetesConfiguration/generated/api/Models/Api20210301/SourceControlConfigurationProperties.PowerShell.cs +++ /dev/null @@ -1,194 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301 -{ - using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; - - /// Properties to create a Source Control Configuration resource - [System.ComponentModel.TypeConverter(typeof(SourceControlConfigurationPropertiesTypeConverter))] - public partial class SourceControlConfigurationProperties - { - - /// - /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the - /// object before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Collections.IDictionary content that should be used. - - partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); - - /// - /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Management.Automation.PSObject content that should be used. - - partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); - - /// - /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Collections.IDictionary content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); - - /// - /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); - - /// - /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior - /// - /// /// instance serialized to a string, normally it is a Json - /// /// set returnNow to true if you provide a customized OverrideToString function - - partial void OverrideToString(ref string stringResult, ref bool returnNow); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new SourceControlConfigurationProperties(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.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new SourceControlConfigurationProperties(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.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal SourceControlConfigurationProperties(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationPropertiesInternal)this).HelmOperatorProperty = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IHelmOperatorProperties) content.GetValueForProperty("HelmOperatorProperty",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationPropertiesInternal)this).HelmOperatorProperty, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.HelmOperatorPropertiesTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationPropertiesInternal)this).ComplianceStatus = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IComplianceStatus) content.GetValueForProperty("ComplianceStatus",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationPropertiesInternal)this).ComplianceStatus, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ComplianceStatusTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationPropertiesInternal)this).RepositoryUrl = (string) content.GetValueForProperty("RepositoryUrl",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationPropertiesInternal)this).RepositoryUrl, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationPropertiesInternal)this).OperatorNamespace = (string) content.GetValueForProperty("OperatorNamespace",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationPropertiesInternal)this).OperatorNamespace, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationPropertiesInternal)this).OperatorInstanceName = (string) content.GetValueForProperty("OperatorInstanceName",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationPropertiesInternal)this).OperatorInstanceName, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationPropertiesInternal)this).OperatorType = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.OperatorType?) content.GetValueForProperty("OperatorType",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationPropertiesInternal)this).OperatorType, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.OperatorType.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationPropertiesInternal)this).OperatorParam = (string) content.GetValueForProperty("OperatorParam",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationPropertiesInternal)this).OperatorParam, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationPropertiesInternal)this).ConfigurationProtectedSetting = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IConfigurationProtectedSettings) content.GetValueForProperty("ConfigurationProtectedSetting",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationPropertiesInternal)this).ConfigurationProtectedSetting, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ConfigurationProtectedSettingsTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationPropertiesInternal)this).OperatorScope = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.OperatorScopeType?) content.GetValueForProperty("OperatorScope",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationPropertiesInternal)this).OperatorScope, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.OperatorScopeType.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationPropertiesInternal)this).RepositoryPublicKey = (string) content.GetValueForProperty("RepositoryPublicKey",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationPropertiesInternal)this).RepositoryPublicKey, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationPropertiesInternal)this).SshKnownHostsContent = (string) content.GetValueForProperty("SshKnownHostsContent",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationPropertiesInternal)this).SshKnownHostsContent, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationPropertiesInternal)this).EnableHelmOperator = (bool?) content.GetValueForProperty("EnableHelmOperator",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationPropertiesInternal)this).EnableHelmOperator, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationPropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningStateType?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationPropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningStateType.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationPropertiesInternal)this).HelmOperatorPropertyChartVersion = (string) content.GetValueForProperty("HelmOperatorPropertyChartVersion",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationPropertiesInternal)this).HelmOperatorPropertyChartVersion, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationPropertiesInternal)this).HelmOperatorPropertyChartValue = (string) content.GetValueForProperty("HelmOperatorPropertyChartValue",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationPropertiesInternal)this).HelmOperatorPropertyChartValue, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationPropertiesInternal)this).ComplianceStatusMessage = (string) content.GetValueForProperty("ComplianceStatusMessage",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationPropertiesInternal)this).ComplianceStatusMessage, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationPropertiesInternal)this).ComplianceStatusComplianceState = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ComplianceStateType?) content.GetValueForProperty("ComplianceStatusComplianceState",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationPropertiesInternal)this).ComplianceStatusComplianceState, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ComplianceStateType.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationPropertiesInternal)this).ComplianceStatusLastConfigApplied = (global::System.DateTime?) content.GetValueForProperty("ComplianceStatusLastConfigApplied",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationPropertiesInternal)this).ComplianceStatusLastConfigApplied, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationPropertiesInternal)this).ComplianceStatusMessageLevel = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.MessageLevelType?) content.GetValueForProperty("ComplianceStatusMessageLevel",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationPropertiesInternal)this).ComplianceStatusMessageLevel, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.MessageLevelType.CreateFrom); - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal SourceControlConfigurationProperties(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationPropertiesInternal)this).HelmOperatorProperty = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IHelmOperatorProperties) content.GetValueForProperty("HelmOperatorProperty",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationPropertiesInternal)this).HelmOperatorProperty, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.HelmOperatorPropertiesTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationPropertiesInternal)this).ComplianceStatus = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IComplianceStatus) content.GetValueForProperty("ComplianceStatus",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationPropertiesInternal)this).ComplianceStatus, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ComplianceStatusTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationPropertiesInternal)this).RepositoryUrl = (string) content.GetValueForProperty("RepositoryUrl",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationPropertiesInternal)this).RepositoryUrl, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationPropertiesInternal)this).OperatorNamespace = (string) content.GetValueForProperty("OperatorNamespace",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationPropertiesInternal)this).OperatorNamespace, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationPropertiesInternal)this).OperatorInstanceName = (string) content.GetValueForProperty("OperatorInstanceName",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationPropertiesInternal)this).OperatorInstanceName, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationPropertiesInternal)this).OperatorType = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.OperatorType?) content.GetValueForProperty("OperatorType",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationPropertiesInternal)this).OperatorType, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.OperatorType.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationPropertiesInternal)this).OperatorParam = (string) content.GetValueForProperty("OperatorParam",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationPropertiesInternal)this).OperatorParam, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationPropertiesInternal)this).ConfigurationProtectedSetting = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IConfigurationProtectedSettings) content.GetValueForProperty("ConfigurationProtectedSetting",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationPropertiesInternal)this).ConfigurationProtectedSetting, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ConfigurationProtectedSettingsTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationPropertiesInternal)this).OperatorScope = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.OperatorScopeType?) content.GetValueForProperty("OperatorScope",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationPropertiesInternal)this).OperatorScope, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.OperatorScopeType.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationPropertiesInternal)this).RepositoryPublicKey = (string) content.GetValueForProperty("RepositoryPublicKey",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationPropertiesInternal)this).RepositoryPublicKey, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationPropertiesInternal)this).SshKnownHostsContent = (string) content.GetValueForProperty("SshKnownHostsContent",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationPropertiesInternal)this).SshKnownHostsContent, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationPropertiesInternal)this).EnableHelmOperator = (bool?) content.GetValueForProperty("EnableHelmOperator",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationPropertiesInternal)this).EnableHelmOperator, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationPropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningStateType?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationPropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningStateType.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationPropertiesInternal)this).HelmOperatorPropertyChartVersion = (string) content.GetValueForProperty("HelmOperatorPropertyChartVersion",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationPropertiesInternal)this).HelmOperatorPropertyChartVersion, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationPropertiesInternal)this).HelmOperatorPropertyChartValue = (string) content.GetValueForProperty("HelmOperatorPropertyChartValue",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationPropertiesInternal)this).HelmOperatorPropertyChartValue, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationPropertiesInternal)this).ComplianceStatusMessage = (string) content.GetValueForProperty("ComplianceStatusMessage",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationPropertiesInternal)this).ComplianceStatusMessage, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationPropertiesInternal)this).ComplianceStatusComplianceState = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ComplianceStateType?) content.GetValueForProperty("ComplianceStatusComplianceState",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationPropertiesInternal)this).ComplianceStatusComplianceState, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ComplianceStateType.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationPropertiesInternal)this).ComplianceStatusLastConfigApplied = (global::System.DateTime?) content.GetValueForProperty("ComplianceStatusLastConfigApplied",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationPropertiesInternal)this).ComplianceStatusLastConfigApplied, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationPropertiesInternal)this).ComplianceStatusMessageLevel = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.MessageLevelType?) content.GetValueForProperty("ComplianceStatusMessageLevel",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationPropertiesInternal)this).ComplianceStatusMessageLevel, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.MessageLevelType.CreateFrom); - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeAll)?.ToString(); - - public override string ToString() - { - var returnNow = false; - var result = global::System.String.Empty; - OverrideToString(ref result, ref returnNow); - if (returnNow) - { - return result; - } - return ToJsonString(); - } - } - /// Properties to create a Source Control Configuration resource - [System.ComponentModel.TypeConverter(typeof(SourceControlConfigurationPropertiesTypeConverter))] - public partial interface ISourceControlConfigurationProperties - - { - - } -} \ No newline at end of file diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20210901/Extension.PowerShell.cs b/src/KubernetesConfiguration/generated/api/Models/Api20210901/Extension.PowerShell.cs deleted file mode 100644 index 100087bb03ad..000000000000 --- a/src/KubernetesConfiguration/generated/api/Models/Api20210901/Extension.PowerShell.cs +++ /dev/null @@ -1,234 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901 -{ - using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; - - /// The Extension object. - [System.ComponentModel.TypeConverter(typeof(ExtensionTypeConverter))] - public partial class Extension - { - - /// - /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the - /// object before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Collections.IDictionary content that should be used. - - partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); - - /// - /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Management.Automation.PSObject content that should be used. - - partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); - - /// - /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Collections.IDictionary content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); - - /// - /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); - - /// - /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior - /// - /// /// instance serialized to a string, normally it is a Json - /// /// set returnNow to true if you provide a customized OverrideToString function - - partial void OverrideToString(ref string stringResult, ref bool returnNow); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtension DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new Extension(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.KubernetesConfiguration.Models.Api20210901.IExtension DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new Extension(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal Extension(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.ExtensionPropertiesTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).Identity = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IIdentity) content.GetValueForProperty("Identity",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).Identity, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IdentityTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.SystemDataTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Id, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Name, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Type, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).Scope = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IScope) content.GetValueForProperty("Scope",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).Scope, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.ScopeTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningState.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).IdentityPrincipalId = (string) content.GetValueForProperty("IdentityPrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).IdentityPrincipalId, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).IdentityTenantId = (string) content.GetValueForProperty("IdentityTenantId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).IdentityTenantId, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).ErrorInfo = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetail) content.GetValueForProperty("ErrorInfo",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).ErrorInfo, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorDetailTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).AksAssignedIdentity = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesAksAssignedIdentity) content.GetValueForProperty("AksAssignedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).AksAssignedIdentity, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.ExtensionPropertiesAksAssignedIdentityTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).ExtensionType = (string) content.GetValueForProperty("ExtensionType",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).ExtensionType, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).AutoUpgradeMinorVersion = (bool?) content.GetValueForProperty("AutoUpgradeMinorVersion",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).AutoUpgradeMinorVersion, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).ReleaseTrain = (string) content.GetValueForProperty("ReleaseTrain",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).ReleaseTrain, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).Version = (string) content.GetValueForProperty("Version",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).Version, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).ConfigurationSetting = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesConfigurationSettings) content.GetValueForProperty("ConfigurationSetting",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).ConfigurationSetting, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.ExtensionPropertiesConfigurationSettingsTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).ConfigurationProtectedSetting = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesConfigurationProtectedSettings) content.GetValueForProperty("ConfigurationProtectedSetting",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).ConfigurationProtectedSetting, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.ExtensionPropertiesConfigurationProtectedSettingsTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).Statuses = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionStatus[]) content.GetValueForProperty("Statuses",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).Statuses, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.ExtensionStatusTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).CustomLocationSetting = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesCustomLocationSettings) content.GetValueForProperty("CustomLocationSetting",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).CustomLocationSetting, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.ExtensionPropertiesCustomLocationSettingsTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).PackageUri = (string) content.GetValueForProperty("PackageUri",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).PackageUri, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).ScopeCluster = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IScopeCluster) content.GetValueForProperty("ScopeCluster",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).ScopeCluster, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.ScopeClusterTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).ScopeNamespace = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IScopeNamespace) content.GetValueForProperty("ScopeNamespace",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).ScopeNamespace, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.ScopeNamespaceTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).IdentityType = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ResourceIdentityType?) content.GetValueForProperty("IdentityType",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).IdentityType, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ResourceIdentityType.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.CreatedByType.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.CreatedByType.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).ClusterReleaseNamespace = (string) content.GetValueForProperty("ClusterReleaseNamespace",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).ClusterReleaseNamespace, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).NamespaceTargetNamespace = (string) content.GetValueForProperty("NamespaceTargetNamespace",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).NamespaceTargetNamespace, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).ErrorInfoCode = (string) content.GetValueForProperty("ErrorInfoCode",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).ErrorInfoCode, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).ErrorInfoMessage = (string) content.GetValueForProperty("ErrorInfoMessage",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).ErrorInfoMessage, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).ErrorInfoTarget = (string) content.GetValueForProperty("ErrorInfoTarget",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).ErrorInfoTarget, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).ErrorInfoDetail = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetail[]) content.GetValueForProperty("ErrorInfoDetail",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).ErrorInfoDetail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorDetailTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).ErrorInfoAdditionalInfo = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorAdditionalInfo[]) content.GetValueForProperty("ErrorInfoAdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).ErrorInfoAdditionalInfo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorAdditionalInfoTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).AkAssignedIdentityPrincipalId = (string) content.GetValueForProperty("AkAssignedIdentityPrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).AkAssignedIdentityPrincipalId, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).AkAssignedIdentityTenantId = (string) content.GetValueForProperty("AkAssignedIdentityTenantId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).AkAssignedIdentityTenantId, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).AkAssignedIdentityType = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ResourceIdentityType?) content.GetValueForProperty("AkAssignedIdentityType",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).AkAssignedIdentityType, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ResourceIdentityType.CreateFrom); - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal Extension(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.ExtensionPropertiesTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).Identity = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IIdentity) content.GetValueForProperty("Identity",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).Identity, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IdentityTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.SystemDataTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Id, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Name, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Type, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).Scope = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IScope) content.GetValueForProperty("Scope",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).Scope, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.ScopeTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningState.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).IdentityPrincipalId = (string) content.GetValueForProperty("IdentityPrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).IdentityPrincipalId, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).IdentityTenantId = (string) content.GetValueForProperty("IdentityTenantId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).IdentityTenantId, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).ErrorInfo = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetail) content.GetValueForProperty("ErrorInfo",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).ErrorInfo, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorDetailTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).AksAssignedIdentity = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesAksAssignedIdentity) content.GetValueForProperty("AksAssignedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).AksAssignedIdentity, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.ExtensionPropertiesAksAssignedIdentityTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).ExtensionType = (string) content.GetValueForProperty("ExtensionType",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).ExtensionType, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).AutoUpgradeMinorVersion = (bool?) content.GetValueForProperty("AutoUpgradeMinorVersion",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).AutoUpgradeMinorVersion, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).ReleaseTrain = (string) content.GetValueForProperty("ReleaseTrain",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).ReleaseTrain, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).Version = (string) content.GetValueForProperty("Version",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).Version, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).ConfigurationSetting = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesConfigurationSettings) content.GetValueForProperty("ConfigurationSetting",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).ConfigurationSetting, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.ExtensionPropertiesConfigurationSettingsTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).ConfigurationProtectedSetting = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesConfigurationProtectedSettings) content.GetValueForProperty("ConfigurationProtectedSetting",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).ConfigurationProtectedSetting, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.ExtensionPropertiesConfigurationProtectedSettingsTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).Statuses = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionStatus[]) content.GetValueForProperty("Statuses",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).Statuses, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.ExtensionStatusTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).CustomLocationSetting = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesCustomLocationSettings) content.GetValueForProperty("CustomLocationSetting",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).CustomLocationSetting, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.ExtensionPropertiesCustomLocationSettingsTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).PackageUri = (string) content.GetValueForProperty("PackageUri",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).PackageUri, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).ScopeCluster = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IScopeCluster) content.GetValueForProperty("ScopeCluster",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).ScopeCluster, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.ScopeClusterTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).ScopeNamespace = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IScopeNamespace) content.GetValueForProperty("ScopeNamespace",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).ScopeNamespace, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.ScopeNamespaceTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).IdentityType = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ResourceIdentityType?) content.GetValueForProperty("IdentityType",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).IdentityType, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ResourceIdentityType.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.CreatedByType.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.CreatedByType.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).ClusterReleaseNamespace = (string) content.GetValueForProperty("ClusterReleaseNamespace",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).ClusterReleaseNamespace, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).NamespaceTargetNamespace = (string) content.GetValueForProperty("NamespaceTargetNamespace",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).NamespaceTargetNamespace, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).ErrorInfoCode = (string) content.GetValueForProperty("ErrorInfoCode",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).ErrorInfoCode, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).ErrorInfoMessage = (string) content.GetValueForProperty("ErrorInfoMessage",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).ErrorInfoMessage, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).ErrorInfoTarget = (string) content.GetValueForProperty("ErrorInfoTarget",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).ErrorInfoTarget, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).ErrorInfoDetail = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetail[]) content.GetValueForProperty("ErrorInfoDetail",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).ErrorInfoDetail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorDetailTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).ErrorInfoAdditionalInfo = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorAdditionalInfo[]) content.GetValueForProperty("ErrorInfoAdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).ErrorInfoAdditionalInfo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorAdditionalInfoTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).AkAssignedIdentityPrincipalId = (string) content.GetValueForProperty("AkAssignedIdentityPrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).AkAssignedIdentityPrincipalId, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).AkAssignedIdentityTenantId = (string) content.GetValueForProperty("AkAssignedIdentityTenantId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).AkAssignedIdentityTenantId, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).AkAssignedIdentityType = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ResourceIdentityType?) content.GetValueForProperty("AkAssignedIdentityType",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal)this).AkAssignedIdentityType, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ResourceIdentityType.CreateFrom); - 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.KubernetesConfiguration.Models.Api20210901.IExtension FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.SerializationMode.IncludeAll)?.ToString(); - - public override string ToString() - { - var returnNow = false; - var result = global::System.String.Empty; - OverrideToString(ref result, ref returnNow); - if (returnNow) - { - return result; - } - return ToJsonString(); - } - } - /// The Extension object. - [System.ComponentModel.TypeConverter(typeof(ExtensionTypeConverter))] - public partial interface IExtension - - { - - } -} \ No newline at end of file diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20210901/ExtensionProperties.PowerShell.cs b/src/KubernetesConfiguration/generated/api/Models/Api20210901/ExtensionProperties.PowerShell.cs deleted file mode 100644 index e6066cabfda6..000000000000 --- a/src/KubernetesConfiguration/generated/api/Models/Api20210901/ExtensionProperties.PowerShell.cs +++ /dev/null @@ -1,206 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901 -{ - using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; - - /// Properties of an Extension resource - [System.ComponentModel.TypeConverter(typeof(ExtensionPropertiesTypeConverter))] - public partial class ExtensionProperties - { - - /// - /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the - /// object before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Collections.IDictionary content that should be used. - - partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); - - /// - /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Management.Automation.PSObject content that should be used. - - partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); - - /// - /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Collections.IDictionary content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); - - /// - /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); - - /// - /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior - /// - /// /// instance serialized to a string, normally it is a Json - /// /// set returnNow to true if you provide a customized OverrideToString function - - partial void OverrideToString(ref string stringResult, ref bool returnNow); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new ExtensionProperties(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.KubernetesConfiguration.Models.Api20210901.IExtensionProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new ExtensionProperties(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal ExtensionProperties(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)this).Scope = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IScope) content.GetValueForProperty("Scope",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)this).Scope, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.ScopeTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)this).ErrorInfo = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetail) content.GetValueForProperty("ErrorInfo",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)this).ErrorInfo, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorDetailTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)this).AksAssignedIdentity = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesAksAssignedIdentity) content.GetValueForProperty("AksAssignedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)this).AksAssignedIdentity, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.ExtensionPropertiesAksAssignedIdentityTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)this).ExtensionType = (string) content.GetValueForProperty("ExtensionType",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)this).ExtensionType, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)this).AutoUpgradeMinorVersion = (bool?) content.GetValueForProperty("AutoUpgradeMinorVersion",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)this).AutoUpgradeMinorVersion, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)this).ReleaseTrain = (string) content.GetValueForProperty("ReleaseTrain",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)this).ReleaseTrain, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)this).Version = (string) content.GetValueForProperty("Version",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)this).Version, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)this).ConfigurationSetting = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesConfigurationSettings) content.GetValueForProperty("ConfigurationSetting",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)this).ConfigurationSetting, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.ExtensionPropertiesConfigurationSettingsTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)this).ConfigurationProtectedSetting = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesConfigurationProtectedSettings) content.GetValueForProperty("ConfigurationProtectedSetting",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)this).ConfigurationProtectedSetting, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.ExtensionPropertiesConfigurationProtectedSettingsTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningState.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)this).Statuses = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionStatus[]) content.GetValueForProperty("Statuses",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)this).Statuses, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.ExtensionStatusTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)this).CustomLocationSetting = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesCustomLocationSettings) content.GetValueForProperty("CustomLocationSetting",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)this).CustomLocationSetting, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.ExtensionPropertiesCustomLocationSettingsTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)this).PackageUri = (string) content.GetValueForProperty("PackageUri",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)this).PackageUri, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)this).ScopeCluster = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IScopeCluster) content.GetValueForProperty("ScopeCluster",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)this).ScopeCluster, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.ScopeClusterTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)this).ScopeNamespace = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IScopeNamespace) content.GetValueForProperty("ScopeNamespace",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)this).ScopeNamespace, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.ScopeNamespaceTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)this).ClusterReleaseNamespace = (string) content.GetValueForProperty("ClusterReleaseNamespace",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)this).ClusterReleaseNamespace, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)this).NamespaceTargetNamespace = (string) content.GetValueForProperty("NamespaceTargetNamespace",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)this).NamespaceTargetNamespace, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)this).ErrorInfoCode = (string) content.GetValueForProperty("ErrorInfoCode",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)this).ErrorInfoCode, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)this).ErrorInfoMessage = (string) content.GetValueForProperty("ErrorInfoMessage",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)this).ErrorInfoMessage, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)this).ErrorInfoTarget = (string) content.GetValueForProperty("ErrorInfoTarget",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)this).ErrorInfoTarget, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)this).ErrorInfoDetail = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetail[]) content.GetValueForProperty("ErrorInfoDetail",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)this).ErrorInfoDetail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorDetailTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)this).ErrorInfoAdditionalInfo = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorAdditionalInfo[]) content.GetValueForProperty("ErrorInfoAdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)this).ErrorInfoAdditionalInfo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorAdditionalInfoTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)this).AkAssignedIdentityPrincipalId = (string) content.GetValueForProperty("AkAssignedIdentityPrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)this).AkAssignedIdentityPrincipalId, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)this).AkAssignedIdentityTenantId = (string) content.GetValueForProperty("AkAssignedIdentityTenantId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)this).AkAssignedIdentityTenantId, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)this).AkAssignedIdentityType = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ResourceIdentityType?) content.GetValueForProperty("AkAssignedIdentityType",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)this).AkAssignedIdentityType, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ResourceIdentityType.CreateFrom); - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal ExtensionProperties(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)this).Scope = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IScope) content.GetValueForProperty("Scope",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)this).Scope, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.ScopeTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)this).ErrorInfo = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetail) content.GetValueForProperty("ErrorInfo",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)this).ErrorInfo, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorDetailTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)this).AksAssignedIdentity = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesAksAssignedIdentity) content.GetValueForProperty("AksAssignedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)this).AksAssignedIdentity, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.ExtensionPropertiesAksAssignedIdentityTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)this).ExtensionType = (string) content.GetValueForProperty("ExtensionType",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)this).ExtensionType, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)this).AutoUpgradeMinorVersion = (bool?) content.GetValueForProperty("AutoUpgradeMinorVersion",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)this).AutoUpgradeMinorVersion, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)this).ReleaseTrain = (string) content.GetValueForProperty("ReleaseTrain",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)this).ReleaseTrain, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)this).Version = (string) content.GetValueForProperty("Version",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)this).Version, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)this).ConfigurationSetting = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesConfigurationSettings) content.GetValueForProperty("ConfigurationSetting",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)this).ConfigurationSetting, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.ExtensionPropertiesConfigurationSettingsTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)this).ConfigurationProtectedSetting = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesConfigurationProtectedSettings) content.GetValueForProperty("ConfigurationProtectedSetting",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)this).ConfigurationProtectedSetting, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.ExtensionPropertiesConfigurationProtectedSettingsTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningState.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)this).Statuses = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionStatus[]) content.GetValueForProperty("Statuses",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)this).Statuses, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.ExtensionStatusTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)this).CustomLocationSetting = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesCustomLocationSettings) content.GetValueForProperty("CustomLocationSetting",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)this).CustomLocationSetting, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.ExtensionPropertiesCustomLocationSettingsTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)this).PackageUri = (string) content.GetValueForProperty("PackageUri",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)this).PackageUri, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)this).ScopeCluster = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IScopeCluster) content.GetValueForProperty("ScopeCluster",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)this).ScopeCluster, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.ScopeClusterTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)this).ScopeNamespace = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IScopeNamespace) content.GetValueForProperty("ScopeNamespace",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)this).ScopeNamespace, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.ScopeNamespaceTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)this).ClusterReleaseNamespace = (string) content.GetValueForProperty("ClusterReleaseNamespace",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)this).ClusterReleaseNamespace, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)this).NamespaceTargetNamespace = (string) content.GetValueForProperty("NamespaceTargetNamespace",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)this).NamespaceTargetNamespace, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)this).ErrorInfoCode = (string) content.GetValueForProperty("ErrorInfoCode",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)this).ErrorInfoCode, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)this).ErrorInfoMessage = (string) content.GetValueForProperty("ErrorInfoMessage",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)this).ErrorInfoMessage, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)this).ErrorInfoTarget = (string) content.GetValueForProperty("ErrorInfoTarget",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)this).ErrorInfoTarget, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)this).ErrorInfoDetail = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetail[]) content.GetValueForProperty("ErrorInfoDetail",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)this).ErrorInfoDetail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorDetailTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)this).ErrorInfoAdditionalInfo = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorAdditionalInfo[]) content.GetValueForProperty("ErrorInfoAdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)this).ErrorInfoAdditionalInfo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorAdditionalInfoTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)this).AkAssignedIdentityPrincipalId = (string) content.GetValueForProperty("AkAssignedIdentityPrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)this).AkAssignedIdentityPrincipalId, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)this).AkAssignedIdentityTenantId = (string) content.GetValueForProperty("AkAssignedIdentityTenantId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)this).AkAssignedIdentityTenantId, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)this).AkAssignedIdentityType = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ResourceIdentityType?) content.GetValueForProperty("AkAssignedIdentityType",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)this).AkAssignedIdentityType, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ResourceIdentityType.CreateFrom); - 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.KubernetesConfiguration.Models.Api20210901.IExtensionProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.SerializationMode.IncludeAll)?.ToString(); - - public override string ToString() - { - var returnNow = false; - var result = global::System.String.Empty; - OverrideToString(ref result, ref returnNow); - if (returnNow) - { - return result; - } - return ToJsonString(); - } - } - /// Properties of an Extension resource - [System.ComponentModel.TypeConverter(typeof(ExtensionPropertiesTypeConverter))] - public partial interface IExtensionProperties - - { - - } -} \ No newline at end of file diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20210901/OperationStatusResult.PowerShell.cs b/src/KubernetesConfiguration/generated/api/Models/Api20210901/OperationStatusResult.PowerShell.cs deleted file mode 100644 index 9eb676b43c12..000000000000 --- a/src/KubernetesConfiguration/generated/api/Models/Api20210901/OperationStatusResult.PowerShell.cs +++ /dev/null @@ -1,176 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901 -{ - using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; - - /// The current status of an async operation. - [System.ComponentModel.TypeConverter(typeof(OperationStatusResultTypeConverter))] - public partial class OperationStatusResult - { - - /// - /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the - /// object before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Collections.IDictionary content that should be used. - - partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); - - /// - /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Management.Automation.PSObject content that should be used. - - partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); - - /// - /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Collections.IDictionary content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); - - /// - /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); - - /// - /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior - /// - /// /// instance serialized to a string, normally it is a Json - /// /// set returnNow to true if you provide a customized OverrideToString function - - partial void OverrideToString(ref string stringResult, ref bool returnNow); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IOperationStatusResult DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new OperationStatusResult(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.KubernetesConfiguration.Models.Api20210901.IOperationStatusResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new OperationStatusResult(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.KubernetesConfiguration.Models.Api20210901.IOperationStatusResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal OperationStatusResult(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IOperationStatusResultInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetail) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IOperationStatusResultInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorDetailTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IOperationStatusResultInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IOperationStatusResultInternal)this).Id, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IOperationStatusResultInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IOperationStatusResultInternal)this).Name, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IOperationStatusResultInternal)this).Status = (string) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IOperationStatusResultInternal)this).Status, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IOperationStatusResultInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IOperationStatusResultProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IOperationStatusResultInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.OperationStatusResultPropertiesTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IOperationStatusResultInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IOperationStatusResultInternal)this).Code, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IOperationStatusResultInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IOperationStatusResultInternal)this).Message, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IOperationStatusResultInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IOperationStatusResultInternal)this).Target, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IOperationStatusResultInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetail[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IOperationStatusResultInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorDetailTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IOperationStatusResultInternal)this).AdditionalInfo = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorAdditionalInfo[]) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IOperationStatusResultInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorAdditionalInfoTypeConverter.ConvertFrom)); - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal OperationStatusResult(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IOperationStatusResultInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetail) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IOperationStatusResultInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorDetailTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IOperationStatusResultInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IOperationStatusResultInternal)this).Id, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IOperationStatusResultInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IOperationStatusResultInternal)this).Name, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IOperationStatusResultInternal)this).Status = (string) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IOperationStatusResultInternal)this).Status, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IOperationStatusResultInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IOperationStatusResultProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IOperationStatusResultInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.OperationStatusResultPropertiesTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IOperationStatusResultInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IOperationStatusResultInternal)this).Code, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IOperationStatusResultInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IOperationStatusResultInternal)this).Message, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IOperationStatusResultInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IOperationStatusResultInternal)this).Target, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IOperationStatusResultInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetail[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IOperationStatusResultInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorDetailTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IOperationStatusResultInternal)this).AdditionalInfo = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorAdditionalInfo[]) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IOperationStatusResultInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorAdditionalInfoTypeConverter.ConvertFrom)); - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeAll)?.ToString(); - - public override string ToString() - { - var returnNow = false; - var result = global::System.String.Empty; - OverrideToString(ref result, ref returnNow); - if (returnNow) - { - return result; - } - return ToJsonString(); - } - } - /// The current status of an async operation. - [System.ComponentModel.TypeConverter(typeof(OperationStatusResultTypeConverter))] - public partial interface IOperationStatusResult - - { - - } -} \ No newline at end of file diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20210901/ResourceProviderOperationAutoGenerated.PowerShell.cs b/src/KubernetesConfiguration/generated/api/Models/Api20210901/ResourceProviderOperationAutoGenerated.PowerShell.cs deleted file mode 100644 index 2789e9e1c320..000000000000 --- a/src/KubernetesConfiguration/generated/api/Models/Api20210901/ResourceProviderOperationAutoGenerated.PowerShell.cs +++ /dev/null @@ -1,173 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901 -{ - using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; - - /// Supported operation of this resource provider. - [System.ComponentModel.TypeConverter(typeof(ResourceProviderOperationAutoGeneratedTypeConverter))] - public partial class ResourceProviderOperationAutoGenerated - { - - /// - /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the - /// object before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Collections.IDictionary content that should be used. - - partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); - - /// - /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Management.Automation.PSObject content that should be used. - - partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); - - /// - /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Collections.IDictionary content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); - - /// - /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); - - /// - /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior - /// - /// /// instance serialized to a string, normally it is a Json - /// /// set returnNow to true if you provide a customized OverrideToString function - - partial void OverrideToString(ref string stringResult, ref bool returnNow); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IResourceProviderOperationAutoGenerated DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new ResourceProviderOperationAutoGenerated(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.KubernetesConfiguration.Models.Api20210901.IResourceProviderOperationAutoGenerated DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new ResourceProviderOperationAutoGenerated(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.KubernetesConfiguration.Models.Api20210901.IResourceProviderOperationAutoGenerated FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal ResourceProviderOperationAutoGenerated(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IResourceProviderOperationAutoGeneratedInternal)this).Display = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IResourceProviderOperationDisplay) content.GetValueForProperty("Display",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IResourceProviderOperationAutoGeneratedInternal)this).Display, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ResourceProviderOperationDisplayTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IResourceProviderOperationAutoGeneratedInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IResourceProviderOperationAutoGeneratedInternal)this).Name, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IResourceProviderOperationAutoGeneratedInternal)this).IsDataAction = (bool?) content.GetValueForProperty("IsDataAction",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IResourceProviderOperationAutoGeneratedInternal)this).IsDataAction, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IResourceProviderOperationAutoGeneratedInternal)this).Origin = (string) content.GetValueForProperty("Origin",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IResourceProviderOperationAutoGeneratedInternal)this).Origin, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IResourceProviderOperationAutoGeneratedInternal)this).DisplayProvider = (string) content.GetValueForProperty("DisplayProvider",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IResourceProviderOperationAutoGeneratedInternal)this).DisplayProvider, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IResourceProviderOperationAutoGeneratedInternal)this).DisplayResource = (string) content.GetValueForProperty("DisplayResource",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IResourceProviderOperationAutoGeneratedInternal)this).DisplayResource, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IResourceProviderOperationAutoGeneratedInternal)this).DisplayOperation = (string) content.GetValueForProperty("DisplayOperation",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IResourceProviderOperationAutoGeneratedInternal)this).DisplayOperation, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IResourceProviderOperationAutoGeneratedInternal)this).DisplayDescription = (string) content.GetValueForProperty("DisplayDescription",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IResourceProviderOperationAutoGeneratedInternal)this).DisplayDescription, 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 ResourceProviderOperationAutoGenerated(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IResourceProviderOperationAutoGeneratedInternal)this).Display = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IResourceProviderOperationDisplay) content.GetValueForProperty("Display",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IResourceProviderOperationAutoGeneratedInternal)this).Display, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ResourceProviderOperationDisplayTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IResourceProviderOperationAutoGeneratedInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IResourceProviderOperationAutoGeneratedInternal)this).Name, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IResourceProviderOperationAutoGeneratedInternal)this).IsDataAction = (bool?) content.GetValueForProperty("IsDataAction",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IResourceProviderOperationAutoGeneratedInternal)this).IsDataAction, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IResourceProviderOperationAutoGeneratedInternal)this).Origin = (string) content.GetValueForProperty("Origin",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IResourceProviderOperationAutoGeneratedInternal)this).Origin, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IResourceProviderOperationAutoGeneratedInternal)this).DisplayProvider = (string) content.GetValueForProperty("DisplayProvider",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IResourceProviderOperationAutoGeneratedInternal)this).DisplayProvider, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IResourceProviderOperationAutoGeneratedInternal)this).DisplayResource = (string) content.GetValueForProperty("DisplayResource",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IResourceProviderOperationAutoGeneratedInternal)this).DisplayResource, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IResourceProviderOperationAutoGeneratedInternal)this).DisplayOperation = (string) content.GetValueForProperty("DisplayOperation",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IResourceProviderOperationAutoGeneratedInternal)this).DisplayOperation, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IResourceProviderOperationAutoGeneratedInternal)this).DisplayDescription = (string) content.GetValueForProperty("DisplayDescription",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IResourceProviderOperationAutoGeneratedInternal)this).DisplayDescription, 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.KubernetesConfiguration.Runtime.SerializationMode.IncludeAll)?.ToString(); - - public override string ToString() - { - var returnNow = false; - var result = global::System.String.Empty; - OverrideToString(ref result, ref returnNow); - if (returnNow) - { - return result; - } - return ToJsonString(); - } - } - /// Supported operation of this resource provider. - [System.ComponentModel.TypeConverter(typeof(ResourceProviderOperationAutoGeneratedTypeConverter))] - public partial interface IResourceProviderOperationAutoGenerated - - { - - } -} \ No newline at end of file diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20210901/ResourceProviderOperationAutoGenerated.cs b/src/KubernetesConfiguration/generated/api/Models/Api20210901/ResourceProviderOperationAutoGenerated.cs deleted file mode 100644 index a94da44a932a..000000000000 --- a/src/KubernetesConfiguration/generated/api/Models/Api20210901/ResourceProviderOperationAutoGenerated.cs +++ /dev/null @@ -1,159 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901 -{ - using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; - - /// Supported operation of this resource provider. - public partial class ResourceProviderOperationAutoGenerated : - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IResourceProviderOperationAutoGenerated, - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IResourceProviderOperationAutoGeneratedInternal - { - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IResourceProviderOperationDisplay _display; - - /// Display metadata associated with the operation. - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IResourceProviderOperationDisplay Display { get => (this._display = this._display ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ResourceProviderOperationDisplay()); set => this._display = value; } - - /// Description of this operation. - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string DisplayDescription { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IResourceProviderOperationDisplayInternal)Display).Description; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IResourceProviderOperationDisplayInternal)Display).Description = value ?? null; } - - /// Type of operation: get, read, delete, etc. - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string DisplayOperation { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IResourceProviderOperationDisplayInternal)Display).Operation; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IResourceProviderOperationDisplayInternal)Display).Operation = value ?? null; } - - /// Resource provider: Microsoft KubernetesConfiguration. - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string DisplayProvider { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IResourceProviderOperationDisplayInternal)Display).Provider; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IResourceProviderOperationDisplayInternal)Display).Provider = value ?? null; } - - /// Resource on which the operation is performed. - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string DisplayResource { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IResourceProviderOperationDisplayInternal)Display).Resource; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IResourceProviderOperationDisplayInternal)Display).Resource = value ?? null; } - - /// Backing field for property. - private bool? _isDataAction; - - /// The flag that indicates whether the operation applies to data plane. - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] - public bool? IsDataAction { get => this._isDataAction; } - - /// Internal Acessors for Display - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IResourceProviderOperationDisplay Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IResourceProviderOperationAutoGeneratedInternal.Display { get => (this._display = this._display ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ResourceProviderOperationDisplay()); set { {_display = value;} } } - - /// Internal Acessors for IsDataAction - bool? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IResourceProviderOperationAutoGeneratedInternal.IsDataAction { get => this._isDataAction; set { {_isDataAction = value;} } } - - /// Internal Acessors for Origin - string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IResourceProviderOperationAutoGeneratedInternal.Origin { get => this._origin; set { {_origin = value;} } } - - /// Backing field for property. - private string _name; - - /// Operation name, in format of {provider}/{resource}/{operation} - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] - public string Name { get => this._name; set => this._name = value; } - - /// Backing field for property. - private string _origin; - - /// Origin of the operation - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] - public string Origin { get => this._origin; } - - /// Creates an new instance. - public ResourceProviderOperationAutoGenerated() - { - - } - } - /// Supported operation of this resource provider. - public partial interface IResourceProviderOperationAutoGenerated : - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IJsonSerializable - { - /// Description of this operation. - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Description of this operation.", - SerializedName = @"description", - PossibleTypes = new [] { typeof(string) })] - string DisplayDescription { get; set; } - /// Type of operation: get, read, delete, etc. - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Type of operation: get, read, delete, etc.", - SerializedName = @"operation", - PossibleTypes = new [] { typeof(string) })] - string DisplayOperation { get; set; } - /// Resource provider: Microsoft KubernetesConfiguration. - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Resource provider: Microsoft KubernetesConfiguration.", - SerializedName = @"provider", - PossibleTypes = new [] { typeof(string) })] - string DisplayProvider { get; set; } - /// Resource on which the operation is performed. - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Resource on which the operation is performed.", - SerializedName = @"resource", - PossibleTypes = new [] { typeof(string) })] - string DisplayResource { get; set; } - /// The flag that indicates whether the operation applies to data plane. - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The flag that indicates whether the operation applies to data plane.", - SerializedName = @"isDataAction", - PossibleTypes = new [] { typeof(bool) })] - bool? IsDataAction { get; } - /// Operation name, in format of {provider}/{resource}/{operation} - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Operation name, in format of {provider}/{resource}/{operation}", - SerializedName = @"name", - PossibleTypes = new [] { typeof(string) })] - string Name { get; set; } - /// Origin of the operation - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"Origin of the operation", - SerializedName = @"origin", - PossibleTypes = new [] { typeof(string) })] - string Origin { get; } - - } - /// Supported operation of this resource provider. - internal partial interface IResourceProviderOperationAutoGeneratedInternal - - { - /// Display metadata associated with the operation. - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IResourceProviderOperationDisplay Display { get; set; } - /// Description of this operation. - string DisplayDescription { get; set; } - /// Type of operation: get, read, delete, etc. - string DisplayOperation { get; set; } - /// Resource provider: Microsoft KubernetesConfiguration. - string DisplayProvider { get; set; } - /// Resource on which the operation is performed. - string DisplayResource { get; set; } - /// The flag that indicates whether the operation applies to data plane. - bool? IsDataAction { get; set; } - /// Operation name, in format of {provider}/{resource}/{operation} - string Name { get; set; } - /// Origin of the operation - string Origin { get; set; } - - } -} \ No newline at end of file diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20210901/ResourceProviderOperationListAutoGenerated.cs b/src/KubernetesConfiguration/generated/api/Models/Api20210901/ResourceProviderOperationListAutoGenerated.cs deleted file mode 100644 index 8a6160b45f2f..000000000000 --- a/src/KubernetesConfiguration/generated/api/Models/Api20210901/ResourceProviderOperationListAutoGenerated.cs +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901 -{ - using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; - - /// Result of the request to list operations. - public partial class ResourceProviderOperationListAutoGenerated : - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IResourceProviderOperationListAutoGenerated, - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IResourceProviderOperationListAutoGeneratedInternal - { - - /// Internal Acessors for NextLink - string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IResourceProviderOperationListAutoGeneratedInternal.NextLink { get => this._nextLink; set { {_nextLink = value;} } } - - /// Backing field for property. - private string _nextLink; - - /// URL to the next set of results, if any. - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] - public string NextLink { get => this._nextLink; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IResourceProviderOperationAutoGenerated[] _value; - - /// List of operations supported by this resource provider. - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IResourceProviderOperationAutoGenerated[] Value { get => this._value; set => this._value = value; } - - /// - /// Creates an new instance. - /// - public ResourceProviderOperationListAutoGenerated() - { - - } - } - /// Result of the request to list operations. - public partial interface IResourceProviderOperationListAutoGenerated : - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IJsonSerializable - { - /// URL to the next set of results, if any. - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"URL to the next set of results, if any.", - SerializedName = @"nextLink", - PossibleTypes = new [] { typeof(string) })] - string NextLink { get; } - /// List of operations supported by this resource provider. - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"List of operations supported by this resource provider.", - SerializedName = @"value", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IResourceProviderOperationAutoGenerated) })] - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IResourceProviderOperationAutoGenerated[] Value { get; set; } - - } - /// Result of the request to list operations. - internal partial interface IResourceProviderOperationListAutoGeneratedInternal - - { - /// URL to the next set of results, if any. - string NextLink { get; set; } - /// List of operations supported by this resource provider. - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IResourceProviderOperationAutoGenerated[] Value { get; set; } - - } -} \ No newline at end of file diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20220301/BucketDefinition.PowerShell.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/BucketDefinition.PowerShell.cs new file mode 100644 index 000000000000..f1926d83611d --- /dev/null +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/BucketDefinition.PowerShell.cs @@ -0,0 +1,214 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; + + /// Parameters to reconcile to the GitRepository source kind type. + [System.ComponentModel.TypeConverter(typeof(BucketDefinitionTypeConverter))] + public partial class BucketDefinition + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal BucketDefinition(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Url")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IBucketDefinitionInternal)this).Url = (string) content.GetValueForProperty("Url",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IBucketDefinitionInternal)this).Url, global::System.Convert.ToString); + } + if (content.Contains("BucketName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IBucketDefinitionInternal)this).BucketName = (string) content.GetValueForProperty("BucketName",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IBucketDefinitionInternal)this).BucketName, global::System.Convert.ToString); + } + if (content.Contains("Insecure")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IBucketDefinitionInternal)this).Insecure = (bool?) content.GetValueForProperty("Insecure",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IBucketDefinitionInternal)this).Insecure, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("TimeoutInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IBucketDefinitionInternal)this).TimeoutInSecond = (long?) content.GetValueForProperty("TimeoutInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IBucketDefinitionInternal)this).TimeoutInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("SyncIntervalInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IBucketDefinitionInternal)this).SyncIntervalInSecond = (long?) content.GetValueForProperty("SyncIntervalInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IBucketDefinitionInternal)this).SyncIntervalInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("AccessKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IBucketDefinitionInternal)this).AccessKey = (System.Security.SecureString) content.GetValueForProperty("AccessKey",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IBucketDefinitionInternal)this).AccessKey, (object ss) => (System.Security.SecureString)ss); + } + if (content.Contains("LocalAuthRef")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IBucketDefinitionInternal)this).LocalAuthRef = (string) content.GetValueForProperty("LocalAuthRef",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IBucketDefinitionInternal)this).LocalAuthRef, 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 BucketDefinition(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Url")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IBucketDefinitionInternal)this).Url = (string) content.GetValueForProperty("Url",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IBucketDefinitionInternal)this).Url, global::System.Convert.ToString); + } + if (content.Contains("BucketName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IBucketDefinitionInternal)this).BucketName = (string) content.GetValueForProperty("BucketName",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IBucketDefinitionInternal)this).BucketName, global::System.Convert.ToString); + } + if (content.Contains("Insecure")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IBucketDefinitionInternal)this).Insecure = (bool?) content.GetValueForProperty("Insecure",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IBucketDefinitionInternal)this).Insecure, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("TimeoutInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IBucketDefinitionInternal)this).TimeoutInSecond = (long?) content.GetValueForProperty("TimeoutInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IBucketDefinitionInternal)this).TimeoutInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("SyncIntervalInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IBucketDefinitionInternal)this).SyncIntervalInSecond = (long?) content.GetValueForProperty("SyncIntervalInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IBucketDefinitionInternal)this).SyncIntervalInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("AccessKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IBucketDefinitionInternal)this).AccessKey = (System.Security.SecureString) content.GetValueForProperty("AccessKey",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IBucketDefinitionInternal)this).AccessKey, (object ss) => (System.Security.SecureString)ss); + } + if (content.Contains("LocalAuthRef")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IBucketDefinitionInternal)this).LocalAuthRef = (string) content.GetValueForProperty("LocalAuthRef",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IBucketDefinitionInternal)this).LocalAuthRef, 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.KubernetesConfiguration.Models.Api20220301.IBucketDefinition DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new BucketDefinition(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.KubernetesConfiguration.Models.Api20220301.IBucketDefinition DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new BucketDefinition(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.KubernetesConfiguration.Models.Api20220301.IBucketDefinition FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Parameters to reconcile to the GitRepository source kind type. + [System.ComponentModel.TypeConverter(typeof(BucketDefinitionTypeConverter))] + public partial interface IBucketDefinition + + { + + } +} \ No newline at end of file diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20210301/Result.TypeConverter.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/BucketDefinition.TypeConverter.cs similarity index 71% rename from src/KubernetesConfiguration/generated/api/Models/Api20210301/Result.TypeConverter.cs rename to src/KubernetesConfiguration/generated/api/Models/Api20220301/BucketDefinition.TypeConverter.cs index 7aa02f58ca9e..2d9bf50d77ab 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Api20210301/Result.TypeConverter.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/BucketDefinition.TypeConverter.cs @@ -3,36 +3,36 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; /// - /// A PowerShell PSTypeConverter to support converting to an instance of + /// A PowerShell PSTypeConverter to support converting to an instance of /// - public partial class ResultTypeConverter : global::System.Management.Automation.PSTypeConverter + public partial class BucketDefinitionTypeConverter : global::System.Management.Automation.PSTypeConverter { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// 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. + /// 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. + /// Determines if the converter can convert the parameter to the + /// type. /// - /// the instance to check if it can be converted to the the instance to check if it can be converted to the type. /// - /// true if the instance could be converted to a type, otherwise false + /// true if the instance could be converted to a type, otherwise false /// public static bool CanConvertFrom(dynamic sourceValue) { @@ -75,51 +75,51 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// 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 + /// 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 + /// 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. + /// 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 + /// Converts the parameter into an instance of /// - /// the value to convert into an instance of . + /// the value to convert into an instance of . /// - /// an instance of , or null if there is no suitable conversion. + /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IResult ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IBucketDefinition ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IResult).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IBucketDefinition).IsAssignableFrom(type)) { return sourceValue; } try { - return Result.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + return BucketDefinition.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; } catch { @@ -127,11 +127,11 @@ public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models. } if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) { - return Result.DeserializeFromPSObject(sourceValue); + return BucketDefinition.DeserializeFromPSObject(sourceValue); } if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) { - return Result.DeserializeFromDictionary(sourceValue); + return BucketDefinition.DeserializeFromDictionary(sourceValue); } return null; } diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20220301/BucketDefinition.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/BucketDefinition.cs new file mode 100644 index 000000000000..17f0545e213f --- /dev/null +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/BucketDefinition.cs @@ -0,0 +1,180 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; + + /// Parameters to reconcile to the GitRepository source kind type. + public partial class BucketDefinition : + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IBucketDefinition, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IBucketDefinitionInternal + { + + /// Backing field for property. + private System.Security.SecureString _accessKey; + + /// Plaintext access key used to securely access the S3 bucket + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] + public System.Security.SecureString AccessKey { get => this._accessKey; set => this._accessKey = value; } + + /// Backing field for property. + private string _bucketName; + + /// The bucket name to sync from the url endpoint for the flux configuration. + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] + public string BucketName { get => this._bucketName; set => this._bucketName = value; } + + /// Backing field for property. + private bool? _insecure; + + /// + /// Specify whether to use insecure communication when puling data from the S3 bucket. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] + public bool? Insecure { get => this._insecure; set => this._insecure = value; } + + /// Backing field for property. + private string _localAuthRef; + + /// + /// Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided + /// configuration secrets. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] + public string LocalAuthRef { get => this._localAuthRef; set => this._localAuthRef = value; } + + /// Backing field for property. + private long? _syncIntervalInSecond; + + /// + /// The interval at which to re-reconcile the cluster git repository source with the remote. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] + public long? SyncIntervalInSecond { get => this._syncIntervalInSecond; set => this._syncIntervalInSecond = value; } + + /// Backing field for property. + private long? _timeoutInSecond; + + /// + /// The maximum time to attempt to reconcile the cluster git repository source with the remote. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] + public long? TimeoutInSecond { get => this._timeoutInSecond; set => this._timeoutInSecond = value; } + + /// Backing field for property. + private string _url; + + /// The URL to sync for the flux configuration S3 bucket. + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] + public string Url { get => this._url; set => this._url = value; } + + /// Creates an new instance. + public BucketDefinition() + { + + } + } + /// Parameters to reconcile to the GitRepository source kind type. + public partial interface IBucketDefinition : + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IJsonSerializable + { + /// Plaintext access key used to securely access the S3 bucket + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Plaintext access key used to securely access the S3 bucket", + SerializedName = @"accessKey", + PossibleTypes = new [] { typeof(System.Security.SecureString) })] + System.Security.SecureString AccessKey { get; set; } + /// The bucket name to sync from the url endpoint for the flux configuration. + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The bucket name to sync from the url endpoint for the flux configuration.", + SerializedName = @"bucketName", + PossibleTypes = new [] { typeof(string) })] + string BucketName { get; set; } + /// + /// Specify whether to use insecure communication when puling data from the S3 bucket. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Specify whether to use insecure communication when puling data from the S3 bucket.", + SerializedName = @"insecure", + PossibleTypes = new [] { typeof(bool) })] + bool? Insecure { get; set; } + /// + /// Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided + /// configuration secrets. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided configuration secrets.", + SerializedName = @"localAuthRef", + PossibleTypes = new [] { typeof(string) })] + string LocalAuthRef { get; set; } + /// + /// The interval at which to re-reconcile the cluster git repository source with the remote. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The interval at which to re-reconcile the cluster git repository source with the remote.", + SerializedName = @"syncIntervalInSeconds", + PossibleTypes = new [] { typeof(long) })] + long? SyncIntervalInSecond { get; set; } + /// + /// The maximum time to attempt to reconcile the cluster git repository source with the remote. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The maximum time to attempt to reconcile the cluster git repository source with the remote.", + SerializedName = @"timeoutInSeconds", + PossibleTypes = new [] { typeof(long) })] + long? TimeoutInSecond { get; set; } + /// The URL to sync for the flux configuration S3 bucket. + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The URL to sync for the flux configuration S3 bucket.", + SerializedName = @"url", + PossibleTypes = new [] { typeof(string) })] + string Url { get; set; } + + } + /// Parameters to reconcile to the GitRepository source kind type. + internal partial interface IBucketDefinitionInternal + + { + /// Plaintext access key used to securely access the S3 bucket + System.Security.SecureString AccessKey { get; set; } + /// The bucket name to sync from the url endpoint for the flux configuration. + string BucketName { get; set; } + /// + /// Specify whether to use insecure communication when puling data from the S3 bucket. + /// + bool? Insecure { get; set; } + /// + /// Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided + /// configuration secrets. + /// + string LocalAuthRef { get; set; } + /// + /// The interval at which to re-reconcile the cluster git repository source with the remote. + /// + long? SyncIntervalInSecond { get; set; } + /// + /// The maximum time to attempt to reconcile the cluster git repository source with the remote. + /// + long? TimeoutInSecond { get; set; } + /// The URL to sync for the flux configuration S3 bucket. + string Url { get; set; } + + } +} \ No newline at end of file diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20220301/BucketDefinition.json.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/BucketDefinition.json.cs new file mode 100644 index 000000000000..5d15e2246bd1 --- /dev/null +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/BucketDefinition.json.cs @@ -0,0 +1,120 @@ +// 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.KubernetesConfiguration.Models.Api20220301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; + + /// Parameters to reconcile to the GitRepository source kind type. + public partial class BucketDefinition + { + + /// + /// 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.KubernetesConfiguration.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject instance to deserialize from. + internal BucketDefinition(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_url = If( json?.PropertyT("url"), out var __jsonUrl) ? (string)__jsonUrl : (string)Url;} + {_bucketName = If( json?.PropertyT("bucketName"), out var __jsonBucketName) ? (string)__jsonBucketName : (string)BucketName;} + {_insecure = If( json?.PropertyT("insecure"), out var __jsonInsecure) ? (bool?)__jsonInsecure : Insecure;} + {_timeoutInSecond = If( json?.PropertyT("timeoutInSeconds"), out var __jsonTimeoutInSeconds) ? (long?)__jsonTimeoutInSeconds : TimeoutInSecond;} + {_syncIntervalInSecond = If( json?.PropertyT("syncIntervalInSeconds"), out var __jsonSyncIntervalInSeconds) ? (long?)__jsonSyncIntervalInSeconds : SyncIntervalInSecond;} + {_accessKey = If( json?.PropertyT("accessKey"), out var __jsonAccessKey) ? new System.Net.NetworkCredential("",(string)__jsonAccessKey).SecurePassword : AccessKey;} + {_localAuthRef = If( json?.PropertyT("localAuthRef"), out var __jsonLocalAuthRef) ? (string)__jsonLocalAuthRef : (string)LocalAuthRef;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IBucketDefinition. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IBucketDefinition. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IBucketDefinition FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json ? new BucketDefinition(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.KubernetesConfiguration.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._url)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonString(this._url.ToString()) : null, "url" ,container.Add ); + AddIf( null != (((object)this._bucketName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonString(this._bucketName.ToString()) : null, "bucketName" ,container.Add ); + AddIf( null != this._insecure ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonBoolean((bool)this._insecure) : null, "insecure" ,container.Add ); + AddIf( null != this._timeoutInSecond ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNumber((long)this._timeoutInSecond) : null, "timeoutInSeconds" ,container.Add ); + AddIf( null != this._syncIntervalInSecond ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNumber((long)this._syncIntervalInSecond) : null, "syncIntervalInSeconds" ,container.Add ); + AddIf( null != (((object)this._accessKey)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonString(System.Runtime.InteropServices.Marshal.PtrToStringBSTR(System.Runtime.InteropServices.Marshal.SecureStringToBSTR(this._accessKey))) : null, "accessKey" ,container.Add ); + AddIf( null != (((object)this._localAuthRef)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonString(this._localAuthRef.ToString()) : null, "localAuthRef" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20220301/BucketPatchDefinition.PowerShell.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/BucketPatchDefinition.PowerShell.cs new file mode 100644 index 000000000000..ac1252f974d6 --- /dev/null +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/BucketPatchDefinition.PowerShell.cs @@ -0,0 +1,214 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; + + /// Parameters to reconcile to the GitRepository source kind type. + [System.ComponentModel.TypeConverter(typeof(BucketPatchDefinitionTypeConverter))] + public partial class BucketPatchDefinition + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal BucketPatchDefinition(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Url")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IBucketPatchDefinitionInternal)this).Url = (string) content.GetValueForProperty("Url",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IBucketPatchDefinitionInternal)this).Url, global::System.Convert.ToString); + } + if (content.Contains("BucketName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IBucketPatchDefinitionInternal)this).BucketName = (string) content.GetValueForProperty("BucketName",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IBucketPatchDefinitionInternal)this).BucketName, global::System.Convert.ToString); + } + if (content.Contains("Insecure")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IBucketPatchDefinitionInternal)this).Insecure = (bool?) content.GetValueForProperty("Insecure",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IBucketPatchDefinitionInternal)this).Insecure, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("TimeoutInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IBucketPatchDefinitionInternal)this).TimeoutInSecond = (long?) content.GetValueForProperty("TimeoutInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IBucketPatchDefinitionInternal)this).TimeoutInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("SyncIntervalInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IBucketPatchDefinitionInternal)this).SyncIntervalInSecond = (long?) content.GetValueForProperty("SyncIntervalInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IBucketPatchDefinitionInternal)this).SyncIntervalInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("AccessKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IBucketPatchDefinitionInternal)this).AccessKey = (System.Security.SecureString) content.GetValueForProperty("AccessKey",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IBucketPatchDefinitionInternal)this).AccessKey, (object ss) => (System.Security.SecureString)ss); + } + if (content.Contains("LocalAuthRef")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IBucketPatchDefinitionInternal)this).LocalAuthRef = (string) content.GetValueForProperty("LocalAuthRef",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IBucketPatchDefinitionInternal)this).LocalAuthRef, 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 BucketPatchDefinition(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Url")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IBucketPatchDefinitionInternal)this).Url = (string) content.GetValueForProperty("Url",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IBucketPatchDefinitionInternal)this).Url, global::System.Convert.ToString); + } + if (content.Contains("BucketName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IBucketPatchDefinitionInternal)this).BucketName = (string) content.GetValueForProperty("BucketName",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IBucketPatchDefinitionInternal)this).BucketName, global::System.Convert.ToString); + } + if (content.Contains("Insecure")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IBucketPatchDefinitionInternal)this).Insecure = (bool?) content.GetValueForProperty("Insecure",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IBucketPatchDefinitionInternal)this).Insecure, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("TimeoutInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IBucketPatchDefinitionInternal)this).TimeoutInSecond = (long?) content.GetValueForProperty("TimeoutInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IBucketPatchDefinitionInternal)this).TimeoutInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("SyncIntervalInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IBucketPatchDefinitionInternal)this).SyncIntervalInSecond = (long?) content.GetValueForProperty("SyncIntervalInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IBucketPatchDefinitionInternal)this).SyncIntervalInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("AccessKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IBucketPatchDefinitionInternal)this).AccessKey = (System.Security.SecureString) content.GetValueForProperty("AccessKey",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IBucketPatchDefinitionInternal)this).AccessKey, (object ss) => (System.Security.SecureString)ss); + } + if (content.Contains("LocalAuthRef")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IBucketPatchDefinitionInternal)this).LocalAuthRef = (string) content.GetValueForProperty("LocalAuthRef",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IBucketPatchDefinitionInternal)this).LocalAuthRef, 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.KubernetesConfiguration.Models.Api20220301.IBucketPatchDefinition DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new BucketPatchDefinition(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.KubernetesConfiguration.Models.Api20220301.IBucketPatchDefinition DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new BucketPatchDefinition(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.KubernetesConfiguration.Models.Api20220301.IBucketPatchDefinition FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Parameters to reconcile to the GitRepository source kind type. + [System.ComponentModel.TypeConverter(typeof(BucketPatchDefinitionTypeConverter))] + public partial interface IBucketPatchDefinition + + { + + } +} \ No newline at end of file diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20/ErrorResponseAutoGenerated.TypeConverter.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/BucketPatchDefinition.TypeConverter.cs similarity index 70% rename from src/KubernetesConfiguration/generated/api/Models/Api20/ErrorResponseAutoGenerated.TypeConverter.cs rename to src/KubernetesConfiguration/generated/api/Models/Api20220301/BucketPatchDefinition.TypeConverter.cs index 6b6690d7d2f9..da53b71be877 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Api20/ErrorResponseAutoGenerated.TypeConverter.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/BucketPatchDefinition.TypeConverter.cs @@ -3,36 +3,36 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; /// - /// A PowerShell PSTypeConverter to support converting to an instance of + /// A PowerShell PSTypeConverter to support converting to an instance of /// - public partial class ErrorResponseAutoGeneratedTypeConverter : global::System.Management.Automation.PSTypeConverter + public partial class BucketPatchDefinitionTypeConverter : global::System.Management.Automation.PSTypeConverter { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// 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. + /// 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. + /// Determines if the converter can convert the parameter to the + /// type. /// - /// the instance to check if it can be converted to the the instance to check if it can be converted to the type. /// - /// true if the instance could be converted to a type, otherwise false + /// true if the instance could be converted to a type, otherwise false /// public static bool CanConvertFrom(dynamic sourceValue) { @@ -75,51 +75,51 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// 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 + /// 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 + /// 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. + /// 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 + /// Converts the parameter into an instance of /// - /// the value to convert into an instance of . + /// the value to convert into an instance of . /// - /// an instance of , or null if there is no suitable conversion. + /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponseAutoGenerated ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IBucketPatchDefinition ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponseAutoGenerated).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IBucketPatchDefinition).IsAssignableFrom(type)) { return sourceValue; } try { - return ErrorResponseAutoGenerated.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + return BucketPatchDefinition.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; } catch { @@ -127,11 +127,11 @@ public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models. } if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) { - return ErrorResponseAutoGenerated.DeserializeFromPSObject(sourceValue); + return BucketPatchDefinition.DeserializeFromPSObject(sourceValue); } if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) { - return ErrorResponseAutoGenerated.DeserializeFromDictionary(sourceValue); + return BucketPatchDefinition.DeserializeFromDictionary(sourceValue); } return null; } diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20220301/BucketPatchDefinition.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/BucketPatchDefinition.cs new file mode 100644 index 000000000000..49e08e39ce6d --- /dev/null +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/BucketPatchDefinition.cs @@ -0,0 +1,180 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; + + /// Parameters to reconcile to the GitRepository source kind type. + public partial class BucketPatchDefinition : + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IBucketPatchDefinition, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IBucketPatchDefinitionInternal + { + + /// Backing field for property. + private System.Security.SecureString _accessKey; + + /// Plaintext access key used to securely access the S3 bucket + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] + public System.Security.SecureString AccessKey { get => this._accessKey; set => this._accessKey = value; } + + /// Backing field for property. + private string _bucketName; + + /// The bucket name to sync from the url endpoint for the flux configuration. + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] + public string BucketName { get => this._bucketName; set => this._bucketName = value; } + + /// Backing field for property. + private bool? _insecure; + + /// + /// Specify whether to use insecure communication when puling data from the S3 bucket. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] + public bool? Insecure { get => this._insecure; set => this._insecure = value; } + + /// Backing field for property. + private string _localAuthRef; + + /// + /// Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided + /// configuration secrets. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] + public string LocalAuthRef { get => this._localAuthRef; set => this._localAuthRef = value; } + + /// Backing field for property. + private long? _syncIntervalInSecond; + + /// + /// The interval at which to re-reconcile the cluster git repository source with the remote. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] + public long? SyncIntervalInSecond { get => this._syncIntervalInSecond; set => this._syncIntervalInSecond = value; } + + /// Backing field for property. + private long? _timeoutInSecond; + + /// + /// The maximum time to attempt to reconcile the cluster git repository source with the remote. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] + public long? TimeoutInSecond { get => this._timeoutInSecond; set => this._timeoutInSecond = value; } + + /// Backing field for property. + private string _url; + + /// The URL to sync for the flux configuration S3 bucket. + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] + public string Url { get => this._url; set => this._url = value; } + + /// Creates an new instance. + public BucketPatchDefinition() + { + + } + } + /// Parameters to reconcile to the GitRepository source kind type. + public partial interface IBucketPatchDefinition : + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IJsonSerializable + { + /// Plaintext access key used to securely access the S3 bucket + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Plaintext access key used to securely access the S3 bucket", + SerializedName = @"accessKey", + PossibleTypes = new [] { typeof(System.Security.SecureString) })] + System.Security.SecureString AccessKey { get; set; } + /// The bucket name to sync from the url endpoint for the flux configuration. + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The bucket name to sync from the url endpoint for the flux configuration.", + SerializedName = @"bucketName", + PossibleTypes = new [] { typeof(string) })] + string BucketName { get; set; } + /// + /// Specify whether to use insecure communication when puling data from the S3 bucket. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Specify whether to use insecure communication when puling data from the S3 bucket.", + SerializedName = @"insecure", + PossibleTypes = new [] { typeof(bool) })] + bool? Insecure { get; set; } + /// + /// Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided + /// configuration secrets. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided configuration secrets.", + SerializedName = @"localAuthRef", + PossibleTypes = new [] { typeof(string) })] + string LocalAuthRef { get; set; } + /// + /// The interval at which to re-reconcile the cluster git repository source with the remote. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The interval at which to re-reconcile the cluster git repository source with the remote.", + SerializedName = @"syncIntervalInSeconds", + PossibleTypes = new [] { typeof(long) })] + long? SyncIntervalInSecond { get; set; } + /// + /// The maximum time to attempt to reconcile the cluster git repository source with the remote. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The maximum time to attempt to reconcile the cluster git repository source with the remote.", + SerializedName = @"timeoutInSeconds", + PossibleTypes = new [] { typeof(long) })] + long? TimeoutInSecond { get; set; } + /// The URL to sync for the flux configuration S3 bucket. + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The URL to sync for the flux configuration S3 bucket.", + SerializedName = @"url", + PossibleTypes = new [] { typeof(string) })] + string Url { get; set; } + + } + /// Parameters to reconcile to the GitRepository source kind type. + internal partial interface IBucketPatchDefinitionInternal + + { + /// Plaintext access key used to securely access the S3 bucket + System.Security.SecureString AccessKey { get; set; } + /// The bucket name to sync from the url endpoint for the flux configuration. + string BucketName { get; set; } + /// + /// Specify whether to use insecure communication when puling data from the S3 bucket. + /// + bool? Insecure { get; set; } + /// + /// Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided + /// configuration secrets. + /// + string LocalAuthRef { get; set; } + /// + /// The interval at which to re-reconcile the cluster git repository source with the remote. + /// + long? SyncIntervalInSecond { get; set; } + /// + /// The maximum time to attempt to reconcile the cluster git repository source with the remote. + /// + long? TimeoutInSecond { get; set; } + /// The URL to sync for the flux configuration S3 bucket. + string Url { get; set; } + + } +} \ No newline at end of file diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20220301/BucketPatchDefinition.json.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/BucketPatchDefinition.json.cs new file mode 100644 index 000000000000..7bd0f4f712cd --- /dev/null +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/BucketPatchDefinition.json.cs @@ -0,0 +1,120 @@ +// 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.KubernetesConfiguration.Models.Api20220301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; + + /// Parameters to reconcile to the GitRepository source kind type. + public partial class BucketPatchDefinition + { + + /// + /// 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.KubernetesConfiguration.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject instance to deserialize from. + internal BucketPatchDefinition(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_url = If( json?.PropertyT("url"), out var __jsonUrl) ? (string)__jsonUrl : (string)Url;} + {_bucketName = If( json?.PropertyT("bucketName"), out var __jsonBucketName) ? (string)__jsonBucketName : (string)BucketName;} + {_insecure = If( json?.PropertyT("insecure"), out var __jsonInsecure) ? (bool?)__jsonInsecure : Insecure;} + {_timeoutInSecond = If( json?.PropertyT("timeoutInSeconds"), out var __jsonTimeoutInSeconds) ? (long?)__jsonTimeoutInSeconds : TimeoutInSecond;} + {_syncIntervalInSecond = If( json?.PropertyT("syncIntervalInSeconds"), out var __jsonSyncIntervalInSeconds) ? (long?)__jsonSyncIntervalInSeconds : SyncIntervalInSecond;} + {_accessKey = If( json?.PropertyT("accessKey"), out var __jsonAccessKey) ? new System.Net.NetworkCredential("",(string)__jsonAccessKey).SecurePassword : AccessKey;} + {_localAuthRef = If( json?.PropertyT("localAuthRef"), out var __jsonLocalAuthRef) ? (string)__jsonLocalAuthRef : (string)LocalAuthRef;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IBucketPatchDefinition. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IBucketPatchDefinition. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IBucketPatchDefinition FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json ? new BucketPatchDefinition(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.KubernetesConfiguration.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._url)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonString(this._url.ToString()) : null, "url" ,container.Add ); + AddIf( null != (((object)this._bucketName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonString(this._bucketName.ToString()) : null, "bucketName" ,container.Add ); + AddIf( null != this._insecure ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonBoolean((bool)this._insecure) : null, "insecure" ,container.Add ); + AddIf( null != this._timeoutInSecond ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNumber((long)this._timeoutInSecond) : null, "timeoutInSeconds" ,container.Add ); + AddIf( null != this._syncIntervalInSecond ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNumber((long)this._syncIntervalInSecond) : null, "syncIntervalInSeconds" ,container.Add ); + AddIf( null != (((object)this._accessKey)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonString(System.Runtime.InteropServices.Marshal.PtrToStringBSTR(System.Runtime.InteropServices.Marshal.SecureStringToBSTR(this._accessKey))) : null, "accessKey" ,container.Add ); + AddIf( null != (((object)this._localAuthRef)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonString(this._localAuthRef.ToString()) : null, "localAuthRef" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20210301/ComplianceStatus.PowerShell.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/ComplianceStatus.PowerShell.cs similarity index 59% rename from src/KubernetesConfiguration/generated/api/Models/Api20210301/ComplianceStatus.PowerShell.cs rename to src/KubernetesConfiguration/generated/api/Models/Api20220301/ComplianceStatus.PowerShell.cs index 7a4b60d19731..7ba136ff9745 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Api20210301/ComplianceStatus.PowerShell.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/ComplianceStatus.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; @@ -31,7 +31,8 @@ public partial class ComplianceStatus /// /// 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. + /// 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. @@ -43,7 +44,8 @@ public partial class ComplianceStatus /// /// 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. + /// 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. @@ -61,7 +63,7 @@ public partial class ComplianceStatus partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -74,15 +76,27 @@ internal ComplianceStatus(global::System.Collections.IDictionary content) return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IComplianceStatusInternal)this).ComplianceState = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ComplianceStateType?) content.GetValueForProperty("ComplianceState",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IComplianceStatusInternal)this).ComplianceState, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ComplianceStateType.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IComplianceStatusInternal)this).LastConfigApplied = (global::System.DateTime?) content.GetValueForProperty("LastConfigApplied",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IComplianceStatusInternal)this).LastConfigApplied, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IComplianceStatusInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IComplianceStatusInternal)this).Message, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IComplianceStatusInternal)this).MessageLevel = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.MessageLevelType?) content.GetValueForProperty("MessageLevel",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IComplianceStatusInternal)this).MessageLevel, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.MessageLevelType.CreateFrom); + if (content.Contains("ComplianceState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IComplianceStatusInternal)this).ComplianceState = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ComplianceStateType?) content.GetValueForProperty("ComplianceState",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IComplianceStatusInternal)this).ComplianceState, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ComplianceStateType.CreateFrom); + } + if (content.Contains("LastConfigApplied")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IComplianceStatusInternal)this).LastConfigApplied = (global::System.DateTime?) content.GetValueForProperty("LastConfigApplied",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IComplianceStatusInternal)this).LastConfigApplied, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("Message")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IComplianceStatusInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IComplianceStatusInternal)this).Message, global::System.Convert.ToString); + } + if (content.Contains("MessageLevel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IComplianceStatusInternal)this).MessageLevel = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.MessageLevelType?) content.GetValueForProperty("MessageLevel",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IComplianceStatusInternal)this).MessageLevel, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.MessageLevelType.CreateFrom); + } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -95,37 +109,49 @@ internal ComplianceStatus(global::System.Management.Automation.PSObject content) return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IComplianceStatusInternal)this).ComplianceState = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ComplianceStateType?) content.GetValueForProperty("ComplianceState",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IComplianceStatusInternal)this).ComplianceState, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ComplianceStateType.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IComplianceStatusInternal)this).LastConfigApplied = (global::System.DateTime?) content.GetValueForProperty("LastConfigApplied",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IComplianceStatusInternal)this).LastConfigApplied, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IComplianceStatusInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IComplianceStatusInternal)this).Message, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IComplianceStatusInternal)this).MessageLevel = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.MessageLevelType?) content.GetValueForProperty("MessageLevel",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IComplianceStatusInternal)this).MessageLevel, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.MessageLevelType.CreateFrom); + if (content.Contains("ComplianceState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IComplianceStatusInternal)this).ComplianceState = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ComplianceStateType?) content.GetValueForProperty("ComplianceState",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IComplianceStatusInternal)this).ComplianceState, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ComplianceStateType.CreateFrom); + } + if (content.Contains("LastConfigApplied")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IComplianceStatusInternal)this).LastConfigApplied = (global::System.DateTime?) content.GetValueForProperty("LastConfigApplied",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IComplianceStatusInternal)this).LastConfigApplied, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("Message")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IComplianceStatusInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IComplianceStatusInternal)this).Message, global::System.Convert.ToString); + } + if (content.Contains("MessageLevel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IComplianceStatusInternal)this).MessageLevel = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.MessageLevelType?) content.GetValueForProperty("MessageLevel",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IComplianceStatusInternal)this).MessageLevel, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.MessageLevelType.CreateFrom); + } AfterDeserializePSObject(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IComplianceStatus DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IComplianceStatus DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ComplianceStatus(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IComplianceStatus DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IComplianceStatus DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ComplianceStatus(content); } @@ -134,8 +160,8 @@ public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models. /// 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.KubernetesConfiguration.Models.Api20210301.IComplianceStatus FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IComplianceStatus FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20210301/ComplianceStatus.TypeConverter.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/ComplianceStatus.TypeConverter.cs similarity index 82% rename from src/KubernetesConfiguration/generated/api/Models/Api20210301/ComplianceStatus.TypeConverter.cs rename to src/KubernetesConfiguration/generated/api/Models/Api20220301/ComplianceStatus.TypeConverter.cs index 6b8ceaa215be..d32fdc7018ef 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Api20210301/ComplianceStatus.TypeConverter.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/ComplianceStatus.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; @@ -14,20 +14,20 @@ public partial class ComplianceStatusTypeConverter : global::System.Management.A { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// 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. + /// 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. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +75,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// 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 + /// 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 + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,21 +100,20 @@ public static bool CanConvertFrom(dynamic sourceValue) 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 + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IComplianceStatus ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IComplianceStatus ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IComplianceStatus).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IComplianceStatus).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20210301/ComplianceStatus.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/ComplianceStatus.cs similarity index 97% rename from src/KubernetesConfiguration/generated/api/Models/Api20210301/ComplianceStatus.cs rename to src/KubernetesConfiguration/generated/api/Models/Api20220301/ComplianceStatus.cs index 2e47b2aafa5c..74c05ab541b2 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Api20210301/ComplianceStatus.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/ComplianceStatus.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; /// Compliance Status details public partial class ComplianceStatus : - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IComplianceStatus, - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IComplianceStatusInternal + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IComplianceStatus, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IComplianceStatusInternal { /// Backing field for property. @@ -42,7 +42,7 @@ public partial class ComplianceStatus : public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.MessageLevelType? MessageLevel { get => this._messageLevel; set => this._messageLevel = value; } /// Internal Acessors for ComplianceState - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ComplianceStateType? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IComplianceStatusInternal.ComplianceState { get => this._complianceState; set { {_complianceState = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ComplianceStateType? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IComplianceStatusInternal.ComplianceState { get => this._complianceState; set { {_complianceState = value;} } } /// Creates an new instance. public ComplianceStatus() diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20210301/ComplianceStatus.json.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/ComplianceStatus.json.cs similarity index 93% rename from src/KubernetesConfiguration/generated/api/Models/Api20210301/ComplianceStatus.json.cs rename to src/KubernetesConfiguration/generated/api/Models/Api20220301/ComplianceStatus.json.cs index 2d772860d8f5..5f2190290fd5 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Api20210301/ComplianceStatus.json.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/ComplianceStatus.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; @@ -20,7 +20,7 @@ public partial class ComplianceStatus partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class ComplianceStatus /// /// 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. + /// 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. @@ -42,7 +43,8 @@ public partial class ComplianceStatus /// /// 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. + /// 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. @@ -71,13 +73,13 @@ internal ComplianceStatus(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfigura } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IComplianceStatus. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IComplianceStatus. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IComplianceStatus. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IComplianceStatus. /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IComplianceStatus FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IComplianceStatus FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json ? new ComplianceStatus(json) : null; } diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20210301/ConfigurationProtectedSettings.PowerShell.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/ConfigurationProtectedSettings.PowerShell.cs similarity index 90% rename from src/KubernetesConfiguration/generated/api/Models/Api20210301/ConfigurationProtectedSettings.PowerShell.cs rename to src/KubernetesConfiguration/generated/api/Models/Api20220301/ConfigurationProtectedSettings.PowerShell.cs index 86bbdc6874ef..f9ce0ad9e8a7 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Api20210301/ConfigurationProtectedSettings.PowerShell.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/ConfigurationProtectedSettings.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; @@ -31,7 +31,8 @@ public partial class ConfigurationProtectedSettings /// /// 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. + /// 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. @@ -43,7 +44,8 @@ public partial class ConfigurationProtectedSettings /// /// 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. + /// 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. @@ -61,7 +63,7 @@ public partial class ConfigurationProtectedSettings partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -80,7 +82,7 @@ internal ConfigurationProtectedSettings(global::System.Collections.IDictionary c } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -99,29 +101,29 @@ internal ConfigurationProtectedSettings(global::System.Management.Automation.PSO } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IConfigurationProtectedSettings DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IConfigurationProtectedSettings DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ConfigurationProtectedSettings(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IConfigurationProtectedSettings DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IConfigurationProtectedSettings DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ConfigurationProtectedSettings(content); } @@ -130,8 +132,8 @@ public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models. /// 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.KubernetesConfiguration.Models.Api20210301.IConfigurationProtectedSettings FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IConfigurationProtectedSettings FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20210301/ConfigurationProtectedSettings.TypeConverter.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/ConfigurationProtectedSettings.TypeConverter.cs similarity index 82% rename from src/KubernetesConfiguration/generated/api/Models/Api20210301/ConfigurationProtectedSettings.TypeConverter.cs rename to src/KubernetesConfiguration/generated/api/Models/Api20220301/ConfigurationProtectedSettings.TypeConverter.cs index 7f062311229e..95565d0feb60 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Api20210301/ConfigurationProtectedSettings.TypeConverter.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/ConfigurationProtectedSettings.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; @@ -14,20 +14,20 @@ public partial class ConfigurationProtectedSettingsTypeConverter : global::Syste { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// 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. + /// 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. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +75,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// 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 + /// 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 + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,21 +100,21 @@ public static bool CanConvertFrom(dynamic sourceValue) 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 + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IConfigurationProtectedSettings ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IConfigurationProtectedSettings ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IConfigurationProtectedSettings).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IConfigurationProtectedSettings).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20210301/ConfigurationProtectedSettings.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/ConfigurationProtectedSettings.cs similarity index 91% rename from src/KubernetesConfiguration/generated/api/Models/Api20210301/ConfigurationProtectedSettings.cs rename to src/KubernetesConfiguration/generated/api/Models/Api20220301/ConfigurationProtectedSettings.cs index ecd293c9242f..e43decfbbfcf 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Api20210301/ConfigurationProtectedSettings.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/ConfigurationProtectedSettings.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; /// Name-value pairs of protected configuration settings for the configuration public partial class ConfigurationProtectedSettings : - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IConfigurationProtectedSettings, - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IConfigurationProtectedSettingsInternal + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IConfigurationProtectedSettings, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IConfigurationProtectedSettingsInternal { /// Creates an new instance. diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20210301/ConfigurationProtectedSettings.dictionary.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/ConfigurationProtectedSettings.dictionary.cs similarity index 98% rename from src/KubernetesConfiguration/generated/api/Models/Api20210301/ConfigurationProtectedSettings.dictionary.cs rename to src/KubernetesConfiguration/generated/api/Models/Api20220301/ConfigurationProtectedSettings.dictionary.cs index cd4a91de2e30..7664328b65b2 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Api20210301/ConfigurationProtectedSettings.dictionary.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/ConfigurationProtectedSettings.dictionary.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; @@ -70,6 +70,6 @@ public void CopyFrom(global::System.Management.Automation.PSObject source) /// - public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ConfigurationProtectedSettings source) => source.__additionalProperties; + public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ConfigurationProtectedSettings source) => source.__additionalProperties; } } \ No newline at end of file diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20210301/ConfigurationProtectedSettings.json.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/ConfigurationProtectedSettings.json.cs similarity index 91% rename from src/KubernetesConfiguration/generated/api/Models/Api20210301/ConfigurationProtectedSettings.json.cs rename to src/KubernetesConfiguration/generated/api/Models/Api20220301/ConfigurationProtectedSettings.json.cs index 6fe486add1dd..3fb7ce5a31e0 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Api20210301/ConfigurationProtectedSettings.json.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/ConfigurationProtectedSettings.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; @@ -20,7 +20,7 @@ public partial class ConfigurationProtectedSettings partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class ConfigurationProtectedSettings /// /// 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. + /// 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. @@ -42,7 +43,8 @@ public partial class ConfigurationProtectedSettings /// /// 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. + /// 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. @@ -69,13 +71,13 @@ internal ConfigurationProtectedSettings(Microsoft.Azure.PowerShell.Cmdlets.Kuber } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IConfigurationProtectedSettings. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IConfigurationProtectedSettings. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IConfigurationProtectedSettings. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IConfigurationProtectedSettings. /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IConfigurationProtectedSettings FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IConfigurationProtectedSettings FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json ? new ConfigurationProtectedSettings(json) : null; } diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20220301/Extension.PowerShell.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/Extension.PowerShell.cs new file mode 100644 index 000000000000..fbaaf1093b92 --- /dev/null +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/Extension.PowerShell.cs @@ -0,0 +1,484 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; + + /// The Extension object. + [System.ComponentModel.TypeConverter(typeof(ExtensionTypeConverter))] + public partial class Extension + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtension DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new Extension(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.KubernetesConfiguration.Models.Api20220301.IExtension DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new Extension(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal Extension(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ExtensionPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Identity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).Identity = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IIdentity) content.GetValueForProperty("Identity",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).Identity, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IdentityTypeConverter.ConvertFrom); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Scope")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).Scope = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IScope) content.GetValueForProperty("Scope",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).Scope, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ScopeTypeConverter.ConvertFrom); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningState.CreateFrom); + } + if (content.Contains("IdentityPrincipalId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).IdentityPrincipalId = (string) content.GetValueForProperty("IdentityPrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).IdentityPrincipalId, global::System.Convert.ToString); + } + if (content.Contains("IdentityTenantId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).IdentityTenantId = (string) content.GetValueForProperty("IdentityTenantId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).IdentityTenantId, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("ErrorInfo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).ErrorInfo = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetail) content.GetValueForProperty("ErrorInfo",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).ErrorInfo, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorDetailTypeConverter.ConvertFrom); + } + if (content.Contains("AksAssignedIdentity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).AksAssignedIdentity = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesAksAssignedIdentity) content.GetValueForProperty("AksAssignedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).AksAssignedIdentity, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ExtensionPropertiesAksAssignedIdentityTypeConverter.ConvertFrom); + } + if (content.Contains("ExtensionType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).ExtensionType = (string) content.GetValueForProperty("ExtensionType",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).ExtensionType, global::System.Convert.ToString); + } + if (content.Contains("AutoUpgradeMinorVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).AutoUpgradeMinorVersion = (bool?) content.GetValueForProperty("AutoUpgradeMinorVersion",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).AutoUpgradeMinorVersion, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ReleaseTrain")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).ReleaseTrain = (string) content.GetValueForProperty("ReleaseTrain",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).ReleaseTrain, global::System.Convert.ToString); + } + if (content.Contains("Version")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).Version = (string) content.GetValueForProperty("Version",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).Version, global::System.Convert.ToString); + } + if (content.Contains("ConfigurationSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).ConfigurationSetting = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesConfigurationSettings) content.GetValueForProperty("ConfigurationSetting",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).ConfigurationSetting, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ExtensionPropertiesConfigurationSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("ConfigurationProtectedSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).ConfigurationProtectedSetting = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesConfigurationProtectedSettings) content.GetValueForProperty("ConfigurationProtectedSetting",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).ConfigurationProtectedSetting, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ExtensionPropertiesConfigurationProtectedSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("InstalledVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).InstalledVersion = (string) content.GetValueForProperty("InstalledVersion",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).InstalledVersion, global::System.Convert.ToString); + } + if (content.Contains("Statuses")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).Statuses = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionStatus[]) content.GetValueForProperty("Statuses",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).Statuses, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ExtensionStatusTypeConverter.ConvertFrom)); + } + if (content.Contains("CustomLocationSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).CustomLocationSetting = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesCustomLocationSettings) content.GetValueForProperty("CustomLocationSetting",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).CustomLocationSetting, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ExtensionPropertiesCustomLocationSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("PackageUri")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).PackageUri = (string) content.GetValueForProperty("PackageUri",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).PackageUri, global::System.Convert.ToString); + } + if (content.Contains("ScopeCluster")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).ScopeCluster = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IScopeCluster) content.GetValueForProperty("ScopeCluster",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).ScopeCluster, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ScopeClusterTypeConverter.ConvertFrom); + } + if (content.Contains("ScopeNamespace")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).ScopeNamespace = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IScopeNamespace) content.GetValueForProperty("ScopeNamespace",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).ScopeNamespace, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ScopeNamespaceTypeConverter.ConvertFrom); + } + if (content.Contains("IdentityType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).IdentityType = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ResourceIdentityType?) content.GetValueForProperty("IdentityType",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).IdentityType, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ResourceIdentityType.CreateFrom); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("ClusterReleaseNamespace")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).ClusterReleaseNamespace = (string) content.GetValueForProperty("ClusterReleaseNamespace",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).ClusterReleaseNamespace, global::System.Convert.ToString); + } + if (content.Contains("NamespaceTargetNamespace")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).NamespaceTargetNamespace = (string) content.GetValueForProperty("NamespaceTargetNamespace",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).NamespaceTargetNamespace, global::System.Convert.ToString); + } + if (content.Contains("ErrorInfoCode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).ErrorInfoCode = (string) content.GetValueForProperty("ErrorInfoCode",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).ErrorInfoCode, global::System.Convert.ToString); + } + if (content.Contains("ErrorInfoMessage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).ErrorInfoMessage = (string) content.GetValueForProperty("ErrorInfoMessage",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).ErrorInfoMessage, global::System.Convert.ToString); + } + if (content.Contains("ErrorInfoTarget")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).ErrorInfoTarget = (string) content.GetValueForProperty("ErrorInfoTarget",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).ErrorInfoTarget, global::System.Convert.ToString); + } + if (content.Contains("ErrorInfoDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).ErrorInfoDetail = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetail[]) content.GetValueForProperty("ErrorInfoDetail",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).ErrorInfoDetail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorDetailTypeConverter.ConvertFrom)); + } + if (content.Contains("ErrorInfoAdditionalInfo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).ErrorInfoAdditionalInfo = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorAdditionalInfo[]) content.GetValueForProperty("ErrorInfoAdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).ErrorInfoAdditionalInfo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorAdditionalInfoTypeConverter.ConvertFrom)); + } + if (content.Contains("AkAssignedIdentityPrincipalId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).AkAssignedIdentityPrincipalId = (string) content.GetValueForProperty("AkAssignedIdentityPrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).AkAssignedIdentityPrincipalId, global::System.Convert.ToString); + } + if (content.Contains("AkAssignedIdentityTenantId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).AkAssignedIdentityTenantId = (string) content.GetValueForProperty("AkAssignedIdentityTenantId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).AkAssignedIdentityTenantId, global::System.Convert.ToString); + } + if (content.Contains("AkAssignedIdentityType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).AkAssignedIdentityType = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.AksIdentityType?) content.GetValueForProperty("AkAssignedIdentityType",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).AkAssignedIdentityType, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.AksIdentityType.CreateFrom); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal Extension(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ExtensionPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Identity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).Identity = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IIdentity) content.GetValueForProperty("Identity",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).Identity, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IdentityTypeConverter.ConvertFrom); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Scope")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).Scope = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IScope) content.GetValueForProperty("Scope",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).Scope, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ScopeTypeConverter.ConvertFrom); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningState.CreateFrom); + } + if (content.Contains("IdentityPrincipalId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).IdentityPrincipalId = (string) content.GetValueForProperty("IdentityPrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).IdentityPrincipalId, global::System.Convert.ToString); + } + if (content.Contains("IdentityTenantId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).IdentityTenantId = (string) content.GetValueForProperty("IdentityTenantId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).IdentityTenantId, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("ErrorInfo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).ErrorInfo = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetail) content.GetValueForProperty("ErrorInfo",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).ErrorInfo, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorDetailTypeConverter.ConvertFrom); + } + if (content.Contains("AksAssignedIdentity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).AksAssignedIdentity = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesAksAssignedIdentity) content.GetValueForProperty("AksAssignedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).AksAssignedIdentity, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ExtensionPropertiesAksAssignedIdentityTypeConverter.ConvertFrom); + } + if (content.Contains("ExtensionType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).ExtensionType = (string) content.GetValueForProperty("ExtensionType",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).ExtensionType, global::System.Convert.ToString); + } + if (content.Contains("AutoUpgradeMinorVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).AutoUpgradeMinorVersion = (bool?) content.GetValueForProperty("AutoUpgradeMinorVersion",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).AutoUpgradeMinorVersion, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ReleaseTrain")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).ReleaseTrain = (string) content.GetValueForProperty("ReleaseTrain",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).ReleaseTrain, global::System.Convert.ToString); + } + if (content.Contains("Version")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).Version = (string) content.GetValueForProperty("Version",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).Version, global::System.Convert.ToString); + } + if (content.Contains("ConfigurationSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).ConfigurationSetting = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesConfigurationSettings) content.GetValueForProperty("ConfigurationSetting",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).ConfigurationSetting, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ExtensionPropertiesConfigurationSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("ConfigurationProtectedSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).ConfigurationProtectedSetting = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesConfigurationProtectedSettings) content.GetValueForProperty("ConfigurationProtectedSetting",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).ConfigurationProtectedSetting, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ExtensionPropertiesConfigurationProtectedSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("InstalledVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).InstalledVersion = (string) content.GetValueForProperty("InstalledVersion",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).InstalledVersion, global::System.Convert.ToString); + } + if (content.Contains("Statuses")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).Statuses = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionStatus[]) content.GetValueForProperty("Statuses",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).Statuses, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ExtensionStatusTypeConverter.ConvertFrom)); + } + if (content.Contains("CustomLocationSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).CustomLocationSetting = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesCustomLocationSettings) content.GetValueForProperty("CustomLocationSetting",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).CustomLocationSetting, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ExtensionPropertiesCustomLocationSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("PackageUri")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).PackageUri = (string) content.GetValueForProperty("PackageUri",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).PackageUri, global::System.Convert.ToString); + } + if (content.Contains("ScopeCluster")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).ScopeCluster = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IScopeCluster) content.GetValueForProperty("ScopeCluster",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).ScopeCluster, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ScopeClusterTypeConverter.ConvertFrom); + } + if (content.Contains("ScopeNamespace")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).ScopeNamespace = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IScopeNamespace) content.GetValueForProperty("ScopeNamespace",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).ScopeNamespace, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ScopeNamespaceTypeConverter.ConvertFrom); + } + if (content.Contains("IdentityType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).IdentityType = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ResourceIdentityType?) content.GetValueForProperty("IdentityType",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).IdentityType, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ResourceIdentityType.CreateFrom); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("ClusterReleaseNamespace")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).ClusterReleaseNamespace = (string) content.GetValueForProperty("ClusterReleaseNamespace",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).ClusterReleaseNamespace, global::System.Convert.ToString); + } + if (content.Contains("NamespaceTargetNamespace")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).NamespaceTargetNamespace = (string) content.GetValueForProperty("NamespaceTargetNamespace",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).NamespaceTargetNamespace, global::System.Convert.ToString); + } + if (content.Contains("ErrorInfoCode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).ErrorInfoCode = (string) content.GetValueForProperty("ErrorInfoCode",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).ErrorInfoCode, global::System.Convert.ToString); + } + if (content.Contains("ErrorInfoMessage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).ErrorInfoMessage = (string) content.GetValueForProperty("ErrorInfoMessage",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).ErrorInfoMessage, global::System.Convert.ToString); + } + if (content.Contains("ErrorInfoTarget")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).ErrorInfoTarget = (string) content.GetValueForProperty("ErrorInfoTarget",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).ErrorInfoTarget, global::System.Convert.ToString); + } + if (content.Contains("ErrorInfoDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).ErrorInfoDetail = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetail[]) content.GetValueForProperty("ErrorInfoDetail",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).ErrorInfoDetail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorDetailTypeConverter.ConvertFrom)); + } + if (content.Contains("ErrorInfoAdditionalInfo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).ErrorInfoAdditionalInfo = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorAdditionalInfo[]) content.GetValueForProperty("ErrorInfoAdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).ErrorInfoAdditionalInfo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorAdditionalInfoTypeConverter.ConvertFrom)); + } + if (content.Contains("AkAssignedIdentityPrincipalId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).AkAssignedIdentityPrincipalId = (string) content.GetValueForProperty("AkAssignedIdentityPrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).AkAssignedIdentityPrincipalId, global::System.Convert.ToString); + } + if (content.Contains("AkAssignedIdentityTenantId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).AkAssignedIdentityTenantId = (string) content.GetValueForProperty("AkAssignedIdentityTenantId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).AkAssignedIdentityTenantId, global::System.Convert.ToString); + } + if (content.Contains("AkAssignedIdentityType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).AkAssignedIdentityType = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.AksIdentityType?) content.GetValueForProperty("AkAssignedIdentityType",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal)this).AkAssignedIdentityType, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.AksIdentityType.CreateFrom); + } + 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.KubernetesConfiguration.Models.Api20220301.IExtension FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The Extension object. + [System.ComponentModel.TypeConverter(typeof(ExtensionTypeConverter))] + public partial interface IExtension + + { + + } +} \ No newline at end of file diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20210901/Extension.TypeConverter.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/Extension.TypeConverter.cs similarity index 82% rename from src/KubernetesConfiguration/generated/api/Models/Api20210901/Extension.TypeConverter.cs rename to src/KubernetesConfiguration/generated/api/Models/Api20220301/Extension.TypeConverter.cs index d71c565e86ac..78d3413892ff 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Api20210901/Extension.TypeConverter.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/Extension.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; @@ -14,20 +14,19 @@ public partial class ExtensionTypeConverter : global::System.Management.Automati { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// 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. + /// 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. + /// Determines if the converter can convert the parameter to the type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +74,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// 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 + /// 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 + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,21 +99,20 @@ public static bool CanConvertFrom(dynamic sourceValue) 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 + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtension ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtension ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtension).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtension).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20210901/Extension.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/Extension.cs similarity index 82% rename from src/KubernetesConfiguration/generated/api/Models/Api20210901/Extension.cs rename to src/KubernetesConfiguration/generated/api/Models/Api20220301/Extension.cs index 3f14a405cd34..5cf4e0c4913f 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Api20210901/Extension.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/Extension.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; /// The Extension object. public partial class Extension : - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtension, - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtension, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IValidates { /// @@ -22,24 +22,24 @@ public partial class Extension : /// The principal ID of resource identity. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.DoNotFormat] - public string AkAssignedIdentityPrincipalId { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)Property).AkAssignedIdentityPrincipalId; } + public string AkAssignedIdentityPrincipalId { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)Property).AkAssignedIdentityPrincipalId; } /// The tenant ID of resource. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.DoNotFormat] - public string AkAssignedIdentityTenantId { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)Property).AkAssignedIdentityTenantId; } + public string AkAssignedIdentityTenantId { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)Property).AkAssignedIdentityTenantId; } /// The identity type. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.DoNotFormat] - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ResourceIdentityType? AkAssignedIdentityType { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)Property).AkAssignedIdentityType; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)Property).AkAssignedIdentityType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ResourceIdentityType)""); } + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.AksIdentityType? AkAssignedIdentityType { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)Property).AkAssignedIdentityType; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)Property).AkAssignedIdentityType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.AksIdentityType)""); } /// /// Flag to note if this extension participates in auto upgrade of minor version, or not. /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.FormatTable(Index = 4)] - public bool? AutoUpgradeMinorVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)Property).AutoUpgradeMinorVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)Property).AutoUpgradeMinorVersion = value ?? default(bool); } + public bool? AutoUpgradeMinorVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)Property).AutoUpgradeMinorVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)Property).AutoUpgradeMinorVersion = value ?? default(bool); } /// /// Namespace where the extension Release must be placed, for a Cluster scoped extension. If this namespace does not exist, @@ -47,49 +47,49 @@ public partial class Extension : /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.DoNotFormat] - public string ClusterReleaseNamespace { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)Property).ClusterReleaseNamespace; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)Property).ClusterReleaseNamespace = value ?? null; } + public string ClusterReleaseNamespace { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)Property).ClusterReleaseNamespace; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)Property).ClusterReleaseNamespace = value ?? null; } /// /// Configuration settings that are sensitive, as name-value pairs for configuring this extension. /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.DoNotFormat] - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesConfigurationProtectedSettings ConfigurationProtectedSetting { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)Property).ConfigurationProtectedSetting; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)Property).ConfigurationProtectedSetting = value ?? null /* model class */; } + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesConfigurationProtectedSettings ConfigurationProtectedSetting { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)Property).ConfigurationProtectedSetting; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)Property).ConfigurationProtectedSetting = value ?? null /* model class */; } /// Configuration settings, as name-value pairs for configuring this extension. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.DoNotFormat] - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesConfigurationSettings ConfigurationSetting { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)Property).ConfigurationSetting; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)Property).ConfigurationSetting = value ?? null /* model class */; } + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesConfigurationSettings ConfigurationSetting { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)Property).ConfigurationSetting; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)Property).ConfigurationSetting = value ?? null /* model class */; } /// Custom Location settings properties. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.DoNotFormat] - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesCustomLocationSettings CustomLocationSetting { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)Property).CustomLocationSetting; } + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesCustomLocationSettings CustomLocationSetting { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)Property).CustomLocationSetting; } /// The error additional info. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.DoNotFormat] - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorAdditionalInfo[] ErrorInfoAdditionalInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)Property).ErrorInfoAdditionalInfo; } + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorAdditionalInfo[] ErrorInfoAdditionalInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)Property).ErrorInfoAdditionalInfo; } /// The error code. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.DoNotFormat] - public string ErrorInfoCode { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)Property).ErrorInfoCode; } + public string ErrorInfoCode { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)Property).ErrorInfoCode; } /// The error details. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.DoNotFormat] - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetail[] ErrorInfoDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)Property).ErrorInfoDetail; } + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetail[] ErrorInfoDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)Property).ErrorInfoDetail; } /// The error message. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.DoNotFormat] - public string ErrorInfoMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)Property).ErrorInfoMessage; } + public string ErrorInfoMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)Property).ErrorInfoMessage; } /// The error target. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.DoNotFormat] - public string ErrorInfoTarget { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)Property).ErrorInfoTarget; } + public string ErrorInfoTarget { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)Property).ErrorInfoTarget; } /// /// Type of the Extension, of which this resource is an instance of. It must be one of the Extension Types registered with @@ -97,7 +97,7 @@ public partial class Extension : /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.FormatTable(Index = 1)] - public string ExtensionType { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)Property).ExtensionType; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)Property).ExtensionType = value ?? null; } + public string ExtensionType { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)Property).ExtensionType; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)Property).ExtensionType = value ?? null; } /// /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} @@ -129,6 +129,11 @@ public partial class Extension : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.DoNotFormat] public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ResourceIdentityType? IdentityType { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IIdentityInternal)Identity).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IIdentityInternal)Identity).Type = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ResourceIdentityType)""); } + /// Installed version of the extension. + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.DoNotFormat] + public string InstalledVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)Property).InstalledVersion; } + /// Internal Acessors for Id string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)__resource).Id = value; } @@ -139,67 +144,70 @@ public partial class Extension : string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)__resource).Type = value; } /// Internal Acessors for AkAssignedIdentityPrincipalId - string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal.AkAssignedIdentityPrincipalId { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)Property).AkAssignedIdentityPrincipalId; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)Property).AkAssignedIdentityPrincipalId = value; } + string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal.AkAssignedIdentityPrincipalId { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)Property).AkAssignedIdentityPrincipalId; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)Property).AkAssignedIdentityPrincipalId = value; } /// Internal Acessors for AkAssignedIdentityTenantId - string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal.AkAssignedIdentityTenantId { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)Property).AkAssignedIdentityTenantId; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)Property).AkAssignedIdentityTenantId = value; } + string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal.AkAssignedIdentityTenantId { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)Property).AkAssignedIdentityTenantId; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)Property).AkAssignedIdentityTenantId = value; } /// Internal Acessors for AksAssignedIdentity - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesAksAssignedIdentity Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal.AksAssignedIdentity { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)Property).AksAssignedIdentity; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)Property).AksAssignedIdentity = value; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesAksAssignedIdentity Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal.AksAssignedIdentity { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)Property).AksAssignedIdentity; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)Property).AksAssignedIdentity = value; } /// Internal Acessors for CustomLocationSetting - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesCustomLocationSettings Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal.CustomLocationSetting { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)Property).CustomLocationSetting; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)Property).CustomLocationSetting = value; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesCustomLocationSettings Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal.CustomLocationSetting { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)Property).CustomLocationSetting; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)Property).CustomLocationSetting = value; } /// Internal Acessors for ErrorInfo - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetail Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal.ErrorInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)Property).ErrorInfo; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)Property).ErrorInfo = value; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetail Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal.ErrorInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)Property).ErrorInfo; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)Property).ErrorInfo = value; } /// Internal Acessors for ErrorInfoAdditionalInfo - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorAdditionalInfo[] Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal.ErrorInfoAdditionalInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)Property).ErrorInfoAdditionalInfo; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)Property).ErrorInfoAdditionalInfo = value; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorAdditionalInfo[] Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal.ErrorInfoAdditionalInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)Property).ErrorInfoAdditionalInfo; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)Property).ErrorInfoAdditionalInfo = value; } /// Internal Acessors for ErrorInfoCode - string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal.ErrorInfoCode { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)Property).ErrorInfoCode; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)Property).ErrorInfoCode = value; } + string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal.ErrorInfoCode { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)Property).ErrorInfoCode; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)Property).ErrorInfoCode = value; } /// Internal Acessors for ErrorInfoDetail - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetail[] Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal.ErrorInfoDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)Property).ErrorInfoDetail; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)Property).ErrorInfoDetail = value; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetail[] Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal.ErrorInfoDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)Property).ErrorInfoDetail; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)Property).ErrorInfoDetail = value; } /// Internal Acessors for ErrorInfoMessage - string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal.ErrorInfoMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)Property).ErrorInfoMessage; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)Property).ErrorInfoMessage = value; } + string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal.ErrorInfoMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)Property).ErrorInfoMessage; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)Property).ErrorInfoMessage = value; } /// Internal Acessors for ErrorInfoTarget - string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal.ErrorInfoTarget { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)Property).ErrorInfoTarget; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)Property).ErrorInfoTarget = value; } + string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal.ErrorInfoTarget { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)Property).ErrorInfoTarget; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)Property).ErrorInfoTarget = value; } /// Internal Acessors for Identity - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IIdentity Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal.Identity { get => (this._identity = this._identity ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.Identity()); set { {_identity = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IIdentity Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal.Identity { get => (this._identity = this._identity ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.Identity()); set { {_identity = value;} } } /// Internal Acessors for IdentityPrincipalId - string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal.IdentityPrincipalId { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IIdentityInternal)Identity).PrincipalId; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IIdentityInternal)Identity).PrincipalId = value; } + string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal.IdentityPrincipalId { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IIdentityInternal)Identity).PrincipalId; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IIdentityInternal)Identity).PrincipalId = value; } /// Internal Acessors for IdentityTenantId - string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal.IdentityTenantId { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IIdentityInternal)Identity).TenantId; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IIdentityInternal)Identity).TenantId = value; } + string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal.IdentityTenantId { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IIdentityInternal)Identity).TenantId; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IIdentityInternal)Identity).TenantId = value; } + + /// Internal Acessors for InstalledVersion + string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal.InstalledVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)Property).InstalledVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)Property).InstalledVersion = value; } /// Internal Acessors for PackageUri - string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal.PackageUri { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)Property).PackageUri; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)Property).PackageUri = value; } + string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal.PackageUri { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)Property).PackageUri; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)Property).PackageUri = value; } /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionProperties Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.ExtensionProperties()); set { {_property = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionProperties Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ExtensionProperties()); set { {_property = value;} } } /// Internal Acessors for ProvisioningState - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)Property).ProvisioningState = value; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)Property).ProvisioningState = value; } /// Internal Acessors for Scope - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IScope Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal.Scope { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)Property).Scope; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)Property).Scope = value; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IScope Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal.Scope { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)Property).Scope; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)Property).Scope = value; } /// Internal Acessors for ScopeCluster - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IScopeCluster Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal.ScopeCluster { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)Property).ScopeCluster; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)Property).ScopeCluster = value; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IScopeCluster Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal.ScopeCluster { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)Property).ScopeCluster; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)Property).ScopeCluster = value; } /// Internal Acessors for ScopeNamespace - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IScopeNamespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal.ScopeNamespace { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)Property).ScopeNamespace; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)Property).ScopeNamespace = value; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IScopeNamespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal.ScopeNamespace { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)Property).ScopeNamespace; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)Property).ScopeNamespace = value; } /// Internal Acessors for Statuses - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionStatus[] Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal.Statuses { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)Property).Statuses; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)Property).Statuses = value; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionStatus[] Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal.Statuses { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)Property).Statuses; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)Property).Statuses = value; } /// Internal Acessors for SystemData - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemData Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionInternal.SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.SystemData()); set { {_systemData = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemData Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionInternal.SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.SystemData()); set { {_systemData = value;} } } /// The name of the resource [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inherited)] @@ -212,25 +220,25 @@ public partial class Extension : /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.DoNotFormat] - public string NamespaceTargetNamespace { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)Property).NamespaceTargetNamespace; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)Property).NamespaceTargetNamespace = value ?? null; } + public string NamespaceTargetNamespace { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)Property).NamespaceTargetNamespace; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)Property).NamespaceTargetNamespace = value ?? null; } /// Uri of the Helm package [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.DoNotFormat] - public string PackageUri { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)Property).PackageUri; } + public string PackageUri { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)Property).PackageUri; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionProperties _property; + private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionProperties _property; /// Properties of an Extension resource [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.DoNotFormat] - internal Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.ExtensionProperties()); set => this._property = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ExtensionProperties()); set => this._property = value; } - /// The provisioning state of the extension resource. + /// Status of installation of this extension. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.FormatTable(Index = 3)] - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningState? ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)Property).ProvisioningState; } + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningState? ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)Property).ProvisioningState; } /// /// ReleaseTrain this extension participates in for auto-upgrade (e.g. Stable, Preview, etc.) - only if autoUpgradeMinorVersion @@ -238,16 +246,17 @@ public partial class Extension : /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.FormatTable(Index = 5)] - public string ReleaseTrain { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)Property).ReleaseTrain; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)Property).ReleaseTrain = value ?? null; } + public string ReleaseTrain { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)Property).ReleaseTrain; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)Property).ReleaseTrain = value ?? null; } /// Gets the resource group name [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] - public string ResourceGroupName { get => (new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/").Match(this.Id).Success ? new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/").Match(this.Id).Groups["resourceGroupName"].Value : null); } + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.DoNotFormat] + public string ResourceGroupName { get => (new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Success ? new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Groups["resourceGroupName"].Value : null); } /// Status from this extension. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.DoNotFormat] - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionStatus[] Statuses { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)Property).Statuses; } + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionStatus[] Statuses { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)Property).Statuses; } /// Backing field for property. private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemData _systemData; @@ -297,12 +306,12 @@ public partial class Extension : public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)__resource).Type; } /// - /// Version of the extension for this extension, if it is 'pinned' to a specific version. autoUpgradeMinorVersion must be + /// User-specified version of the extension for this extension to 'pin'. To use 'version', autoUpgradeMinorVersion must be /// 'false'. /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.FormatTable(Index = 2)] - public string Version { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)Property).Version; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal)Property).Version = value ?? null; } + public string Version { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)Property).Version; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)Property).Version = value ?? null; } /// Creates an new instance. public Extension() @@ -314,7 +323,7 @@ public Extension() /// an instance that will receive validation /// events. /// - /// A < see cref = "global::System.Threading.Tasks.Task" /> that will be complete when validation is completed. + /// A that will be complete when validation is completed. /// public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener) { @@ -349,8 +358,8 @@ public partial interface IExtension : ReadOnly = false, Description = @"The identity type.", SerializedName = @"type", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ResourceIdentityType) })] - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ResourceIdentityType? AkAssignedIdentityType { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.AksIdentityType) })] + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.AksIdentityType? AkAssignedIdentityType { get; set; } /// /// Flag to note if this extension participates in auto upgrade of minor version, or not. /// @@ -380,24 +389,24 @@ public partial interface IExtension : ReadOnly = false, Description = @"Configuration settings that are sensitive, as name-value pairs for configuring this extension.", SerializedName = @"configurationProtectedSettings", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesConfigurationProtectedSettings) })] - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesConfigurationProtectedSettings ConfigurationProtectedSetting { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesConfigurationProtectedSettings) })] + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesConfigurationProtectedSettings ConfigurationProtectedSetting { get; set; } /// Configuration settings, as name-value pairs for configuring this extension. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, Description = @"Configuration settings, as name-value pairs for configuring this extension.", SerializedName = @"configurationSettings", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesConfigurationSettings) })] - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesConfigurationSettings ConfigurationSetting { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesConfigurationSettings) })] + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesConfigurationSettings ConfigurationSetting { get; set; } /// Custom Location settings properties. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = true, Description = @"Custom Location settings properties.", SerializedName = @"customLocationSettings", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesCustomLocationSettings) })] - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesCustomLocationSettings CustomLocationSetting { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesCustomLocationSettings) })] + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesCustomLocationSettings CustomLocationSetting { get; } /// The error additional info. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, @@ -473,6 +482,14 @@ public partial interface IExtension : SerializedName = @"type", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ResourceIdentityType) })] Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ResourceIdentityType? IdentityType { get; set; } + /// Installed version of the extension. + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Installed version of the extension.", + SerializedName = @"installedVersion", + PossibleTypes = new [] { typeof(string) })] + string InstalledVersion { get; } /// /// Namespace where the extension will be created for an Namespace scoped extension. If this namespace does not exist, it /// will be created @@ -492,11 +509,11 @@ public partial interface IExtension : SerializedName = @"packageUri", PossibleTypes = new [] { typeof(string) })] string PackageUri { get; } - /// The provisioning state of the extension resource. + /// Status of installation of this extension. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = true, - Description = @"The provisioning state of the extension resource.", + Description = @"Status of installation of this extension.", SerializedName = @"provisioningState", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningState) })] Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningState? ProvisioningState { get; } @@ -517,8 +534,8 @@ public partial interface IExtension : ReadOnly = true, Description = @"Status from this extension.", SerializedName = @"statuses", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionStatus) })] - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionStatus[] Statuses { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionStatus) })] + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionStatus[] Statuses { get; } /// The timestamp of resource creation (UTC). [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, @@ -568,13 +585,13 @@ public partial interface IExtension : PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.CreatedByType) })] Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.CreatedByType? SystemDataLastModifiedByType { get; set; } /// - /// Version of the extension for this extension, if it is 'pinned' to a specific version. autoUpgradeMinorVersion must be + /// User-specified version of the extension for this extension to 'pin'. To use 'version', autoUpgradeMinorVersion must be /// 'false'. /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, - Description = @"Version of the extension for this extension, if it is 'pinned' to a specific version. autoUpgradeMinorVersion must be 'false'.", + Description = @"User-specified version of the extension for this extension to 'pin'. To use 'version', autoUpgradeMinorVersion must be 'false'.", SerializedName = @"version", PossibleTypes = new [] { typeof(string) })] string Version { get; set; } @@ -589,9 +606,9 @@ internal partial interface IExtensionInternal : /// The tenant ID of resource. string AkAssignedIdentityTenantId { get; set; } /// The identity type. - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ResourceIdentityType? AkAssignedIdentityType { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.AksIdentityType? AkAssignedIdentityType { get; set; } /// Identity of the Extension resource in an AKS cluster - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesAksAssignedIdentity AksAssignedIdentity { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesAksAssignedIdentity AksAssignedIdentity { get; set; } /// /// Flag to note if this extension participates in auto upgrade of minor version, or not. /// @@ -604,12 +621,12 @@ internal partial interface IExtensionInternal : /// /// Configuration settings that are sensitive, as name-value pairs for configuring this extension. /// - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesConfigurationProtectedSettings ConfigurationProtectedSetting { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesConfigurationProtectedSettings ConfigurationProtectedSetting { get; set; } /// Configuration settings, as name-value pairs for configuring this extension. - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesConfigurationSettings ConfigurationSetting { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesConfigurationSettings ConfigurationSetting { get; set; } /// Custom Location settings properties. - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesCustomLocationSettings CustomLocationSetting { get; set; } - /// The error detail. + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesCustomLocationSettings CustomLocationSetting { get; set; } + /// Error information from the Agent - e.g. errors during installation. Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetail ErrorInfo { get; set; } /// The error additional info. Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorAdditionalInfo[] ErrorInfoAdditionalInfo { get; set; } @@ -634,6 +651,8 @@ internal partial interface IExtensionInternal : string IdentityTenantId { get; set; } /// The identity type. Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ResourceIdentityType? IdentityType { get; set; } + /// Installed version of the extension. + string InstalledVersion { get; set; } /// /// Namespace where the extension will be created for an Namespace scoped extension. If this namespace does not exist, it /// will be created @@ -642,8 +661,8 @@ internal partial interface IExtensionInternal : /// Uri of the Helm package string PackageUri { get; set; } /// Properties of an Extension resource - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionProperties Property { get; set; } - /// The provisioning state of the extension resource. + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionProperties Property { get; set; } + /// Status of installation of this extension. Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningState? ProvisioningState { get; set; } /// /// ReleaseTrain this extension participates in for auto-upgrade (e.g. Stable, Preview, etc.) - only if autoUpgradeMinorVersion @@ -651,13 +670,13 @@ internal partial interface IExtensionInternal : /// string ReleaseTrain { get; set; } /// Scope at which the extension is installed. - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IScope Scope { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IScope Scope { get; set; } /// Specifies that the scope of the extension is Cluster - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IScopeCluster ScopeCluster { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IScopeCluster ScopeCluster { get; set; } /// Specifies that the scope of the extension is Namespace - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IScopeNamespace ScopeNamespace { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IScopeNamespace ScopeNamespace { get; set; } /// Status from this extension. - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionStatus[] Statuses { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionStatus[] Statuses { get; set; } /// /// Top level metadata https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/common-api-contracts.md#system-metadata-for-all-azure-resources /// @@ -675,7 +694,7 @@ internal partial interface IExtensionInternal : /// The type of identity that last modified the resource. Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.CreatedByType? SystemDataLastModifiedByType { get; set; } /// - /// Version of the extension for this extension, if it is 'pinned' to a specific version. autoUpgradeMinorVersion must be + /// User-specified version of the extension for this extension to 'pin'. To use 'version', autoUpgradeMinorVersion must be /// 'false'. /// string Version { get; set; } diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20210901/Extension.json.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/Extension.json.cs similarity index 92% rename from src/KubernetesConfiguration/generated/api/Models/Api20210901/Extension.json.cs rename to src/KubernetesConfiguration/generated/api/Models/Api20220301/Extension.json.cs index 6a08c06669e9..203710ebd452 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Api20210901/Extension.json.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/Extension.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; @@ -20,7 +20,7 @@ public partial class Extension partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class Extension /// /// 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. + /// 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. @@ -42,7 +43,8 @@ public partial class Extension /// /// 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. + /// 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. @@ -64,20 +66,20 @@ internal Extension(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Ru return; } __resource = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.Resource(json); - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.ExtensionProperties.FromJson(__jsonProperties) : Property;} + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ExtensionProperties.FromJson(__jsonProperties) : Property;} {_identity = If( json?.PropertyT("identity"), out var __jsonIdentity) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.Identity.FromJson(__jsonIdentity) : Identity;} {_systemData = If( json?.PropertyT("systemData"), out var __jsonSystemData) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.SystemData.FromJson(__jsonSystemData) : SystemData;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtension. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtension. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtension. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtension. /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtension FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtension FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json ? new Extension(json) : null; } diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20220301/ExtensionProperties.PowerShell.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/ExtensionProperties.PowerShell.cs new file mode 100644 index 000000000000..5159716856d7 --- /dev/null +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/ExtensionProperties.PowerShell.cs @@ -0,0 +1,366 @@ +// 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.KubernetesConfiguration.Models.Api20220301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; + + /// Properties of an Extension resource + [System.ComponentModel.TypeConverter(typeof(ExtensionPropertiesTypeConverter))] + public partial class ExtensionProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ExtensionProperties(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.KubernetesConfiguration.Models.Api20220301.IExtensionProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ExtensionProperties(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ExtensionProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Scope")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)this).Scope = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IScope) content.GetValueForProperty("Scope",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)this).Scope, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ScopeTypeConverter.ConvertFrom); + } + if (content.Contains("ErrorInfo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)this).ErrorInfo = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetail) content.GetValueForProperty("ErrorInfo",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)this).ErrorInfo, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorDetailTypeConverter.ConvertFrom); + } + if (content.Contains("AksAssignedIdentity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)this).AksAssignedIdentity = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesAksAssignedIdentity) content.GetValueForProperty("AksAssignedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)this).AksAssignedIdentity, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ExtensionPropertiesAksAssignedIdentityTypeConverter.ConvertFrom); + } + if (content.Contains("ExtensionType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)this).ExtensionType = (string) content.GetValueForProperty("ExtensionType",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)this).ExtensionType, global::System.Convert.ToString); + } + if (content.Contains("AutoUpgradeMinorVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)this).AutoUpgradeMinorVersion = (bool?) content.GetValueForProperty("AutoUpgradeMinorVersion",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)this).AutoUpgradeMinorVersion, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ReleaseTrain")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)this).ReleaseTrain = (string) content.GetValueForProperty("ReleaseTrain",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)this).ReleaseTrain, global::System.Convert.ToString); + } + if (content.Contains("Version")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)this).Version = (string) content.GetValueForProperty("Version",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)this).Version, global::System.Convert.ToString); + } + if (content.Contains("ConfigurationSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)this).ConfigurationSetting = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesConfigurationSettings) content.GetValueForProperty("ConfigurationSetting",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)this).ConfigurationSetting, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ExtensionPropertiesConfigurationSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("ConfigurationProtectedSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)this).ConfigurationProtectedSetting = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesConfigurationProtectedSettings) content.GetValueForProperty("ConfigurationProtectedSetting",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)this).ConfigurationProtectedSetting, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ExtensionPropertiesConfigurationProtectedSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("InstalledVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)this).InstalledVersion = (string) content.GetValueForProperty("InstalledVersion",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)this).InstalledVersion, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningState.CreateFrom); + } + if (content.Contains("Statuses")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)this).Statuses = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionStatus[]) content.GetValueForProperty("Statuses",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)this).Statuses, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ExtensionStatusTypeConverter.ConvertFrom)); + } + if (content.Contains("CustomLocationSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)this).CustomLocationSetting = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesCustomLocationSettings) content.GetValueForProperty("CustomLocationSetting",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)this).CustomLocationSetting, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ExtensionPropertiesCustomLocationSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("PackageUri")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)this).PackageUri = (string) content.GetValueForProperty("PackageUri",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)this).PackageUri, global::System.Convert.ToString); + } + if (content.Contains("ScopeCluster")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)this).ScopeCluster = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IScopeCluster) content.GetValueForProperty("ScopeCluster",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)this).ScopeCluster, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ScopeClusterTypeConverter.ConvertFrom); + } + if (content.Contains("ScopeNamespace")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)this).ScopeNamespace = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IScopeNamespace) content.GetValueForProperty("ScopeNamespace",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)this).ScopeNamespace, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ScopeNamespaceTypeConverter.ConvertFrom); + } + if (content.Contains("ClusterReleaseNamespace")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)this).ClusterReleaseNamespace = (string) content.GetValueForProperty("ClusterReleaseNamespace",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)this).ClusterReleaseNamespace, global::System.Convert.ToString); + } + if (content.Contains("NamespaceTargetNamespace")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)this).NamespaceTargetNamespace = (string) content.GetValueForProperty("NamespaceTargetNamespace",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)this).NamespaceTargetNamespace, global::System.Convert.ToString); + } + if (content.Contains("ErrorInfoCode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)this).ErrorInfoCode = (string) content.GetValueForProperty("ErrorInfoCode",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)this).ErrorInfoCode, global::System.Convert.ToString); + } + if (content.Contains("ErrorInfoMessage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)this).ErrorInfoMessage = (string) content.GetValueForProperty("ErrorInfoMessage",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)this).ErrorInfoMessage, global::System.Convert.ToString); + } + if (content.Contains("ErrorInfoTarget")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)this).ErrorInfoTarget = (string) content.GetValueForProperty("ErrorInfoTarget",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)this).ErrorInfoTarget, global::System.Convert.ToString); + } + if (content.Contains("ErrorInfoDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)this).ErrorInfoDetail = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetail[]) content.GetValueForProperty("ErrorInfoDetail",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)this).ErrorInfoDetail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorDetailTypeConverter.ConvertFrom)); + } + if (content.Contains("ErrorInfoAdditionalInfo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)this).ErrorInfoAdditionalInfo = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorAdditionalInfo[]) content.GetValueForProperty("ErrorInfoAdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)this).ErrorInfoAdditionalInfo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorAdditionalInfoTypeConverter.ConvertFrom)); + } + if (content.Contains("AkAssignedIdentityPrincipalId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)this).AkAssignedIdentityPrincipalId = (string) content.GetValueForProperty("AkAssignedIdentityPrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)this).AkAssignedIdentityPrincipalId, global::System.Convert.ToString); + } + if (content.Contains("AkAssignedIdentityTenantId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)this).AkAssignedIdentityTenantId = (string) content.GetValueForProperty("AkAssignedIdentityTenantId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)this).AkAssignedIdentityTenantId, global::System.Convert.ToString); + } + if (content.Contains("AkAssignedIdentityType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)this).AkAssignedIdentityType = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.AksIdentityType?) content.GetValueForProperty("AkAssignedIdentityType",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)this).AkAssignedIdentityType, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.AksIdentityType.CreateFrom); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ExtensionProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Scope")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)this).Scope = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IScope) content.GetValueForProperty("Scope",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)this).Scope, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ScopeTypeConverter.ConvertFrom); + } + if (content.Contains("ErrorInfo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)this).ErrorInfo = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetail) content.GetValueForProperty("ErrorInfo",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)this).ErrorInfo, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorDetailTypeConverter.ConvertFrom); + } + if (content.Contains("AksAssignedIdentity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)this).AksAssignedIdentity = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesAksAssignedIdentity) content.GetValueForProperty("AksAssignedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)this).AksAssignedIdentity, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ExtensionPropertiesAksAssignedIdentityTypeConverter.ConvertFrom); + } + if (content.Contains("ExtensionType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)this).ExtensionType = (string) content.GetValueForProperty("ExtensionType",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)this).ExtensionType, global::System.Convert.ToString); + } + if (content.Contains("AutoUpgradeMinorVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)this).AutoUpgradeMinorVersion = (bool?) content.GetValueForProperty("AutoUpgradeMinorVersion",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)this).AutoUpgradeMinorVersion, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ReleaseTrain")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)this).ReleaseTrain = (string) content.GetValueForProperty("ReleaseTrain",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)this).ReleaseTrain, global::System.Convert.ToString); + } + if (content.Contains("Version")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)this).Version = (string) content.GetValueForProperty("Version",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)this).Version, global::System.Convert.ToString); + } + if (content.Contains("ConfigurationSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)this).ConfigurationSetting = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesConfigurationSettings) content.GetValueForProperty("ConfigurationSetting",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)this).ConfigurationSetting, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ExtensionPropertiesConfigurationSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("ConfigurationProtectedSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)this).ConfigurationProtectedSetting = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesConfigurationProtectedSettings) content.GetValueForProperty("ConfigurationProtectedSetting",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)this).ConfigurationProtectedSetting, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ExtensionPropertiesConfigurationProtectedSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("InstalledVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)this).InstalledVersion = (string) content.GetValueForProperty("InstalledVersion",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)this).InstalledVersion, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningState.CreateFrom); + } + if (content.Contains("Statuses")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)this).Statuses = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionStatus[]) content.GetValueForProperty("Statuses",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)this).Statuses, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ExtensionStatusTypeConverter.ConvertFrom)); + } + if (content.Contains("CustomLocationSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)this).CustomLocationSetting = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesCustomLocationSettings) content.GetValueForProperty("CustomLocationSetting",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)this).CustomLocationSetting, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ExtensionPropertiesCustomLocationSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("PackageUri")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)this).PackageUri = (string) content.GetValueForProperty("PackageUri",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)this).PackageUri, global::System.Convert.ToString); + } + if (content.Contains("ScopeCluster")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)this).ScopeCluster = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IScopeCluster) content.GetValueForProperty("ScopeCluster",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)this).ScopeCluster, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ScopeClusterTypeConverter.ConvertFrom); + } + if (content.Contains("ScopeNamespace")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)this).ScopeNamespace = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IScopeNamespace) content.GetValueForProperty("ScopeNamespace",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)this).ScopeNamespace, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ScopeNamespaceTypeConverter.ConvertFrom); + } + if (content.Contains("ClusterReleaseNamespace")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)this).ClusterReleaseNamespace = (string) content.GetValueForProperty("ClusterReleaseNamespace",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)this).ClusterReleaseNamespace, global::System.Convert.ToString); + } + if (content.Contains("NamespaceTargetNamespace")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)this).NamespaceTargetNamespace = (string) content.GetValueForProperty("NamespaceTargetNamespace",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)this).NamespaceTargetNamespace, global::System.Convert.ToString); + } + if (content.Contains("ErrorInfoCode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)this).ErrorInfoCode = (string) content.GetValueForProperty("ErrorInfoCode",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)this).ErrorInfoCode, global::System.Convert.ToString); + } + if (content.Contains("ErrorInfoMessage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)this).ErrorInfoMessage = (string) content.GetValueForProperty("ErrorInfoMessage",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)this).ErrorInfoMessage, global::System.Convert.ToString); + } + if (content.Contains("ErrorInfoTarget")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)this).ErrorInfoTarget = (string) content.GetValueForProperty("ErrorInfoTarget",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)this).ErrorInfoTarget, global::System.Convert.ToString); + } + if (content.Contains("ErrorInfoDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)this).ErrorInfoDetail = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetail[]) content.GetValueForProperty("ErrorInfoDetail",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)this).ErrorInfoDetail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorDetailTypeConverter.ConvertFrom)); + } + if (content.Contains("ErrorInfoAdditionalInfo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)this).ErrorInfoAdditionalInfo = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorAdditionalInfo[]) content.GetValueForProperty("ErrorInfoAdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)this).ErrorInfoAdditionalInfo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorAdditionalInfoTypeConverter.ConvertFrom)); + } + if (content.Contains("AkAssignedIdentityPrincipalId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)this).AkAssignedIdentityPrincipalId = (string) content.GetValueForProperty("AkAssignedIdentityPrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)this).AkAssignedIdentityPrincipalId, global::System.Convert.ToString); + } + if (content.Contains("AkAssignedIdentityTenantId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)this).AkAssignedIdentityTenantId = (string) content.GetValueForProperty("AkAssignedIdentityTenantId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)this).AkAssignedIdentityTenantId, global::System.Convert.ToString); + } + if (content.Contains("AkAssignedIdentityType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)this).AkAssignedIdentityType = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.AksIdentityType?) content.GetValueForProperty("AkAssignedIdentityType",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal)this).AkAssignedIdentityType, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.AksIdentityType.CreateFrom); + } + 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.KubernetesConfiguration.Models.Api20220301.IExtensionProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Properties of an Extension resource + [System.ComponentModel.TypeConverter(typeof(ExtensionPropertiesTypeConverter))] + public partial interface IExtensionProperties + + { + + } +} \ No newline at end of file diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20210901/ExtensionProperties.TypeConverter.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/ExtensionProperties.TypeConverter.cs similarity index 82% rename from src/KubernetesConfiguration/generated/api/Models/Api20210901/ExtensionProperties.TypeConverter.cs rename to src/KubernetesConfiguration/generated/api/Models/Api20220301/ExtensionProperties.TypeConverter.cs index 5c2e4fc1e281..014e5bf222b6 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Api20210901/ExtensionProperties.TypeConverter.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/ExtensionProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; @@ -14,20 +14,20 @@ public partial class ExtensionPropertiesTypeConverter : global::System.Managemen { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// 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. + /// 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. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +75,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// 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 + /// 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 + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,21 +100,20 @@ public static bool CanConvertFrom(dynamic sourceValue) 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 + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20210901/ExtensionProperties.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/ExtensionProperties.cs similarity index 80% rename from src/KubernetesConfiguration/generated/api/Models/Api20210901/ExtensionProperties.cs rename to src/KubernetesConfiguration/generated/api/Models/Api20220301/ExtensionProperties.cs index 48ba8d913b53..afbb3b5ca087 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Api20210901/ExtensionProperties.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/ExtensionProperties.cs @@ -3,34 +3,34 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; /// Properties of an Extension resource public partial class ExtensionProperties : - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionProperties, - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionProperties, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal { /// The principal ID of resource identity. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string AkAssignedIdentityPrincipalId { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesAksAssignedIdentityInternal)AksAssignedIdentity).PrincipalId; } + public string AkAssignedIdentityPrincipalId { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesAksAssignedIdentityInternal)AksAssignedIdentity).PrincipalId; } /// The tenant ID of resource. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string AkAssignedIdentityTenantId { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesAksAssignedIdentityInternal)AksAssignedIdentity).TenantId; } + public string AkAssignedIdentityTenantId { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesAksAssignedIdentityInternal)AksAssignedIdentity).TenantId; } /// The identity type. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ResourceIdentityType? AkAssignedIdentityType { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesAksAssignedIdentityInternal)AksAssignedIdentity).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesAksAssignedIdentityInternal)AksAssignedIdentity).Type = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ResourceIdentityType)""); } + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.AksIdentityType? AkAssignedIdentityType { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesAksAssignedIdentityInternal)AksAssignedIdentity).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesAksAssignedIdentityInternal)AksAssignedIdentity).Type = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.AksIdentityType)""); } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesAksAssignedIdentity _aksAssignedIdentity; + private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesAksAssignedIdentity _aksAssignedIdentity; /// Identity of the Extension resource in an AKS cluster [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesAksAssignedIdentity AksAssignedIdentity { get => (this._aksAssignedIdentity = this._aksAssignedIdentity ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.ExtensionPropertiesAksAssignedIdentity()); set => this._aksAssignedIdentity = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesAksAssignedIdentity AksAssignedIdentity { get => (this._aksAssignedIdentity = this._aksAssignedIdentity ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ExtensionPropertiesAksAssignedIdentity()); set => this._aksAssignedIdentity = value; } /// Backing field for property. private bool? _autoUpgradeMinorVersion; @@ -46,37 +46,37 @@ public partial class ExtensionProperties : /// it will be created /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string ClusterReleaseNamespace { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IScopeInternal)Scope).ClusterReleaseNamespace; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IScopeInternal)Scope).ClusterReleaseNamespace = value ?? null; } + public string ClusterReleaseNamespace { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IScopeInternal)Scope).ClusterReleaseNamespace; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IScopeInternal)Scope).ClusterReleaseNamespace = value ?? null; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesConfigurationProtectedSettings _configurationProtectedSetting; + private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesConfigurationProtectedSettings _configurationProtectedSetting; /// /// Configuration settings that are sensitive, as name-value pairs for configuring this extension. /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesConfigurationProtectedSettings ConfigurationProtectedSetting { get => (this._configurationProtectedSetting = this._configurationProtectedSetting ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.ExtensionPropertiesConfigurationProtectedSettings()); set => this._configurationProtectedSetting = value; } + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesConfigurationProtectedSettings ConfigurationProtectedSetting { get => (this._configurationProtectedSetting = this._configurationProtectedSetting ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ExtensionPropertiesConfigurationProtectedSettings()); set => this._configurationProtectedSetting = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesConfigurationSettings _configurationSetting; + private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesConfigurationSettings _configurationSetting; /// Configuration settings, as name-value pairs for configuring this extension. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesConfigurationSettings ConfigurationSetting { get => (this._configurationSetting = this._configurationSetting ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.ExtensionPropertiesConfigurationSettings()); set => this._configurationSetting = value; } + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesConfigurationSettings ConfigurationSetting { get => (this._configurationSetting = this._configurationSetting ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ExtensionPropertiesConfigurationSettings()); set => this._configurationSetting = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesCustomLocationSettings _customLocationSetting; + private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesCustomLocationSettings _customLocationSetting; /// Custom Location settings properties. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesCustomLocationSettings CustomLocationSetting { get => (this._customLocationSetting = this._customLocationSetting ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.ExtensionPropertiesCustomLocationSettings()); } + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesCustomLocationSettings CustomLocationSetting { get => (this._customLocationSetting = this._customLocationSetting ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ExtensionPropertiesCustomLocationSettings()); } /// Backing field for property. private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetail _errorInfo; - /// The error detail. + /// Error information from the Agent - e.g. errors during installation. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetail ErrorInfo { get => (this._errorInfo = this._errorInfo ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorDetail()); set => this._errorInfo = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetail ErrorInfo { get => (this._errorInfo = this._errorInfo ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorDetail()); } /// The error additional info. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] @@ -108,60 +108,70 @@ public partial class ExtensionProperties : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] public string ExtensionType { get => this._extensionType; set => this._extensionType = value; } + /// Backing field for property. + private string _installedVersion; + + /// Installed version of the extension. + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] + public string InstalledVersion { get => this._installedVersion; } + /// Internal Acessors for AkAssignedIdentityPrincipalId - string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal.AkAssignedIdentityPrincipalId { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesAksAssignedIdentityInternal)AksAssignedIdentity).PrincipalId; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesAksAssignedIdentityInternal)AksAssignedIdentity).PrincipalId = value; } + string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal.AkAssignedIdentityPrincipalId { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesAksAssignedIdentityInternal)AksAssignedIdentity).PrincipalId; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesAksAssignedIdentityInternal)AksAssignedIdentity).PrincipalId = value; } /// Internal Acessors for AkAssignedIdentityTenantId - string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal.AkAssignedIdentityTenantId { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesAksAssignedIdentityInternal)AksAssignedIdentity).TenantId; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesAksAssignedIdentityInternal)AksAssignedIdentity).TenantId = value; } + string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal.AkAssignedIdentityTenantId { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesAksAssignedIdentityInternal)AksAssignedIdentity).TenantId; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesAksAssignedIdentityInternal)AksAssignedIdentity).TenantId = value; } /// Internal Acessors for AksAssignedIdentity - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesAksAssignedIdentity Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal.AksAssignedIdentity { get => (this._aksAssignedIdentity = this._aksAssignedIdentity ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.ExtensionPropertiesAksAssignedIdentity()); set { {_aksAssignedIdentity = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesAksAssignedIdentity Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal.AksAssignedIdentity { get => (this._aksAssignedIdentity = this._aksAssignedIdentity ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ExtensionPropertiesAksAssignedIdentity()); set { {_aksAssignedIdentity = value;} } } /// Internal Acessors for CustomLocationSetting - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesCustomLocationSettings Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal.CustomLocationSetting { get => (this._customLocationSetting = this._customLocationSetting ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.ExtensionPropertiesCustomLocationSettings()); set { {_customLocationSetting = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesCustomLocationSettings Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal.CustomLocationSetting { get => (this._customLocationSetting = this._customLocationSetting ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ExtensionPropertiesCustomLocationSettings()); set { {_customLocationSetting = value;} } } /// Internal Acessors for ErrorInfo - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetail Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal.ErrorInfo { get => (this._errorInfo = this._errorInfo ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorDetail()); set { {_errorInfo = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetail Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal.ErrorInfo { get => (this._errorInfo = this._errorInfo ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorDetail()); set { {_errorInfo = value;} } } /// Internal Acessors for ErrorInfoAdditionalInfo - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorAdditionalInfo[] Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal.ErrorInfoAdditionalInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)ErrorInfo).AdditionalInfo; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)ErrorInfo).AdditionalInfo = value; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorAdditionalInfo[] Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal.ErrorInfoAdditionalInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)ErrorInfo).AdditionalInfo; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)ErrorInfo).AdditionalInfo = value; } /// Internal Acessors for ErrorInfoCode - string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal.ErrorInfoCode { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)ErrorInfo).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)ErrorInfo).Code = value; } + string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal.ErrorInfoCode { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)ErrorInfo).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)ErrorInfo).Code = value; } /// Internal Acessors for ErrorInfoDetail - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetail[] Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal.ErrorInfoDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)ErrorInfo).Detail; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)ErrorInfo).Detail = value; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetail[] Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal.ErrorInfoDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)ErrorInfo).Detail; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)ErrorInfo).Detail = value; } /// Internal Acessors for ErrorInfoMessage - string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal.ErrorInfoMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)ErrorInfo).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)ErrorInfo).Message = value; } + string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal.ErrorInfoMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)ErrorInfo).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)ErrorInfo).Message = value; } /// Internal Acessors for ErrorInfoTarget - string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal.ErrorInfoTarget { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)ErrorInfo).Target; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)ErrorInfo).Target = value; } + string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal.ErrorInfoTarget { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)ErrorInfo).Target; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)ErrorInfo).Target = value; } + + /// Internal Acessors for InstalledVersion + string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal.InstalledVersion { get => this._installedVersion; set { {_installedVersion = value;} } } /// Internal Acessors for PackageUri - string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal.PackageUri { get => this._packageUri; set { {_packageUri = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal.PackageUri { get => this._packageUri; set { {_packageUri = value;} } } /// Internal Acessors for ProvisioningState - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } /// Internal Acessors for Scope - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IScope Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal.Scope { get => (this._scope = this._scope ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.Scope()); set { {_scope = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IScope Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal.Scope { get => (this._scope = this._scope ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.Scope()); set { {_scope = value;} } } /// Internal Acessors for ScopeCluster - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IScopeCluster Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal.ScopeCluster { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IScopeInternal)Scope).Cluster; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IScopeInternal)Scope).Cluster = value; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IScopeCluster Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal.ScopeCluster { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IScopeInternal)Scope).Cluster; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IScopeInternal)Scope).Cluster = value; } /// Internal Acessors for ScopeNamespace - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IScopeNamespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal.ScopeNamespace { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IScopeInternal)Scope).Namespace; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IScopeInternal)Scope).Namespace = value; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IScopeNamespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal.ScopeNamespace { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IScopeInternal)Scope).Namespace; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IScopeInternal)Scope).Namespace = value; } /// Internal Acessors for Statuses - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionStatus[] Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesInternal.Statuses { get => this._statuses; set { {_statuses = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionStatus[] Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesInternal.Statuses { get => this._statuses; set { {_statuses = value;} } } /// /// Namespace where the extension will be created for an Namespace scoped extension. If this namespace does not exist, it /// will be created /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string NamespaceTargetNamespace { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IScopeInternal)Scope).NamespaceTargetNamespace; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IScopeInternal)Scope).NamespaceTargetNamespace = value ?? null; } + public string NamespaceTargetNamespace { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IScopeInternal)Scope).NamespaceTargetNamespace; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IScopeInternal)Scope).NamespaceTargetNamespace = value ?? null; } /// Backing field for property. private string _packageUri; @@ -173,7 +183,7 @@ public partial class ExtensionProperties : /// Backing field for property. private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningState? _provisioningState; - /// The provisioning state of the extension resource. + /// Status of installation of this extension. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningState? ProvisioningState { get => this._provisioningState; } @@ -188,24 +198,24 @@ public partial class ExtensionProperties : public string ReleaseTrain { get => this._releaseTrain; set => this._releaseTrain = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IScope _scope; + private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IScope _scope; /// Scope at which the extension is installed. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IScope Scope { get => (this._scope = this._scope ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.Scope()); set => this._scope = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IScope Scope { get => (this._scope = this._scope ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.Scope()); set => this._scope = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionStatus[] _statuses; + private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionStatus[] _statuses; /// Status from this extension. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionStatus[] Statuses { get => this._statuses; } + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionStatus[] Statuses { get => this._statuses; } /// Backing field for property. private string _version; /// - /// Version of the extension for this extension, if it is 'pinned' to a specific version. autoUpgradeMinorVersion must be + /// User-specified version of the extension for this extension to 'pin'. To use 'version', autoUpgradeMinorVersion must be /// 'false'. /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] @@ -243,8 +253,8 @@ public partial interface IExtensionProperties : ReadOnly = false, Description = @"The identity type.", SerializedName = @"type", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ResourceIdentityType) })] - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ResourceIdentityType? AkAssignedIdentityType { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.AksIdentityType) })] + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.AksIdentityType? AkAssignedIdentityType { get; set; } /// /// Flag to note if this extension participates in auto upgrade of minor version, or not. /// @@ -274,24 +284,24 @@ public partial interface IExtensionProperties : ReadOnly = false, Description = @"Configuration settings that are sensitive, as name-value pairs for configuring this extension.", SerializedName = @"configurationProtectedSettings", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesConfigurationProtectedSettings) })] - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesConfigurationProtectedSettings ConfigurationProtectedSetting { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesConfigurationProtectedSettings) })] + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesConfigurationProtectedSettings ConfigurationProtectedSetting { get; set; } /// Configuration settings, as name-value pairs for configuring this extension. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, Description = @"Configuration settings, as name-value pairs for configuring this extension.", SerializedName = @"configurationSettings", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesConfigurationSettings) })] - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesConfigurationSettings ConfigurationSetting { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesConfigurationSettings) })] + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesConfigurationSettings ConfigurationSetting { get; set; } /// Custom Location settings properties. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = true, Description = @"Custom Location settings properties.", SerializedName = @"customLocationSettings", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesCustomLocationSettings) })] - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesCustomLocationSettings CustomLocationSetting { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesCustomLocationSettings) })] + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesCustomLocationSettings CustomLocationSetting { get; } /// The error additional info. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, @@ -343,6 +353,14 @@ public partial interface IExtensionProperties : SerializedName = @"extensionType", PossibleTypes = new [] { typeof(string) })] string ExtensionType { get; set; } + /// Installed version of the extension. + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Installed version of the extension.", + SerializedName = @"installedVersion", + PossibleTypes = new [] { typeof(string) })] + string InstalledVersion { get; } /// /// Namespace where the extension will be created for an Namespace scoped extension. If this namespace does not exist, it /// will be created @@ -362,11 +380,11 @@ public partial interface IExtensionProperties : SerializedName = @"packageUri", PossibleTypes = new [] { typeof(string) })] string PackageUri { get; } - /// The provisioning state of the extension resource. + /// Status of installation of this extension. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = true, - Description = @"The provisioning state of the extension resource.", + Description = @"Status of installation of this extension.", SerializedName = @"provisioningState", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningState) })] Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningState? ProvisioningState { get; } @@ -387,16 +405,16 @@ public partial interface IExtensionProperties : ReadOnly = true, Description = @"Status from this extension.", SerializedName = @"statuses", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionStatus) })] - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionStatus[] Statuses { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionStatus) })] + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionStatus[] Statuses { get; } /// - /// Version of the extension for this extension, if it is 'pinned' to a specific version. autoUpgradeMinorVersion must be + /// User-specified version of the extension for this extension to 'pin'. To use 'version', autoUpgradeMinorVersion must be /// 'false'. /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, - Description = @"Version of the extension for this extension, if it is 'pinned' to a specific version. autoUpgradeMinorVersion must be 'false'.", + Description = @"User-specified version of the extension for this extension to 'pin'. To use 'version', autoUpgradeMinorVersion must be 'false'.", SerializedName = @"version", PossibleTypes = new [] { typeof(string) })] string Version { get; set; } @@ -411,9 +429,9 @@ internal partial interface IExtensionPropertiesInternal /// The tenant ID of resource. string AkAssignedIdentityTenantId { get; set; } /// The identity type. - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ResourceIdentityType? AkAssignedIdentityType { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.AksIdentityType? AkAssignedIdentityType { get; set; } /// Identity of the Extension resource in an AKS cluster - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesAksAssignedIdentity AksAssignedIdentity { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesAksAssignedIdentity AksAssignedIdentity { get; set; } /// /// Flag to note if this extension participates in auto upgrade of minor version, or not. /// @@ -426,12 +444,12 @@ internal partial interface IExtensionPropertiesInternal /// /// Configuration settings that are sensitive, as name-value pairs for configuring this extension. /// - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesConfigurationProtectedSettings ConfigurationProtectedSetting { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesConfigurationProtectedSettings ConfigurationProtectedSetting { get; set; } /// Configuration settings, as name-value pairs for configuring this extension. - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesConfigurationSettings ConfigurationSetting { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesConfigurationSettings ConfigurationSetting { get; set; } /// Custom Location settings properties. - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesCustomLocationSettings CustomLocationSetting { get; set; } - /// The error detail. + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesCustomLocationSettings CustomLocationSetting { get; set; } + /// Error information from the Agent - e.g. errors during installation. Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetail ErrorInfo { get; set; } /// The error additional info. Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorAdditionalInfo[] ErrorInfoAdditionalInfo { get; set; } @@ -448,6 +466,8 @@ internal partial interface IExtensionPropertiesInternal /// Microsoft.KubernetesConfiguration by the Extension publisher. /// string ExtensionType { get; set; } + /// Installed version of the extension. + string InstalledVersion { get; set; } /// /// Namespace where the extension will be created for an Namespace scoped extension. If this namespace does not exist, it /// will be created @@ -455,7 +475,7 @@ internal partial interface IExtensionPropertiesInternal string NamespaceTargetNamespace { get; set; } /// Uri of the Helm package string PackageUri { get; set; } - /// The provisioning state of the extension resource. + /// Status of installation of this extension. Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningState? ProvisioningState { get; set; } /// /// ReleaseTrain this extension participates in for auto-upgrade (e.g. Stable, Preview, etc.) - only if autoUpgradeMinorVersion @@ -463,15 +483,15 @@ internal partial interface IExtensionPropertiesInternal /// string ReleaseTrain { get; set; } /// Scope at which the extension is installed. - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IScope Scope { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IScope Scope { get; set; } /// Specifies that the scope of the extension is Cluster - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IScopeCluster ScopeCluster { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IScopeCluster ScopeCluster { get; set; } /// Specifies that the scope of the extension is Namespace - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IScopeNamespace ScopeNamespace { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IScopeNamespace ScopeNamespace { get; set; } /// Status from this extension. - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionStatus[] Statuses { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionStatus[] Statuses { get; set; } /// - /// Version of the extension for this extension, if it is 'pinned' to a specific version. autoUpgradeMinorVersion must be + /// User-specified version of the extension for this extension to 'pin'. To use 'version', autoUpgradeMinorVersion must be /// 'false'. /// string Version { get; set; } diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20210901/ExtensionProperties.json.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/ExtensionProperties.json.cs similarity index 85% rename from src/KubernetesConfiguration/generated/api/Models/Api20210901/ExtensionProperties.json.cs rename to src/KubernetesConfiguration/generated/api/Models/Api20220301/ExtensionProperties.json.cs index e7f4b7d63487..f92968434a20 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Api20210901/ExtensionProperties.json.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/ExtensionProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; @@ -20,7 +20,7 @@ public partial class ExtensionProperties partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class ExtensionProperties /// /// 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. + /// 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. @@ -42,7 +43,8 @@ public partial class ExtensionProperties /// /// 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. + /// 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. @@ -63,30 +65,31 @@ internal ExtensionProperties(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfig { return; } - {_scope = If( json?.PropertyT("scope"), out var __jsonScope) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.Scope.FromJson(__jsonScope) : Scope;} + {_scope = If( json?.PropertyT("scope"), out var __jsonScope) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.Scope.FromJson(__jsonScope) : Scope;} {_errorInfo = If( json?.PropertyT("errorInfo"), out var __jsonErrorInfo) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorDetail.FromJson(__jsonErrorInfo) : ErrorInfo;} - {_aksAssignedIdentity = If( json?.PropertyT("aksAssignedIdentity"), out var __jsonAksAssignedIdentity) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.ExtensionPropertiesAksAssignedIdentity.FromJson(__jsonAksAssignedIdentity) : AksAssignedIdentity;} + {_aksAssignedIdentity = If( json?.PropertyT("aksAssignedIdentity"), out var __jsonAksAssignedIdentity) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ExtensionPropertiesAksAssignedIdentity.FromJson(__jsonAksAssignedIdentity) : AksAssignedIdentity;} {_extensionType = If( json?.PropertyT("extensionType"), out var __jsonExtensionType) ? (string)__jsonExtensionType : (string)ExtensionType;} {_autoUpgradeMinorVersion = If( json?.PropertyT("autoUpgradeMinorVersion"), out var __jsonAutoUpgradeMinorVersion) ? (bool?)__jsonAutoUpgradeMinorVersion : AutoUpgradeMinorVersion;} {_releaseTrain = If( json?.PropertyT("releaseTrain"), out var __jsonReleaseTrain) ? (string)__jsonReleaseTrain : (string)ReleaseTrain;} {_version = If( json?.PropertyT("version"), out var __jsonVersion) ? (string)__jsonVersion : (string)Version;} - {_configurationSetting = If( json?.PropertyT("configurationSettings"), out var __jsonConfigurationSettings) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.ExtensionPropertiesConfigurationSettings.FromJson(__jsonConfigurationSettings) : ConfigurationSetting;} - {_configurationProtectedSetting = If( json?.PropertyT("configurationProtectedSettings"), out var __jsonConfigurationProtectedSettings) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.ExtensionPropertiesConfigurationProtectedSettings.FromJson(__jsonConfigurationProtectedSettings) : ConfigurationProtectedSetting;} + {_configurationSetting = If( json?.PropertyT("configurationSettings"), out var __jsonConfigurationSettings) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ExtensionPropertiesConfigurationSettings.FromJson(__jsonConfigurationSettings) : ConfigurationSetting;} + {_configurationProtectedSetting = If( json?.PropertyT("configurationProtectedSettings"), out var __jsonConfigurationProtectedSettings) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ExtensionPropertiesConfigurationProtectedSettings.FromJson(__jsonConfigurationProtectedSettings) : ConfigurationProtectedSetting;} + {_installedVersion = If( json?.PropertyT("installedVersion"), out var __jsonInstalledVersion) ? (string)__jsonInstalledVersion : (string)InstalledVersion;} {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)ProvisioningState;} - {_statuses = If( json?.PropertyT("statuses"), out var __jsonStatuses) ? If( __jsonStatuses as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20210901.IExtensionStatus) (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.ExtensionStatus.FromJson(__u) )) ))() : null : Statuses;} - {_customLocationSetting = If( json?.PropertyT("customLocationSettings"), out var __jsonCustomLocationSettings) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.ExtensionPropertiesCustomLocationSettings.FromJson(__jsonCustomLocationSettings) : CustomLocationSetting;} + {_statuses = If( json?.PropertyT("statuses"), out var __jsonStatuses) ? If( __jsonStatuses as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20220301.IExtensionStatus) (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ExtensionStatus.FromJson(__u) )) ))() : null : Statuses;} + {_customLocationSetting = If( json?.PropertyT("customLocationSettings"), out var __jsonCustomLocationSettings) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ExtensionPropertiesCustomLocationSettings.FromJson(__jsonCustomLocationSettings) : CustomLocationSetting;} {_packageUri = If( json?.PropertyT("packageUri"), out var __jsonPackageUri) ? (string)__jsonPackageUri : (string)PackageUri;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json ? new ExtensionProperties(json) : null; } @@ -111,7 +114,10 @@ public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.J return container; } AddIf( null != this._scope ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) this._scope.ToJson(null,serializationMode) : null, "scope" ,container.Add ); - AddIf( null != this._errorInfo ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) this._errorInfo.ToJson(null,serializationMode) : null, "errorInfo" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._errorInfo ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) this._errorInfo.ToJson(null,serializationMode) : null, "errorInfo" ,container.Add ); + } AddIf( null != this._aksAssignedIdentity ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) this._aksAssignedIdentity.ToJson(null,serializationMode) : null, "aksAssignedIdentity" ,container.Add ); AddIf( null != (((object)this._extensionType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonString(this._extensionType.ToString()) : null, "extensionType" ,container.Add ); AddIf( null != this._autoUpgradeMinorVersion ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonBoolean((bool)this._autoUpgradeMinorVersion) : null, "autoUpgradeMinorVersion" ,container.Add ); @@ -120,6 +126,10 @@ public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.J AddIf( null != this._configurationSetting ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) this._configurationSetting.ToJson(null,serializationMode) : null, "configurationSettings" ,container.Add ); AddIf( null != this._configurationProtectedSetting ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) this._configurationProtectedSetting.ToJson(null,serializationMode) : null, "configurationProtectedSettings" ,container.Add ); if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._installedVersion)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonString(this._installedVersion.ToString()) : null, "installedVersion" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeReadOnly)) { AddIf( null != (((object)this._provisioningState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonString(this._provisioningState.ToString()) : null, "provisioningState" ,container.Add ); } diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20210901/ExtensionPropertiesAksAssignedIdentity.PowerShell.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/ExtensionPropertiesAksAssignedIdentity.PowerShell.cs similarity index 67% rename from src/KubernetesConfiguration/generated/api/Models/Api20210901/ExtensionPropertiesAksAssignedIdentity.PowerShell.cs rename to src/KubernetesConfiguration/generated/api/Models/Api20220301/ExtensionPropertiesAksAssignedIdentity.PowerShell.cs index bc51794d6ac0..05c5d3a99937 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Api20210901/ExtensionPropertiesAksAssignedIdentity.PowerShell.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/ExtensionPropertiesAksAssignedIdentity.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; @@ -31,7 +31,8 @@ public partial class ExtensionPropertiesAksAssignedIdentity /// /// 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. + /// 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. @@ -43,7 +44,8 @@ public partial class ExtensionPropertiesAksAssignedIdentity /// /// 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. + /// 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. @@ -61,35 +63,35 @@ public partial class ExtensionPropertiesAksAssignedIdentity partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesAksAssignedIdentity DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesAksAssignedIdentity DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ExtensionPropertiesAksAssignedIdentity(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesAksAssignedIdentity DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesAksAssignedIdentity DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ExtensionPropertiesAksAssignedIdentity(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -102,14 +104,23 @@ internal ExtensionPropertiesAksAssignedIdentity(global::System.Collections.IDict return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesAksAssignedIdentityInternal)this).PrincipalId = (string) content.GetValueForProperty("PrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesAksAssignedIdentityInternal)this).PrincipalId, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesAksAssignedIdentityInternal)this).TenantId = (string) content.GetValueForProperty("TenantId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesAksAssignedIdentityInternal)this).TenantId, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesAksAssignedIdentityInternal)this).Type = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ResourceIdentityType?) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesAksAssignedIdentityInternal)this).Type, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ResourceIdentityType.CreateFrom); + if (content.Contains("PrincipalId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesAksAssignedIdentityInternal)this).PrincipalId = (string) content.GetValueForProperty("PrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesAksAssignedIdentityInternal)this).PrincipalId, global::System.Convert.ToString); + } + if (content.Contains("TenantId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesAksAssignedIdentityInternal)this).TenantId = (string) content.GetValueForProperty("TenantId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesAksAssignedIdentityInternal)this).TenantId, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesAksAssignedIdentityInternal)this).Type = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.AksIdentityType?) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesAksAssignedIdentityInternal)this).Type, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.AksIdentityType.CreateFrom); + } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -122,9 +133,18 @@ internal ExtensionPropertiesAksAssignedIdentity(global::System.Management.Automa return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesAksAssignedIdentityInternal)this).PrincipalId = (string) content.GetValueForProperty("PrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesAksAssignedIdentityInternal)this).PrincipalId, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesAksAssignedIdentityInternal)this).TenantId = (string) content.GetValueForProperty("TenantId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesAksAssignedIdentityInternal)this).TenantId, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesAksAssignedIdentityInternal)this).Type = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ResourceIdentityType?) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesAksAssignedIdentityInternal)this).Type, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ResourceIdentityType.CreateFrom); + if (content.Contains("PrincipalId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesAksAssignedIdentityInternal)this).PrincipalId = (string) content.GetValueForProperty("PrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesAksAssignedIdentityInternal)this).PrincipalId, global::System.Convert.ToString); + } + if (content.Contains("TenantId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesAksAssignedIdentityInternal)this).TenantId = (string) content.GetValueForProperty("TenantId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesAksAssignedIdentityInternal)this).TenantId, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesAksAssignedIdentityInternal)this).Type = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.AksIdentityType?) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesAksAssignedIdentityInternal)this).Type, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.AksIdentityType.CreateFrom); + } AfterDeserializePSObject(content); } @@ -133,8 +153,10 @@ internal ExtensionPropertiesAksAssignedIdentity(global::System.Management.Automa /// string. /// /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesAksAssignedIdentity FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesAksAssignedIdentity FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20210901/ExtensionPropertiesAksAssignedIdentity.TypeConverter.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/ExtensionPropertiesAksAssignedIdentity.TypeConverter.cs similarity index 82% rename from src/KubernetesConfiguration/generated/api/Models/Api20210901/ExtensionPropertiesAksAssignedIdentity.TypeConverter.cs rename to src/KubernetesConfiguration/generated/api/Models/Api20220301/ExtensionPropertiesAksAssignedIdentity.TypeConverter.cs index 2561379e8b43..49ddbdfb6164 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Api20210901/ExtensionPropertiesAksAssignedIdentity.TypeConverter.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/ExtensionPropertiesAksAssignedIdentity.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; @@ -15,20 +15,20 @@ public partial class ExtensionPropertiesAksAssignedIdentityTypeConverter : globa { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// 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. + /// 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. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -77,19 +77,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// 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 + /// 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 + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -101,22 +102,22 @@ public static bool CanConvertFrom(dynamic sourceValue) 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 + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesAksAssignedIdentity ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesAksAssignedIdentity ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesAksAssignedIdentity).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesAksAssignedIdentity).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20210901/ExtensionPropertiesAksAssignedIdentity.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/ExtensionPropertiesAksAssignedIdentity.cs similarity index 88% rename from src/KubernetesConfiguration/generated/api/Models/Api20210901/ExtensionPropertiesAksAssignedIdentity.cs rename to src/KubernetesConfiguration/generated/api/Models/Api20220301/ExtensionPropertiesAksAssignedIdentity.cs index 14894e485188..1e64822414f1 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Api20210901/ExtensionPropertiesAksAssignedIdentity.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/ExtensionPropertiesAksAssignedIdentity.cs @@ -3,21 +3,21 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; /// Identity of the Extension resource in an AKS cluster public partial class ExtensionPropertiesAksAssignedIdentity : - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesAksAssignedIdentity, - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesAksAssignedIdentityInternal + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesAksAssignedIdentity, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesAksAssignedIdentityInternal { /// Internal Acessors for PrincipalId - string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesAksAssignedIdentityInternal.PrincipalId { get => this._principalId; set { {_principalId = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesAksAssignedIdentityInternal.PrincipalId { get => this._principalId; set { {_principalId = value;} } } /// Internal Acessors for TenantId - string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesAksAssignedIdentityInternal.TenantId { get => this._tenantId; set { {_tenantId = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesAksAssignedIdentityInternal.TenantId { get => this._tenantId; set { {_tenantId = value;} } } /// Backing field for property. private string _principalId; @@ -34,11 +34,11 @@ public partial class ExtensionPropertiesAksAssignedIdentity : public string TenantId { get => this._tenantId; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ResourceIdentityType? _type; + private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.AksIdentityType? _type; /// The identity type. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ResourceIdentityType? Type { get => this._type; set => this._type = value; } + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.AksIdentityType? Type { get => this._type; set => this._type = value; } /// Creates an new instance. public ExtensionPropertiesAksAssignedIdentity() @@ -72,8 +72,8 @@ public partial interface IExtensionPropertiesAksAssignedIdentity : ReadOnly = false, Description = @"The identity type.", SerializedName = @"type", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ResourceIdentityType) })] - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ResourceIdentityType? Type { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.AksIdentityType) })] + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.AksIdentityType? Type { get; set; } } /// Identity of the Extension resource in an AKS cluster @@ -85,7 +85,7 @@ internal partial interface IExtensionPropertiesAksAssignedIdentityInternal /// The tenant ID of resource. string TenantId { get; set; } /// The identity type. - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ResourceIdentityType? Type { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.AksIdentityType? Type { get; set; } } } \ No newline at end of file diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20210901/ExtensionPropertiesAksAssignedIdentity.json.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/ExtensionPropertiesAksAssignedIdentity.json.cs similarity index 93% rename from src/KubernetesConfiguration/generated/api/Models/Api20210901/ExtensionPropertiesAksAssignedIdentity.json.cs rename to src/KubernetesConfiguration/generated/api/Models/Api20220301/ExtensionPropertiesAksAssignedIdentity.json.cs index 509e3abf5492..23c27ea43325 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Api20210901/ExtensionPropertiesAksAssignedIdentity.json.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/ExtensionPropertiesAksAssignedIdentity.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; @@ -20,7 +20,7 @@ public partial class ExtensionPropertiesAksAssignedIdentity partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class ExtensionPropertiesAksAssignedIdentity /// /// 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. + /// 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. @@ -42,7 +43,8 @@ public partial class ExtensionPropertiesAksAssignedIdentity /// /// 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. + /// 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. @@ -70,13 +72,13 @@ internal ExtensionPropertiesAksAssignedIdentity(Microsoft.Azure.PowerShell.Cmdle } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesAksAssignedIdentity. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesAksAssignedIdentity. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesAksAssignedIdentity. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesAksAssignedIdentity. /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesAksAssignedIdentity FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesAksAssignedIdentity FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json ? new ExtensionPropertiesAksAssignedIdentity(json) : null; } diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20210901/ExtensionPropertiesConfigurationProtectedSettings.PowerShell.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/ExtensionPropertiesConfigurationProtectedSettings.PowerShell.cs similarity index 89% rename from src/KubernetesConfiguration/generated/api/Models/Api20210901/ExtensionPropertiesConfigurationProtectedSettings.PowerShell.cs rename to src/KubernetesConfiguration/generated/api/Models/Api20220301/ExtensionPropertiesConfigurationProtectedSettings.PowerShell.cs index cda5c8cbd030..52a003058e9f 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Api20210901/ExtensionPropertiesConfigurationProtectedSettings.PowerShell.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/ExtensionPropertiesConfigurationProtectedSettings.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; @@ -33,7 +33,8 @@ public partial class ExtensionPropertiesConfigurationProtectedSettings /// /// 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. + /// 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. @@ -45,7 +46,8 @@ public partial class ExtensionPropertiesConfigurationProtectedSettings /// /// 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. + /// 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. @@ -63,35 +65,35 @@ public partial class ExtensionPropertiesConfigurationProtectedSettings partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesConfigurationProtectedSettings DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesConfigurationProtectedSettings DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ExtensionPropertiesConfigurationProtectedSettings(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesConfigurationProtectedSettings DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesConfigurationProtectedSettings DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ExtensionPropertiesConfigurationProtectedSettings(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -110,7 +112,7 @@ internal ExtensionPropertiesConfigurationProtectedSettings(global::System.Collec } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -133,8 +135,10 @@ internal ExtensionPropertiesConfigurationProtectedSettings(global::System.Manage /// 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.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesConfigurationProtectedSettings FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesConfigurationProtectedSettings FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20210901/ExtensionPropertiesConfigurationProtectedSettings.TypeConverter.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/ExtensionPropertiesConfigurationProtectedSettings.TypeConverter.cs similarity index 82% rename from src/KubernetesConfiguration/generated/api/Models/Api20210901/ExtensionPropertiesConfigurationProtectedSettings.TypeConverter.cs rename to src/KubernetesConfiguration/generated/api/Models/Api20220301/ExtensionPropertiesConfigurationProtectedSettings.TypeConverter.cs index 00b0a93b3643..089db13df1c1 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Api20210901/ExtensionPropertiesConfigurationProtectedSettings.TypeConverter.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/ExtensionPropertiesConfigurationProtectedSettings.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; @@ -15,20 +15,20 @@ public partial class ExtensionPropertiesConfigurationProtectedSettingsTypeConver { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// 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. + /// 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. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -77,19 +77,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// 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 + /// 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 + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -102,8 +103,8 @@ public static bool CanConvertFrom(dynamic sourceValue) 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 + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . @@ -111,14 +112,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// an instance of , or null if there is no suitable /// conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesConfigurationProtectedSettings ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesConfigurationProtectedSettings ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesConfigurationProtectedSettings).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesConfigurationProtectedSettings).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20210901/ExtensionPropertiesConfigurationProtectedSettings.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/ExtensionPropertiesConfigurationProtectedSettings.cs similarity index 91% rename from src/KubernetesConfiguration/generated/api/Models/Api20210901/ExtensionPropertiesConfigurationProtectedSettings.cs rename to src/KubernetesConfiguration/generated/api/Models/Api20220301/ExtensionPropertiesConfigurationProtectedSettings.cs index 36fc7400895c..f3cfc0cee4c1 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Api20210901/ExtensionPropertiesConfigurationProtectedSettings.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/ExtensionPropertiesConfigurationProtectedSettings.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; @@ -11,8 +11,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api2 /// Configuration settings that are sensitive, as name-value pairs for configuring this extension. /// public partial class ExtensionPropertiesConfigurationProtectedSettings : - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesConfigurationProtectedSettings, - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesConfigurationProtectedSettingsInternal + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesConfigurationProtectedSettings, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesConfigurationProtectedSettingsInternal { /// diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20210901/ExtensionPropertiesConfigurationProtectedSettings.dictionary.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/ExtensionPropertiesConfigurationProtectedSettings.dictionary.cs similarity index 98% rename from src/KubernetesConfiguration/generated/api/Models/Api20210901/ExtensionPropertiesConfigurationProtectedSettings.dictionary.cs rename to src/KubernetesConfiguration/generated/api/Models/Api20220301/ExtensionPropertiesConfigurationProtectedSettings.dictionary.cs index 5707b1b18170..90ec92a463da 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Api20210901/ExtensionPropertiesConfigurationProtectedSettings.dictionary.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/ExtensionPropertiesConfigurationProtectedSettings.dictionary.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; @@ -70,6 +70,6 @@ public void CopyFrom(global::System.Management.Automation.PSObject source) /// - public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.ExtensionPropertiesConfigurationProtectedSettings source) => source.__additionalProperties; + public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ExtensionPropertiesConfigurationProtectedSettings source) => source.__additionalProperties; } } \ No newline at end of file diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20210901/ExtensionPropertiesConfigurationProtectedSettings.json.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/ExtensionPropertiesConfigurationProtectedSettings.json.cs similarity index 92% rename from src/KubernetesConfiguration/generated/api/Models/Api20210901/ExtensionPropertiesConfigurationProtectedSettings.json.cs rename to src/KubernetesConfiguration/generated/api/Models/Api20220301/ExtensionPropertiesConfigurationProtectedSettings.json.cs index 991313df9177..d65453695646 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Api20210901/ExtensionPropertiesConfigurationProtectedSettings.json.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/ExtensionPropertiesConfigurationProtectedSettings.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; @@ -22,7 +22,7 @@ public partial class ExtensionPropertiesConfigurationProtectedSettings partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -32,7 +32,8 @@ public partial class ExtensionPropertiesConfigurationProtectedSettings /// /// 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. + /// 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. @@ -44,7 +45,8 @@ public partial class ExtensionPropertiesConfigurationProtectedSettings /// /// 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. + /// 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. @@ -72,13 +74,13 @@ internal ExtensionPropertiesConfigurationProtectedSettings(Microsoft.Azure.Power } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesConfigurationProtectedSettings. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesConfigurationProtectedSettings. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesConfigurationProtectedSettings. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesConfigurationProtectedSettings. /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesConfigurationProtectedSettings FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesConfigurationProtectedSettings FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json ? new ExtensionPropertiesConfigurationProtectedSettings(json) : null; } diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20210901/ExtensionPropertiesConfigurationSettings.PowerShell.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/ExtensionPropertiesConfigurationSettings.PowerShell.cs similarity index 89% rename from src/KubernetesConfiguration/generated/api/Models/Api20210901/ExtensionPropertiesConfigurationSettings.PowerShell.cs rename to src/KubernetesConfiguration/generated/api/Models/Api20220301/ExtensionPropertiesConfigurationSettings.PowerShell.cs index b3d19403c6a3..6aebc91dc069 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Api20210901/ExtensionPropertiesConfigurationSettings.PowerShell.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/ExtensionPropertiesConfigurationSettings.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; @@ -31,7 +31,8 @@ public partial class ExtensionPropertiesConfigurationSettings /// /// 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. + /// 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. @@ -43,7 +44,8 @@ public partial class ExtensionPropertiesConfigurationSettings /// /// 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. + /// 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. @@ -61,35 +63,35 @@ public partial class ExtensionPropertiesConfigurationSettings partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesConfigurationSettings DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesConfigurationSettings DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ExtensionPropertiesConfigurationSettings(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesConfigurationSettings DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesConfigurationSettings DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ExtensionPropertiesConfigurationSettings(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -108,7 +110,7 @@ internal ExtensionPropertiesConfigurationSettings(global::System.Collections.IDi } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -131,8 +133,10 @@ internal ExtensionPropertiesConfigurationSettings(global::System.Management.Auto /// string. /// /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesConfigurationSettings FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesConfigurationSettings FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20210901/ExtensionPropertiesConfigurationSettings.TypeConverter.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/ExtensionPropertiesConfigurationSettings.TypeConverter.cs similarity index 82% rename from src/KubernetesConfiguration/generated/api/Models/Api20210901/ExtensionPropertiesConfigurationSettings.TypeConverter.cs rename to src/KubernetesConfiguration/generated/api/Models/Api20220301/ExtensionPropertiesConfigurationSettings.TypeConverter.cs index c70962cbee71..38eca3fc2e57 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Api20210901/ExtensionPropertiesConfigurationSettings.TypeConverter.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/ExtensionPropertiesConfigurationSettings.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; @@ -15,20 +15,20 @@ public partial class ExtensionPropertiesConfigurationSettingsTypeConverter : glo { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// 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. + /// 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. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -77,19 +77,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// 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 + /// 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 + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -101,22 +102,22 @@ public static bool CanConvertFrom(dynamic sourceValue) 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 + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesConfigurationSettings ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesConfigurationSettings ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesConfigurationSettings).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesConfigurationSettings).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20210901/ExtensionPropertiesConfigurationSettings.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/ExtensionPropertiesConfigurationSettings.cs similarity index 91% rename from src/KubernetesConfiguration/generated/api/Models/Api20210901/ExtensionPropertiesConfigurationSettings.cs rename to src/KubernetesConfiguration/generated/api/Models/Api20220301/ExtensionPropertiesConfigurationSettings.cs index 1764ec44bddb..a777b61249a3 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Api20210901/ExtensionPropertiesConfigurationSettings.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/ExtensionPropertiesConfigurationSettings.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; /// Configuration settings, as name-value pairs for configuring this extension. public partial class ExtensionPropertiesConfigurationSettings : - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesConfigurationSettings, - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesConfigurationSettingsInternal + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesConfigurationSettings, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesConfigurationSettingsInternal { /// diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20210901/ExtensionPropertiesConfigurationSettings.dictionary.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/ExtensionPropertiesConfigurationSettings.dictionary.cs similarity index 98% rename from src/KubernetesConfiguration/generated/api/Models/Api20210901/ExtensionPropertiesConfigurationSettings.dictionary.cs rename to src/KubernetesConfiguration/generated/api/Models/Api20220301/ExtensionPropertiesConfigurationSettings.dictionary.cs index f0c2551cbf99..81ad1b932206 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Api20210901/ExtensionPropertiesConfigurationSettings.dictionary.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/ExtensionPropertiesConfigurationSettings.dictionary.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; @@ -70,6 +70,6 @@ public void CopyFrom(global::System.Management.Automation.PSObject source) /// - public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.ExtensionPropertiesConfigurationSettings source) => source.__additionalProperties; + public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ExtensionPropertiesConfigurationSettings source) => source.__additionalProperties; } } \ No newline at end of file diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20210901/ExtensionPropertiesConfigurationSettings.json.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/ExtensionPropertiesConfigurationSettings.json.cs similarity index 91% rename from src/KubernetesConfiguration/generated/api/Models/Api20210901/ExtensionPropertiesConfigurationSettings.json.cs rename to src/KubernetesConfiguration/generated/api/Models/Api20220301/ExtensionPropertiesConfigurationSettings.json.cs index 09c28af5031a..a41bfddd0b88 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Api20210901/ExtensionPropertiesConfigurationSettings.json.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/ExtensionPropertiesConfigurationSettings.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; @@ -20,7 +20,7 @@ public partial class ExtensionPropertiesConfigurationSettings partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class ExtensionPropertiesConfigurationSettings /// /// 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. + /// 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. @@ -42,7 +43,8 @@ public partial class ExtensionPropertiesConfigurationSettings /// /// 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. + /// 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. @@ -69,13 +71,13 @@ internal ExtensionPropertiesConfigurationSettings(Microsoft.Azure.PowerShell.Cmd } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesConfigurationSettings. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesConfigurationSettings. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesConfigurationSettings. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesConfigurationSettings. /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesConfigurationSettings FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesConfigurationSettings FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json ? new ExtensionPropertiesConfigurationSettings(json) : null; } diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20210901/ExtensionPropertiesCustomLocationSettings.PowerShell.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/ExtensionPropertiesCustomLocationSettings.PowerShell.cs similarity index 89% rename from src/KubernetesConfiguration/generated/api/Models/Api20210901/ExtensionPropertiesCustomLocationSettings.PowerShell.cs rename to src/KubernetesConfiguration/generated/api/Models/Api20220301/ExtensionPropertiesCustomLocationSettings.PowerShell.cs index 914c67c58725..247a13119959 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Api20210901/ExtensionPropertiesCustomLocationSettings.PowerShell.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/ExtensionPropertiesCustomLocationSettings.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; @@ -31,7 +31,8 @@ public partial class ExtensionPropertiesCustomLocationSettings /// /// 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. + /// 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. @@ -43,7 +44,8 @@ public partial class ExtensionPropertiesCustomLocationSettings /// /// 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. + /// 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. @@ -61,35 +63,35 @@ public partial class ExtensionPropertiesCustomLocationSettings partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesCustomLocationSettings DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesCustomLocationSettings DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ExtensionPropertiesCustomLocationSettings(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesCustomLocationSettings DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesCustomLocationSettings DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ExtensionPropertiesCustomLocationSettings(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -108,7 +110,7 @@ internal ExtensionPropertiesCustomLocationSettings(global::System.Collections.ID } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -131,8 +133,10 @@ internal ExtensionPropertiesCustomLocationSettings(global::System.Management.Aut /// string. /// /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesCustomLocationSettings FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesCustomLocationSettings FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20210901/ExtensionPropertiesCustomLocationSettings.TypeConverter.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/ExtensionPropertiesCustomLocationSettings.TypeConverter.cs similarity index 82% rename from src/KubernetesConfiguration/generated/api/Models/Api20210901/ExtensionPropertiesCustomLocationSettings.TypeConverter.cs rename to src/KubernetesConfiguration/generated/api/Models/Api20220301/ExtensionPropertiesCustomLocationSettings.TypeConverter.cs index f5929cafa1c7..8d08c149ea1f 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Api20210901/ExtensionPropertiesCustomLocationSettings.TypeConverter.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/ExtensionPropertiesCustomLocationSettings.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; @@ -15,20 +15,20 @@ public partial class ExtensionPropertiesCustomLocationSettingsTypeConverter : gl { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// 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. + /// 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. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -77,19 +77,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// 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 + /// 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 + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -101,22 +102,22 @@ public static bool CanConvertFrom(dynamic sourceValue) 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 + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesCustomLocationSettings ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesCustomLocationSettings ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesCustomLocationSettings).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesCustomLocationSettings).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20210901/ExtensionPropertiesCustomLocationSettings.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/ExtensionPropertiesCustomLocationSettings.cs similarity index 90% rename from src/KubernetesConfiguration/generated/api/Models/Api20210901/ExtensionPropertiesCustomLocationSettings.cs rename to src/KubernetesConfiguration/generated/api/Models/Api20220301/ExtensionPropertiesCustomLocationSettings.cs index 5a72f9339edc..37a82eb718ce 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Api20210901/ExtensionPropertiesCustomLocationSettings.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/ExtensionPropertiesCustomLocationSettings.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; /// Custom Location settings properties. public partial class ExtensionPropertiesCustomLocationSettings : - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesCustomLocationSettings, - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesCustomLocationSettingsInternal + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesCustomLocationSettings, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesCustomLocationSettingsInternal { /// diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20210901/ExtensionPropertiesCustomLocationSettings.dictionary.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/ExtensionPropertiesCustomLocationSettings.dictionary.cs similarity index 98% rename from src/KubernetesConfiguration/generated/api/Models/Api20210901/ExtensionPropertiesCustomLocationSettings.dictionary.cs rename to src/KubernetesConfiguration/generated/api/Models/Api20220301/ExtensionPropertiesCustomLocationSettings.dictionary.cs index 45d7dca55211..0c26f86f9782 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Api20210901/ExtensionPropertiesCustomLocationSettings.dictionary.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/ExtensionPropertiesCustomLocationSettings.dictionary.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; @@ -70,6 +70,6 @@ public void CopyFrom(global::System.Management.Automation.PSObject source) /// - public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.ExtensionPropertiesCustomLocationSettings source) => source.__additionalProperties; + public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ExtensionPropertiesCustomLocationSettings source) => source.__additionalProperties; } } \ No newline at end of file diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20210901/ExtensionPropertiesCustomLocationSettings.json.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/ExtensionPropertiesCustomLocationSettings.json.cs similarity index 91% rename from src/KubernetesConfiguration/generated/api/Models/Api20210901/ExtensionPropertiesCustomLocationSettings.json.cs rename to src/KubernetesConfiguration/generated/api/Models/Api20220301/ExtensionPropertiesCustomLocationSettings.json.cs index 7acbd1f41226..d753fc85f7de 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Api20210901/ExtensionPropertiesCustomLocationSettings.json.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/ExtensionPropertiesCustomLocationSettings.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; @@ -20,7 +20,7 @@ public partial class ExtensionPropertiesCustomLocationSettings partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class ExtensionPropertiesCustomLocationSettings /// /// 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. + /// 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. @@ -42,7 +43,8 @@ public partial class ExtensionPropertiesCustomLocationSettings /// /// 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. + /// 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. @@ -69,13 +71,13 @@ internal ExtensionPropertiesCustomLocationSettings(Microsoft.Azure.PowerShell.Cm } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesCustomLocationSettings. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesCustomLocationSettings. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesCustomLocationSettings. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesCustomLocationSettings. /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesCustomLocationSettings FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesCustomLocationSettings FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json ? new ExtensionPropertiesCustomLocationSettings(json) : null; } diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20210901/ExtensionStatus.PowerShell.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/ExtensionStatus.PowerShell.cs similarity index 59% rename from src/KubernetesConfiguration/generated/api/Models/Api20210901/ExtensionStatus.PowerShell.cs rename to src/KubernetesConfiguration/generated/api/Models/Api20220301/ExtensionStatus.PowerShell.cs index 502b4ece4e71..48d3dc10c0a7 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Api20210901/ExtensionStatus.PowerShell.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/ExtensionStatus.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; @@ -31,7 +31,8 @@ public partial class ExtensionStatus /// /// 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. + /// 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. @@ -43,7 +44,8 @@ public partial class ExtensionStatus /// /// 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. + /// 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. @@ -61,35 +63,35 @@ public partial class ExtensionStatus partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionStatus DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionStatus DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ExtensionStatus(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionStatus DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionStatus DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ExtensionStatus(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -102,16 +104,31 @@ internal ExtensionStatus(global::System.Collections.IDictionary content) return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionStatusInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionStatusInternal)this).Code, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionStatusInternal)this).DisplayStatus = (string) content.GetValueForProperty("DisplayStatus",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionStatusInternal)this).DisplayStatus, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionStatusInternal)this).Level = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.LevelType?) content.GetValueForProperty("Level",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionStatusInternal)this).Level, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.LevelType.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionStatusInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionStatusInternal)this).Message, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionStatusInternal)this).Time = (string) content.GetValueForProperty("Time",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionStatusInternal)this).Time, global::System.Convert.ToString); + if (content.Contains("Code")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionStatusInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionStatusInternal)this).Code, global::System.Convert.ToString); + } + if (content.Contains("DisplayStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionStatusInternal)this).DisplayStatus = (string) content.GetValueForProperty("DisplayStatus",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionStatusInternal)this).DisplayStatus, global::System.Convert.ToString); + } + if (content.Contains("Level")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionStatusInternal)this).Level = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.LevelType?) content.GetValueForProperty("Level",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionStatusInternal)this).Level, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.LevelType.CreateFrom); + } + if (content.Contains("Message")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionStatusInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionStatusInternal)this).Message, global::System.Convert.ToString); + } + if (content.Contains("Time")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionStatusInternal)this).Time = (string) content.GetValueForProperty("Time",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionStatusInternal)this).Time, global::System.Convert.ToString); + } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -124,11 +141,26 @@ internal ExtensionStatus(global::System.Management.Automation.PSObject content) return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionStatusInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionStatusInternal)this).Code, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionStatusInternal)this).DisplayStatus = (string) content.GetValueForProperty("DisplayStatus",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionStatusInternal)this).DisplayStatus, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionStatusInternal)this).Level = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.LevelType?) content.GetValueForProperty("Level",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionStatusInternal)this).Level, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.LevelType.CreateFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionStatusInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionStatusInternal)this).Message, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionStatusInternal)this).Time = (string) content.GetValueForProperty("Time",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionStatusInternal)this).Time, global::System.Convert.ToString); + if (content.Contains("Code")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionStatusInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionStatusInternal)this).Code, global::System.Convert.ToString); + } + if (content.Contains("DisplayStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionStatusInternal)this).DisplayStatus = (string) content.GetValueForProperty("DisplayStatus",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionStatusInternal)this).DisplayStatus, global::System.Convert.ToString); + } + if (content.Contains("Level")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionStatusInternal)this).Level = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.LevelType?) content.GetValueForProperty("Level",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionStatusInternal)this).Level, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.LevelType.CreateFrom); + } + if (content.Contains("Message")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionStatusInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionStatusInternal)this).Message, global::System.Convert.ToString); + } + if (content.Contains("Time")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionStatusInternal)this).Time = (string) content.GetValueForProperty("Time",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionStatusInternal)this).Time, global::System.Convert.ToString); + } AfterDeserializePSObject(content); } @@ -136,8 +168,8 @@ internal ExtensionStatus(global::System.Management.Automation.PSObject 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.KubernetesConfiguration.Models.Api20210901.IExtensionStatus FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionStatus FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20210901/ExtensionStatus.TypeConverter.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/ExtensionStatus.TypeConverter.cs similarity index 82% rename from src/KubernetesConfiguration/generated/api/Models/Api20210901/ExtensionStatus.TypeConverter.cs rename to src/KubernetesConfiguration/generated/api/Models/Api20220301/ExtensionStatus.TypeConverter.cs index 68f2a60b912c..1d263e1c8105 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Api20210901/ExtensionStatus.TypeConverter.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/ExtensionStatus.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; @@ -14,20 +14,20 @@ public partial class ExtensionStatusTypeConverter : global::System.Management.Au { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// 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. + /// 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. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +75,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// 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 + /// 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 + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,21 +100,20 @@ public static bool CanConvertFrom(dynamic sourceValue) 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 + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionStatus ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionStatus ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionStatus).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionStatus).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20210901/ExtensionStatus.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/ExtensionStatus.cs similarity index 98% rename from src/KubernetesConfiguration/generated/api/Models/Api20210901/ExtensionStatus.cs rename to src/KubernetesConfiguration/generated/api/Models/Api20220301/ExtensionStatus.cs index 069c490aa7ae..8c1450013f75 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Api20210901/ExtensionStatus.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/ExtensionStatus.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; /// Status from the extension. public partial class ExtensionStatus : - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionStatus, - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionStatusInternal + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionStatus, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionStatusInternal { /// Backing field for property. diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20210901/ExtensionStatus.json.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/ExtensionStatus.json.cs similarity index 93% rename from src/KubernetesConfiguration/generated/api/Models/Api20210901/ExtensionStatus.json.cs rename to src/KubernetesConfiguration/generated/api/Models/Api20220301/ExtensionStatus.json.cs index 23f6656a2412..dcf49733a33f 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Api20210901/ExtensionStatus.json.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/ExtensionStatus.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; @@ -20,7 +20,7 @@ public partial class ExtensionStatus partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class ExtensionStatus /// /// 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. + /// 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. @@ -42,7 +43,8 @@ public partial class ExtensionStatus /// /// 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. + /// 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. @@ -72,13 +74,13 @@ internal ExtensionStatus(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfigurat } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionStatus. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionStatus. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionStatus. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionStatus. /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionStatus FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionStatus FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json ? new ExtensionStatus(json) : null; } diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20210901/ExtensionsList.PowerShell.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/ExtensionsList.PowerShell.cs similarity index 71% rename from src/KubernetesConfiguration/generated/api/Models/Api20210901/ExtensionsList.PowerShell.cs rename to src/KubernetesConfiguration/generated/api/Models/Api20220301/ExtensionsList.PowerShell.cs index ff751689fd2f..684adbf0abc0 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Api20210901/ExtensionsList.PowerShell.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/ExtensionsList.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; @@ -34,7 +34,8 @@ public partial class ExtensionsList /// /// 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. + /// 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. @@ -46,7 +47,8 @@ public partial class ExtensionsList /// /// 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. + /// 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. @@ -64,35 +66,35 @@ public partial class ExtensionsList partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionsList DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionsList DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ExtensionsList(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionsList DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionsList DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ExtensionsList(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -105,13 +107,19 @@ internal ExtensionsList(global::System.Collections.IDictionary content) return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionsListInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtension[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionsListInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.ExtensionTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionsListInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionsListInternal)this).NextLink, global::System.Convert.ToString); + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionsListInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtension[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionsListInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ExtensionTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionsListInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionsListInternal)this).NextLink, global::System.Convert.ToString); + } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -124,8 +132,14 @@ internal ExtensionsList(global::System.Management.Automation.PSObject content) return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionsListInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtension[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionsListInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.ExtensionTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionsListInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionsListInternal)this).NextLink, global::System.Convert.ToString); + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionsListInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtension[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionsListInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ExtensionTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionsListInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionsListInternal)this).NextLink, global::System.Convert.ToString); + } AfterDeserializePSObject(content); } @@ -133,8 +147,8 @@ internal ExtensionsList(global::System.Management.Automation.PSObject 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.KubernetesConfiguration.Models.Api20210901.IExtensionsList FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionsList FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20210901/ExtensionsList.TypeConverter.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/ExtensionsList.TypeConverter.cs similarity index 82% rename from src/KubernetesConfiguration/generated/api/Models/Api20210901/ExtensionsList.TypeConverter.cs rename to src/KubernetesConfiguration/generated/api/Models/Api20220301/ExtensionsList.TypeConverter.cs index 40d5827db2f7..a9db7fff5207 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Api20210901/ExtensionsList.TypeConverter.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/ExtensionsList.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; @@ -14,20 +14,20 @@ public partial class ExtensionsListTypeConverter : global::System.Management.Aut { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// 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. + /// 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. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +75,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// 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 + /// 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 + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,21 +100,20 @@ public static bool CanConvertFrom(dynamic sourceValue) 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 + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionsList ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionsList ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionsList).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionsList).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20210901/ExtensionsList.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/ExtensionsList.cs similarity index 86% rename from src/KubernetesConfiguration/generated/api/Models/Api20210901/ExtensionsList.cs rename to src/KubernetesConfiguration/generated/api/Models/Api20220301/ExtensionsList.cs index ee4c1a837124..15183b9bb330 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Api20210901/ExtensionsList.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/ExtensionsList.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; @@ -12,15 +12,15 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api2 /// results. /// public partial class ExtensionsList : - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionsList, - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionsListInternal + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionsList, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionsListInternal { /// Internal Acessors for NextLink - string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionsListInternal.NextLink { get => this._nextLink; set { {_nextLink = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionsListInternal.NextLink { get => this._nextLink; set { {_nextLink = value;} } } /// Internal Acessors for Value - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtension[] Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionsListInternal.Value { get => this._value; set { {_value = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtension[] Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionsListInternal.Value { get => this._value; set { {_value = value;} } } /// Backing field for property. private string _nextLink; @@ -30,11 +30,11 @@ public partial class ExtensionsList : public string NextLink { get => this._nextLink; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtension[] _value; + private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtension[] _value; /// List of Extensions within a Kubernetes cluster. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtension[] Value { get => this._value; } + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtension[] Value { get => this._value; } /// Creates an new instance. public ExtensionsList() @@ -61,8 +61,8 @@ public partial interface IExtensionsList : ReadOnly = true, Description = @"List of Extensions within a Kubernetes cluster.", SerializedName = @"value", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtension) })] - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtension[] Value { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtension) })] + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtension[] Value { get; } } /// Result of the request to list Extensions. It contains a list of Extension objects and a URL link to get the next set of @@ -73,7 +73,7 @@ internal partial interface IExtensionsListInternal /// URL to get the next set of extension objects, if any. string NextLink { get; set; } /// List of Extensions within a Kubernetes cluster. - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtension[] Value { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtension[] Value { get; set; } } } \ No newline at end of file diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20210901/ExtensionsList.json.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/ExtensionsList.json.cs similarity index 91% rename from src/KubernetesConfiguration/generated/api/Models/Api20210901/ExtensionsList.json.cs rename to src/KubernetesConfiguration/generated/api/Models/Api20220301/ExtensionsList.json.cs index 658769407862..191edbd0ff62 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Api20210901/ExtensionsList.json.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/ExtensionsList.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; @@ -23,7 +23,7 @@ public partial class ExtensionsList partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -33,7 +33,8 @@ public partial class ExtensionsList /// /// 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. + /// 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. @@ -45,7 +46,8 @@ public partial class ExtensionsList /// /// 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. + /// 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. @@ -66,19 +68,19 @@ internal ExtensionsList(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfigurati { return; } - {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20210901.IExtension) (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.Extension.FromJson(__u) )) ))() : null : Value;} + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20220301.IExtension) (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.Extension.FromJson(__u) )) ))() : null : Value;} {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionsList. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionsList. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionsList. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionsList. /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionsList FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionsList FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json ? new ExtensionsList(json) : null; } diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfiguration.PowerShell.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfiguration.PowerShell.cs new file mode 100644 index 000000000000..c3a87f01268d --- /dev/null +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfiguration.PowerShell.cs @@ -0,0 +1,526 @@ +// 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.KubernetesConfiguration.Models.Api20220301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; + + /// The Flux Configuration object returned in Get & Put response. + [System.ComponentModel.TypeConverter(typeof(FluxConfigurationTypeConverter))] + public partial class FluxConfiguration + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfiguration DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new FluxConfiguration(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.KubernetesConfiguration.Models.Api20220301.IFluxConfiguration DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new FluxConfiguration(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal FluxConfiguration(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.FluxConfigurationPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningState.CreateFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("GitRepository")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).GitRepository = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryDefinition) content.GetValueForProperty("GitRepository",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).GitRepository, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.GitRepositoryDefinitionTypeConverter.ConvertFrom); + } + if (content.Contains("Bucket")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).Bucket = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IBucketDefinition) content.GetValueForProperty("Bucket",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).Bucket, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.BucketDefinitionTypeConverter.ConvertFrom); + } + if (content.Contains("Scope")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).Scope = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ScopeType?) content.GetValueForProperty("Scope",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).Scope, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ScopeType.CreateFrom); + } + if (content.Contains("Namespace")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).Namespace = (string) content.GetValueForProperty("Namespace",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).Namespace, global::System.Convert.ToString); + } + if (content.Contains("SourceKind")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).SourceKind = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType?) content.GetValueForProperty("SourceKind",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).SourceKind, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType.CreateFrom); + } + if (content.Contains("Suspend")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).Suspend = (bool?) content.GetValueForProperty("Suspend",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).Suspend, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("Kustomization")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).Kustomization = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesKustomizations) content.GetValueForProperty("Kustomization",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).Kustomization, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.FluxConfigurationPropertiesKustomizationsTypeConverter.ConvertFrom); + } + if (content.Contains("ConfigurationProtectedSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).ConfigurationProtectedSetting = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesConfigurationProtectedSettings) content.GetValueForProperty("ConfigurationProtectedSetting",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).ConfigurationProtectedSetting, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.FluxConfigurationPropertiesConfigurationProtectedSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("Statuses")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).Statuses = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectStatusDefinition[]) content.GetValueForProperty("Statuses",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).Statuses, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ObjectStatusDefinitionTypeConverter.ConvertFrom)); + } + if (content.Contains("RepositoryPublicKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).RepositoryPublicKey = (string) content.GetValueForProperty("RepositoryPublicKey",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).RepositoryPublicKey, global::System.Convert.ToString); + } + if (content.Contains("SourceSyncedCommitId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).SourceSyncedCommitId = (string) content.GetValueForProperty("SourceSyncedCommitId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).SourceSyncedCommitId, global::System.Convert.ToString); + } + if (content.Contains("SourceUpdatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).SourceUpdatedAt = (global::System.DateTime?) content.GetValueForProperty("SourceUpdatedAt",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).SourceUpdatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("StatusUpdatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).StatusUpdatedAt = (global::System.DateTime?) content.GetValueForProperty("StatusUpdatedAt",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).StatusUpdatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("ComplianceState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).ComplianceState = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.FluxComplianceState?) content.GetValueForProperty("ComplianceState",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).ComplianceState, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.FluxComplianceState.CreateFrom); + } + if (content.Contains("ErrorMessage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).ErrorMessage = (string) content.GetValueForProperty("ErrorMessage",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).ErrorMessage, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("GitRepositoryRef")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).GitRepositoryRef = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IRepositoryRefDefinition) content.GetValueForProperty("GitRepositoryRef",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).GitRepositoryRef, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.RepositoryRefDefinitionTypeConverter.ConvertFrom); + } + if (content.Contains("GitRepositoryUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).GitRepositoryUrl = (string) content.GetValueForProperty("GitRepositoryUrl",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).GitRepositoryUrl, global::System.Convert.ToString); + } + if (content.Contains("GitRepositoryTimeoutInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).GitRepositoryTimeoutInSecond = (long?) content.GetValueForProperty("GitRepositoryTimeoutInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).GitRepositoryTimeoutInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("GitRepositorySyncIntervalInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).GitRepositorySyncIntervalInSecond = (long?) content.GetValueForProperty("GitRepositorySyncIntervalInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).GitRepositorySyncIntervalInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("GitRepositorySshKnownHost")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).GitRepositorySshKnownHost = (string) content.GetValueForProperty("GitRepositorySshKnownHost",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).GitRepositorySshKnownHost, global::System.Convert.ToString); + } + if (content.Contains("GitRepositoryHttpsUser")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).GitRepositoryHttpsUser = (string) content.GetValueForProperty("GitRepositoryHttpsUser",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).GitRepositoryHttpsUser, global::System.Convert.ToString); + } + if (content.Contains("GitRepositoryHttpsCaCert")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).GitRepositoryHttpsCaCert = (string) content.GetValueForProperty("GitRepositoryHttpsCaCert",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).GitRepositoryHttpsCaCert, global::System.Convert.ToString); + } + if (content.Contains("GitRepositoryLocalAuthRef")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).GitRepositoryLocalAuthRef = (string) content.GetValueForProperty("GitRepositoryLocalAuthRef",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).GitRepositoryLocalAuthRef, global::System.Convert.ToString); + } + if (content.Contains("BucketUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).BucketUrl = (string) content.GetValueForProperty("BucketUrl",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).BucketUrl, global::System.Convert.ToString); + } + if (content.Contains("BucketName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).BucketName = (string) content.GetValueForProperty("BucketName",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).BucketName, global::System.Convert.ToString); + } + if (content.Contains("BucketInsecure")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).BucketInsecure = (bool?) content.GetValueForProperty("BucketInsecure",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).BucketInsecure, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("BucketTimeoutInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).BucketTimeoutInSecond = (long?) content.GetValueForProperty("BucketTimeoutInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).BucketTimeoutInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("BucketSyncIntervalInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).BucketSyncIntervalInSecond = (long?) content.GetValueForProperty("BucketSyncIntervalInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).BucketSyncIntervalInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("BucketAccessKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).BucketAccessKey = (System.Security.SecureString) content.GetValueForProperty("BucketAccessKey",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).BucketAccessKey, (object ss) => (System.Security.SecureString)ss); + } + if (content.Contains("BucketLocalAuthRef")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).BucketLocalAuthRef = (string) content.GetValueForProperty("BucketLocalAuthRef",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).BucketLocalAuthRef, global::System.Convert.ToString); + } + if (content.Contains("RepositoryRefBranch")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).RepositoryRefBranch = (string) content.GetValueForProperty("RepositoryRefBranch",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).RepositoryRefBranch, global::System.Convert.ToString); + } + if (content.Contains("RepositoryRefTag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).RepositoryRefTag = (string) content.GetValueForProperty("RepositoryRefTag",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).RepositoryRefTag, global::System.Convert.ToString); + } + if (content.Contains("RepositoryRefSemver")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).RepositoryRefSemver = (string) content.GetValueForProperty("RepositoryRefSemver",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).RepositoryRefSemver, global::System.Convert.ToString); + } + if (content.Contains("RepositoryRefCommit")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).RepositoryRefCommit = (string) content.GetValueForProperty("RepositoryRefCommit",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).RepositoryRefCommit, 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 FluxConfiguration(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.FluxConfigurationPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningState.CreateFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("GitRepository")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).GitRepository = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryDefinition) content.GetValueForProperty("GitRepository",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).GitRepository, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.GitRepositoryDefinitionTypeConverter.ConvertFrom); + } + if (content.Contains("Bucket")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).Bucket = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IBucketDefinition) content.GetValueForProperty("Bucket",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).Bucket, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.BucketDefinitionTypeConverter.ConvertFrom); + } + if (content.Contains("Scope")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).Scope = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ScopeType?) content.GetValueForProperty("Scope",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).Scope, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ScopeType.CreateFrom); + } + if (content.Contains("Namespace")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).Namespace = (string) content.GetValueForProperty("Namespace",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).Namespace, global::System.Convert.ToString); + } + if (content.Contains("SourceKind")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).SourceKind = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType?) content.GetValueForProperty("SourceKind",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).SourceKind, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType.CreateFrom); + } + if (content.Contains("Suspend")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).Suspend = (bool?) content.GetValueForProperty("Suspend",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).Suspend, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("Kustomization")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).Kustomization = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesKustomizations) content.GetValueForProperty("Kustomization",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).Kustomization, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.FluxConfigurationPropertiesKustomizationsTypeConverter.ConvertFrom); + } + if (content.Contains("ConfigurationProtectedSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).ConfigurationProtectedSetting = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesConfigurationProtectedSettings) content.GetValueForProperty("ConfigurationProtectedSetting",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).ConfigurationProtectedSetting, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.FluxConfigurationPropertiesConfigurationProtectedSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("Statuses")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).Statuses = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectStatusDefinition[]) content.GetValueForProperty("Statuses",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).Statuses, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ObjectStatusDefinitionTypeConverter.ConvertFrom)); + } + if (content.Contains("RepositoryPublicKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).RepositoryPublicKey = (string) content.GetValueForProperty("RepositoryPublicKey",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).RepositoryPublicKey, global::System.Convert.ToString); + } + if (content.Contains("SourceSyncedCommitId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).SourceSyncedCommitId = (string) content.GetValueForProperty("SourceSyncedCommitId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).SourceSyncedCommitId, global::System.Convert.ToString); + } + if (content.Contains("SourceUpdatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).SourceUpdatedAt = (global::System.DateTime?) content.GetValueForProperty("SourceUpdatedAt",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).SourceUpdatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("StatusUpdatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).StatusUpdatedAt = (global::System.DateTime?) content.GetValueForProperty("StatusUpdatedAt",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).StatusUpdatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("ComplianceState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).ComplianceState = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.FluxComplianceState?) content.GetValueForProperty("ComplianceState",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).ComplianceState, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.FluxComplianceState.CreateFrom); + } + if (content.Contains("ErrorMessage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).ErrorMessage = (string) content.GetValueForProperty("ErrorMessage",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).ErrorMessage, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("GitRepositoryRef")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).GitRepositoryRef = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IRepositoryRefDefinition) content.GetValueForProperty("GitRepositoryRef",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).GitRepositoryRef, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.RepositoryRefDefinitionTypeConverter.ConvertFrom); + } + if (content.Contains("GitRepositoryUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).GitRepositoryUrl = (string) content.GetValueForProperty("GitRepositoryUrl",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).GitRepositoryUrl, global::System.Convert.ToString); + } + if (content.Contains("GitRepositoryTimeoutInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).GitRepositoryTimeoutInSecond = (long?) content.GetValueForProperty("GitRepositoryTimeoutInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).GitRepositoryTimeoutInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("GitRepositorySyncIntervalInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).GitRepositorySyncIntervalInSecond = (long?) content.GetValueForProperty("GitRepositorySyncIntervalInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).GitRepositorySyncIntervalInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("GitRepositorySshKnownHost")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).GitRepositorySshKnownHost = (string) content.GetValueForProperty("GitRepositorySshKnownHost",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).GitRepositorySshKnownHost, global::System.Convert.ToString); + } + if (content.Contains("GitRepositoryHttpsUser")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).GitRepositoryHttpsUser = (string) content.GetValueForProperty("GitRepositoryHttpsUser",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).GitRepositoryHttpsUser, global::System.Convert.ToString); + } + if (content.Contains("GitRepositoryHttpsCaCert")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).GitRepositoryHttpsCaCert = (string) content.GetValueForProperty("GitRepositoryHttpsCaCert",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).GitRepositoryHttpsCaCert, global::System.Convert.ToString); + } + if (content.Contains("GitRepositoryLocalAuthRef")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).GitRepositoryLocalAuthRef = (string) content.GetValueForProperty("GitRepositoryLocalAuthRef",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).GitRepositoryLocalAuthRef, global::System.Convert.ToString); + } + if (content.Contains("BucketUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).BucketUrl = (string) content.GetValueForProperty("BucketUrl",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).BucketUrl, global::System.Convert.ToString); + } + if (content.Contains("BucketName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).BucketName = (string) content.GetValueForProperty("BucketName",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).BucketName, global::System.Convert.ToString); + } + if (content.Contains("BucketInsecure")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).BucketInsecure = (bool?) content.GetValueForProperty("BucketInsecure",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).BucketInsecure, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("BucketTimeoutInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).BucketTimeoutInSecond = (long?) content.GetValueForProperty("BucketTimeoutInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).BucketTimeoutInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("BucketSyncIntervalInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).BucketSyncIntervalInSecond = (long?) content.GetValueForProperty("BucketSyncIntervalInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).BucketSyncIntervalInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("BucketAccessKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).BucketAccessKey = (System.Security.SecureString) content.GetValueForProperty("BucketAccessKey",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).BucketAccessKey, (object ss) => (System.Security.SecureString)ss); + } + if (content.Contains("BucketLocalAuthRef")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).BucketLocalAuthRef = (string) content.GetValueForProperty("BucketLocalAuthRef",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).BucketLocalAuthRef, global::System.Convert.ToString); + } + if (content.Contains("RepositoryRefBranch")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).RepositoryRefBranch = (string) content.GetValueForProperty("RepositoryRefBranch",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).RepositoryRefBranch, global::System.Convert.ToString); + } + if (content.Contains("RepositoryRefTag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).RepositoryRefTag = (string) content.GetValueForProperty("RepositoryRefTag",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).RepositoryRefTag, global::System.Convert.ToString); + } + if (content.Contains("RepositoryRefSemver")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).RepositoryRefSemver = (string) content.GetValueForProperty("RepositoryRefSemver",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).RepositoryRefSemver, global::System.Convert.ToString); + } + if (content.Contains("RepositoryRefCommit")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).RepositoryRefCommit = (string) content.GetValueForProperty("RepositoryRefCommit",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal)this).RepositoryRefCommit, 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.KubernetesConfiguration.Models.Api20220301.IFluxConfiguration FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The Flux Configuration object returned in Get & Put response. + [System.ComponentModel.TypeConverter(typeof(FluxConfigurationTypeConverter))] + public partial interface IFluxConfiguration + + { + + } +} \ No newline at end of file diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20210301/ErrorDefinition.TypeConverter.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfiguration.TypeConverter.cs similarity index 71% rename from src/KubernetesConfiguration/generated/api/Models/Api20210301/ErrorDefinition.TypeConverter.cs rename to src/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfiguration.TypeConverter.cs index 041c8e495316..4e160b454ab5 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Api20210301/ErrorDefinition.TypeConverter.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfiguration.TypeConverter.cs @@ -3,36 +3,36 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; /// - /// A PowerShell PSTypeConverter to support converting to an instance of + /// A PowerShell PSTypeConverter to support converting to an instance of /// - public partial class ErrorDefinitionTypeConverter : global::System.Management.Automation.PSTypeConverter + public partial class FluxConfigurationTypeConverter : global::System.Management.Automation.PSTypeConverter { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// 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. + /// 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. + /// Determines if the converter can convert the parameter to the + /// type. /// - /// the instance to check if it can be converted to the the instance to check if it can be converted to the type. /// - /// true if the instance could be converted to a type, otherwise false + /// true if the instance could be converted to a type, otherwise false /// public static bool CanConvertFrom(dynamic sourceValue) { @@ -75,51 +75,51 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// 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 + /// 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 + /// 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. + /// 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 + /// Converts the parameter into an instance of /// - /// the value to convert into an instance of . + /// the value to convert into an instance of . /// - /// an instance of , or null if there is no suitable conversion. + /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IErrorDefinition ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfiguration ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IErrorDefinition).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfiguration).IsAssignableFrom(type)) { return sourceValue; } try { - return ErrorDefinition.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + return FluxConfiguration.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; } catch { @@ -127,11 +127,11 @@ public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models. } if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) { - return ErrorDefinition.DeserializeFromPSObject(sourceValue); + return FluxConfiguration.DeserializeFromPSObject(sourceValue); } if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) { - return ErrorDefinition.DeserializeFromDictionary(sourceValue); + return FluxConfiguration.DeserializeFromDictionary(sourceValue); } return null; } diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfiguration.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfiguration.cs new file mode 100644 index 000000000000..558cadb598be --- /dev/null +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfiguration.cs @@ -0,0 +1,795 @@ +// 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.KubernetesConfiguration.Models.Api20220301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; + + /// The Flux Configuration object returned in Get & Put response. + public partial class FluxConfiguration : + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfiguration, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.Resource(); + + /// Plaintext access key used to securely access the S3 bucket + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] + public System.Security.SecureString BucketAccessKey { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)Property).BucketAccessKey; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)Property).BucketAccessKey = value ?? null; } + + /// + /// Specify whether to use insecure communication when puling data from the S3 bucket. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] + public bool? BucketInsecure { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)Property).BucketInsecure; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)Property).BucketInsecure = value ?? default(bool); } + + /// + /// Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided + /// configuration secrets. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] + public string BucketLocalAuthRef { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)Property).BucketLocalAuthRef; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)Property).BucketLocalAuthRef = value ?? null; } + + /// The bucket name to sync from the url endpoint for the flux configuration. + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] + public string BucketName { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)Property).BucketName; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)Property).BucketName = value ?? null; } + + /// + /// The interval at which to re-reconcile the cluster git repository source with the remote. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] + public long? BucketSyncIntervalInSecond { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)Property).BucketSyncIntervalInSecond; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)Property).BucketSyncIntervalInSecond = value ?? default(long); } + + /// + /// The maximum time to attempt to reconcile the cluster git repository source with the remote. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] + public long? BucketTimeoutInSecond { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)Property).BucketTimeoutInSecond; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)Property).BucketTimeoutInSecond = value ?? default(long); } + + /// The URL to sync for the flux configuration S3 bucket. + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] + public string BucketUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)Property).BucketUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)Property).BucketUrl = value ?? null; } + + /// + /// Combined status of the Flux Kubernetes resources created by the fluxConfiguration or created by the managed objects. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.FluxComplianceState? ComplianceState { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)Property).ComplianceState; } + + /// Key-value pairs of protected configuration settings for the configuration + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesConfigurationProtectedSettings ConfigurationProtectedSetting { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)Property).ConfigurationProtectedSetting; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)Property).ConfigurationProtectedSetting = value ?? null /* model class */; } + + /// Error message returned to the user in the case of provisioning failure. + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] + public string ErrorMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)Property).ErrorMessage; } + + /// + /// Base64-encoded HTTPS certificate authority contents used to access git private git repositories over HTTPS + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] + public string GitRepositoryHttpsCaCert { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)Property).GitRepositoryHttpsCaCert; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)Property).GitRepositoryHttpsCaCert = value ?? null; } + + /// Plaintext HTTPS username used to access private git repositories over HTTPS + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] + public string GitRepositoryHttpsUser { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)Property).GitRepositoryHttpsUser; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)Property).GitRepositoryHttpsUser = value ?? null; } + + /// + /// Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided + /// configuration secrets. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] + public string GitRepositoryLocalAuthRef { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)Property).GitRepositoryLocalAuthRef; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)Property).GitRepositoryLocalAuthRef = value ?? null; } + + /// + /// Base64-encoded known_hosts value containing public SSH keys required to access private git repositories over SSH + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] + public string GitRepositorySshKnownHost { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)Property).GitRepositorySshKnownHost; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)Property).GitRepositorySshKnownHost = value ?? null; } + + /// + /// The interval at which to re-reconcile the cluster git repository source with the remote. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] + public long? GitRepositorySyncIntervalInSecond { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)Property).GitRepositorySyncIntervalInSecond; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)Property).GitRepositorySyncIntervalInSecond = value ?? default(long); } + + /// + /// The maximum time to attempt to reconcile the cluster git repository source with the remote. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] + public long? GitRepositoryTimeoutInSecond { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)Property).GitRepositoryTimeoutInSecond; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)Property).GitRepositoryTimeoutInSecond = value ?? default(long); } + + /// The URL to sync for the flux configuration git repository. + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] + public string GitRepositoryUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)Property).GitRepositoryUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)Property).GitRepositoryUrl = value ?? null; } + + /// + /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)__resource).Id; } + + /// + /// Array of kustomizations used to reconcile the artifact pulled by the source type on the cluster. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesKustomizations Kustomization { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)Property).Kustomization; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)Property).Kustomization = value ?? null /* model class */; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)__resource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)__resource).Name = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)__resource).Type = value; } + + /// Internal Acessors for Bucket + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IBucketDefinition Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal.Bucket { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)Property).Bucket; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)Property).Bucket = value; } + + /// Internal Acessors for ComplianceState + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.FluxComplianceState? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal.ComplianceState { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)Property).ComplianceState; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)Property).ComplianceState = value; } + + /// Internal Acessors for ErrorMessage + string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal.ErrorMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)Property).ErrorMessage; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)Property).ErrorMessage = value; } + + /// Internal Acessors for GitRepository + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryDefinition Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal.GitRepository { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)Property).GitRepository; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)Property).GitRepository = value; } + + /// Internal Acessors for GitRepositoryRef + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IRepositoryRefDefinition Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal.GitRepositoryRef { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)Property).GitRepositoryRef; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)Property).GitRepositoryRef = value; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationProperties Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.FluxConfigurationProperties()); set { {_property = value;} } } + + /// Internal Acessors for ProvisioningState + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)Property).ProvisioningState = value; } + + /// Internal Acessors for RepositoryPublicKey + string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal.RepositoryPublicKey { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)Property).RepositoryPublicKey; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)Property).RepositoryPublicKey = value; } + + /// Internal Acessors for SourceSyncedCommitId + string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal.SourceSyncedCommitId { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)Property).SourceSyncedCommitId; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)Property).SourceSyncedCommitId = value; } + + /// Internal Acessors for SourceUpdatedAt + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal.SourceUpdatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)Property).SourceUpdatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)Property).SourceUpdatedAt = value; } + + /// Internal Acessors for StatusUpdatedAt + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal.StatusUpdatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)Property).StatusUpdatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)Property).StatusUpdatedAt = value; } + + /// Internal Acessors for Statuses + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectStatusDefinition[] Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal.Statuses { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)Property).Statuses; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)Property).Statuses = value; } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemData Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationInternal.SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.SystemData()); set { {_systemData = value;} } } + + /// The name of the resource + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)__resource).Name; } + + /// + /// The namespace to which this configuration is installed to. Maximum of 253 lower case alphanumeric characters, hyphen and + /// period only. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] + public string Namespace { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)Property).Namespace; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)Property).Namespace = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationProperties _property; + + /// Properties to create a Flux Configuration resource + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.FluxConfigurationProperties()); set => this._property = value; } + + /// Status of the creation of the fluxConfiguration. + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningState? ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)Property).ProvisioningState; } + + /// + /// Public Key associated with this fluxConfiguration (either generated within the cluster or provided by the user). + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] + public string RepositoryPublicKey { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)Property).RepositoryPublicKey; } + + /// The git repository branch name to checkout. + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] + public string RepositoryRefBranch { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)Property).RepositoryRefBranch; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)Property).RepositoryRefBranch = value ?? null; } + + /// + /// The commit SHA to checkout. This value must be combined with the branch name to be valid. This takes precedence over semver. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] + public string RepositoryRefCommit { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)Property).RepositoryRefCommit; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)Property).RepositoryRefCommit = value ?? null; } + + /// + /// The semver range used to match against git repository tags. This takes precedence over tag. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] + public string RepositoryRefSemver { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)Property).RepositoryRefSemver; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)Property).RepositoryRefSemver = value ?? null; } + + /// The git repository tag name to checkout. This takes precedence over branch. + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] + public string RepositoryRefTag { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)Property).RepositoryRefTag; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)Property).RepositoryRefTag = value ?? null; } + + /// Gets the resource group name + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] + public string ResourceGroupName { get => (new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Success ? new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Groups["resourceGroupName"].Value : null); } + + /// Scope at which the operator will be installed. + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ScopeType? Scope { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)Property).Scope; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)Property).Scope = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ScopeType)""); } + + /// Source Kind to pull the configuration data from. + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType? SourceKind { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)Property).SourceKind; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)Property).SourceKind = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType)""); } + + /// Branch and/or SHA of the source commit synced with the cluster. + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] + public string SourceSyncedCommitId { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)Property).SourceSyncedCommitId; } + + /// Datetime the fluxConfiguration synced its source on the cluster. + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] + public global::System.DateTime? SourceUpdatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)Property).SourceUpdatedAt; } + + /// Datetime the fluxConfiguration synced its status on the cluster with Azure. + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] + public global::System.DateTime? StatusUpdatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)Property).StatusUpdatedAt; } + + /// + /// Statuses of the Flux Kubernetes resources created by the fluxConfiguration or created by the managed objects provisioned + /// by the fluxConfiguration. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectStatusDefinition[] Statuses { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)Property).Statuses; } + + /// + /// Whether this configuration should suspend its reconciliation of its kustomizations and sources. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] + public bool? Suspend { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)Property).Suspend; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)Property).Suspend = value ?? default(bool); } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemData _systemData; + + /// + /// Top level metadata https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/common-api-contracts.md#system-metadata-for-all-azure-resources + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemData SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.SystemData()); } + + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemDataInternal)SystemData).CreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemDataInternal)SystemData).CreatedAt = value ?? default(global::System.DateTime); } + + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemDataInternal)SystemData).CreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemDataInternal)SystemData).CreatedBy = value ?? null; } + + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemDataInternal)SystemData).CreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemDataInternal)SystemData).CreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.CreatedByType)""); } + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemDataInternal)SystemData).LastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemDataInternal)SystemData).LastModifiedAt = value ?? default(global::System.DateTime); } + + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemDataInternal)SystemData).LastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemDataInternal)SystemData).LastModifiedBy = value ?? null; } + + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemDataInternal)SystemData).LastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemDataInternal)SystemData).LastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.CreatedByType)""); } + + /// + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)__resource).Type; } + + /// Creates an new instance. + public FluxConfiguration() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__resource), __resource); + await eventListener.AssertObjectIsValid(nameof(__resource), __resource); + } + } + /// The Flux Configuration object returned in Get & Put response. + public partial interface IFluxConfiguration : + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResource + { + /// Plaintext access key used to securely access the S3 bucket + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Plaintext access key used to securely access the S3 bucket", + SerializedName = @"accessKey", + PossibleTypes = new [] { typeof(System.Security.SecureString) })] + System.Security.SecureString BucketAccessKey { get; set; } + /// + /// Specify whether to use insecure communication when puling data from the S3 bucket. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Specify whether to use insecure communication when puling data from the S3 bucket.", + SerializedName = @"insecure", + PossibleTypes = new [] { typeof(bool) })] + bool? BucketInsecure { get; set; } + /// + /// Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided + /// configuration secrets. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided configuration secrets.", + SerializedName = @"localAuthRef", + PossibleTypes = new [] { typeof(string) })] + string BucketLocalAuthRef { get; set; } + /// The bucket name to sync from the url endpoint for the flux configuration. + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The bucket name to sync from the url endpoint for the flux configuration.", + SerializedName = @"bucketName", + PossibleTypes = new [] { typeof(string) })] + string BucketName { get; set; } + /// + /// The interval at which to re-reconcile the cluster git repository source with the remote. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The interval at which to re-reconcile the cluster git repository source with the remote.", + SerializedName = @"syncIntervalInSeconds", + PossibleTypes = new [] { typeof(long) })] + long? BucketSyncIntervalInSecond { get; set; } + /// + /// The maximum time to attempt to reconcile the cluster git repository source with the remote. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The maximum time to attempt to reconcile the cluster git repository source with the remote.", + SerializedName = @"timeoutInSeconds", + PossibleTypes = new [] { typeof(long) })] + long? BucketTimeoutInSecond { get; set; } + /// The URL to sync for the flux configuration S3 bucket. + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The URL to sync for the flux configuration S3 bucket.", + SerializedName = @"url", + PossibleTypes = new [] { typeof(string) })] + string BucketUrl { get; set; } + /// + /// Combined status of the Flux Kubernetes resources created by the fluxConfiguration or created by the managed objects. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Combined status of the Flux Kubernetes resources created by the fluxConfiguration or created by the managed objects.", + SerializedName = @"complianceState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.FluxComplianceState) })] + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.FluxComplianceState? ComplianceState { get; } + /// Key-value pairs of protected configuration settings for the configuration + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Key-value pairs of protected configuration settings for the configuration", + SerializedName = @"configurationProtectedSettings", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesConfigurationProtectedSettings) })] + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesConfigurationProtectedSettings ConfigurationProtectedSetting { get; set; } + /// Error message returned to the user in the case of provisioning failure. + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Error message returned to the user in the case of provisioning failure.", + SerializedName = @"errorMessage", + PossibleTypes = new [] { typeof(string) })] + string ErrorMessage { get; } + /// + /// Base64-encoded HTTPS certificate authority contents used to access git private git repositories over HTTPS + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Base64-encoded HTTPS certificate authority contents used to access git private git repositories over HTTPS", + SerializedName = @"httpsCACert", + PossibleTypes = new [] { typeof(string) })] + string GitRepositoryHttpsCaCert { get; set; } + /// Plaintext HTTPS username used to access private git repositories over HTTPS + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Plaintext HTTPS username used to access private git repositories over HTTPS", + SerializedName = @"httpsUser", + PossibleTypes = new [] { typeof(string) })] + string GitRepositoryHttpsUser { get; set; } + /// + /// Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided + /// configuration secrets. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided configuration secrets.", + SerializedName = @"localAuthRef", + PossibleTypes = new [] { typeof(string) })] + string GitRepositoryLocalAuthRef { get; set; } + /// + /// Base64-encoded known_hosts value containing public SSH keys required to access private git repositories over SSH + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Base64-encoded known_hosts value containing public SSH keys required to access private git repositories over SSH", + SerializedName = @"sshKnownHosts", + PossibleTypes = new [] { typeof(string) })] + string GitRepositorySshKnownHost { get; set; } + /// + /// The interval at which to re-reconcile the cluster git repository source with the remote. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The interval at which to re-reconcile the cluster git repository source with the remote.", + SerializedName = @"syncIntervalInSeconds", + PossibleTypes = new [] { typeof(long) })] + long? GitRepositorySyncIntervalInSecond { get; set; } + /// + /// The maximum time to attempt to reconcile the cluster git repository source with the remote. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The maximum time to attempt to reconcile the cluster git repository source with the remote.", + SerializedName = @"timeoutInSeconds", + PossibleTypes = new [] { typeof(long) })] + long? GitRepositoryTimeoutInSecond { get; set; } + /// The URL to sync for the flux configuration git repository. + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The URL to sync for the flux configuration git repository.", + SerializedName = @"url", + PossibleTypes = new [] { typeof(string) })] + string GitRepositoryUrl { get; set; } + /// + /// Array of kustomizations used to reconcile the artifact pulled by the source type on the cluster. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Array of kustomizations used to reconcile the artifact pulled by the source type on the cluster.", + SerializedName = @"kustomizations", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesKustomizations) })] + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesKustomizations Kustomization { get; set; } + /// + /// The namespace to which this configuration is installed to. Maximum of 253 lower case alphanumeric characters, hyphen and + /// period only. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The namespace to which this configuration is installed to. Maximum of 253 lower case alphanumeric characters, hyphen and period only.", + SerializedName = @"namespace", + PossibleTypes = new [] { typeof(string) })] + string Namespace { get; set; } + /// Status of the creation of the fluxConfiguration. + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Status of the creation of the fluxConfiguration.", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningState) })] + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningState? ProvisioningState { get; } + /// + /// Public Key associated with this fluxConfiguration (either generated within the cluster or provided by the user). + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Public Key associated with this fluxConfiguration (either generated within the cluster or provided by the user).", + SerializedName = @"repositoryPublicKey", + PossibleTypes = new [] { typeof(string) })] + string RepositoryPublicKey { get; } + /// The git repository branch name to checkout. + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The git repository branch name to checkout.", + SerializedName = @"branch", + PossibleTypes = new [] { typeof(string) })] + string RepositoryRefBranch { get; set; } + /// + /// The commit SHA to checkout. This value must be combined with the branch name to be valid. This takes precedence over semver. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The commit SHA to checkout. This value must be combined with the branch name to be valid. This takes precedence over semver.", + SerializedName = @"commit", + PossibleTypes = new [] { typeof(string) })] + string RepositoryRefCommit { get; set; } + /// + /// The semver range used to match against git repository tags. This takes precedence over tag. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The semver range used to match against git repository tags. This takes precedence over tag.", + SerializedName = @"semver", + PossibleTypes = new [] { typeof(string) })] + string RepositoryRefSemver { get; set; } + /// The git repository tag name to checkout. This takes precedence over branch. + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The git repository tag name to checkout. This takes precedence over branch.", + SerializedName = @"tag", + PossibleTypes = new [] { typeof(string) })] + string RepositoryRefTag { get; set; } + /// Scope at which the operator will be installed. + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Scope at which the operator will be installed.", + SerializedName = @"scope", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ScopeType) })] + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ScopeType? Scope { get; set; } + /// Source Kind to pull the configuration data from. + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Source Kind to pull the configuration data from.", + SerializedName = @"sourceKind", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType) })] + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType? SourceKind { get; set; } + /// Branch and/or SHA of the source commit synced with the cluster. + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Branch and/or SHA of the source commit synced with the cluster.", + SerializedName = @"sourceSyncedCommitId", + PossibleTypes = new [] { typeof(string) })] + string SourceSyncedCommitId { get; } + /// Datetime the fluxConfiguration synced its source on the cluster. + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Datetime the fluxConfiguration synced its source on the cluster.", + SerializedName = @"sourceUpdatedAt", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? SourceUpdatedAt { get; } + /// Datetime the fluxConfiguration synced its status on the cluster with Azure. + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Datetime the fluxConfiguration synced its status on the cluster with Azure.", + SerializedName = @"statusUpdatedAt", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? StatusUpdatedAt { get; } + /// + /// Statuses of the Flux Kubernetes resources created by the fluxConfiguration or created by the managed objects provisioned + /// by the fluxConfiguration. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Statuses of the Flux Kubernetes resources created by the fluxConfiguration or created by the managed objects provisioned by the fluxConfiguration.", + SerializedName = @"statuses", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectStatusDefinition) })] + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectStatusDefinition[] Statuses { get; } + /// + /// Whether this configuration should suspend its reconciliation of its kustomizations and sources. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Whether this configuration should suspend its reconciliation of its kustomizations and sources.", + SerializedName = @"suspend", + PossibleTypes = new [] { typeof(bool) })] + bool? Suspend { get; set; } + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The timestamp of resource creation (UTC).", + SerializedName = @"createdAt", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? SystemDataCreatedAt { get; set; } + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The identity that created the resource.", + SerializedName = @"createdBy", + PossibleTypes = new [] { typeof(string) })] + string SystemDataCreatedBy { get; set; } + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The type of identity that created the resource.", + SerializedName = @"createdByType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.CreatedByType) })] + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.CreatedByType? SystemDataCreatedByType { get; set; } + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The timestamp of resource last modification (UTC)", + SerializedName = @"lastModifiedAt", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? SystemDataLastModifiedAt { get; set; } + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The identity that last modified the resource.", + SerializedName = @"lastModifiedBy", + PossibleTypes = new [] { typeof(string) })] + string SystemDataLastModifiedBy { get; set; } + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The type of identity that last modified the resource.", + SerializedName = @"lastModifiedByType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.CreatedByType) })] + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.CreatedByType? SystemDataLastModifiedByType { get; set; } + + } + /// The Flux Configuration object returned in Get & Put response. + internal partial interface IFluxConfigurationInternal : + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal + { + /// Parameters to reconcile to the Bucket source kind type. + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IBucketDefinition Bucket { get; set; } + /// Plaintext access key used to securely access the S3 bucket + System.Security.SecureString BucketAccessKey { get; set; } + /// + /// Specify whether to use insecure communication when puling data from the S3 bucket. + /// + bool? BucketInsecure { get; set; } + /// + /// Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided + /// configuration secrets. + /// + string BucketLocalAuthRef { get; set; } + /// The bucket name to sync from the url endpoint for the flux configuration. + string BucketName { get; set; } + /// + /// The interval at which to re-reconcile the cluster git repository source with the remote. + /// + long? BucketSyncIntervalInSecond { get; set; } + /// + /// The maximum time to attempt to reconcile the cluster git repository source with the remote. + /// + long? BucketTimeoutInSecond { get; set; } + /// The URL to sync for the flux configuration S3 bucket. + string BucketUrl { get; set; } + /// + /// Combined status of the Flux Kubernetes resources created by the fluxConfiguration or created by the managed objects. + /// + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.FluxComplianceState? ComplianceState { get; set; } + /// Key-value pairs of protected configuration settings for the configuration + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesConfigurationProtectedSettings ConfigurationProtectedSetting { get; set; } + /// Error message returned to the user in the case of provisioning failure. + string ErrorMessage { get; set; } + /// Parameters to reconcile to the GitRepository source kind type. + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryDefinition GitRepository { get; set; } + /// + /// Base64-encoded HTTPS certificate authority contents used to access git private git repositories over HTTPS + /// + string GitRepositoryHttpsCaCert { get; set; } + /// Plaintext HTTPS username used to access private git repositories over HTTPS + string GitRepositoryHttpsUser { get; set; } + /// + /// Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided + /// configuration secrets. + /// + string GitRepositoryLocalAuthRef { get; set; } + /// The source reference for the GitRepository object. + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IRepositoryRefDefinition GitRepositoryRef { get; set; } + /// + /// Base64-encoded known_hosts value containing public SSH keys required to access private git repositories over SSH + /// + string GitRepositorySshKnownHost { get; set; } + /// + /// The interval at which to re-reconcile the cluster git repository source with the remote. + /// + long? GitRepositorySyncIntervalInSecond { get; set; } + /// + /// The maximum time to attempt to reconcile the cluster git repository source with the remote. + /// + long? GitRepositoryTimeoutInSecond { get; set; } + /// The URL to sync for the flux configuration git repository. + string GitRepositoryUrl { get; set; } + /// + /// Array of kustomizations used to reconcile the artifact pulled by the source type on the cluster. + /// + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesKustomizations Kustomization { get; set; } + /// + /// The namespace to which this configuration is installed to. Maximum of 253 lower case alphanumeric characters, hyphen and + /// period only. + /// + string Namespace { get; set; } + /// Properties to create a Flux Configuration resource + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationProperties Property { get; set; } + /// Status of the creation of the fluxConfiguration. + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningState? ProvisioningState { get; set; } + /// + /// Public Key associated with this fluxConfiguration (either generated within the cluster or provided by the user). + /// + string RepositoryPublicKey { get; set; } + /// The git repository branch name to checkout. + string RepositoryRefBranch { get; set; } + /// + /// The commit SHA to checkout. This value must be combined with the branch name to be valid. This takes precedence over semver. + /// + string RepositoryRefCommit { get; set; } + /// + /// The semver range used to match against git repository tags. This takes precedence over tag. + /// + string RepositoryRefSemver { get; set; } + /// The git repository tag name to checkout. This takes precedence over branch. + string RepositoryRefTag { get; set; } + /// Scope at which the operator will be installed. + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ScopeType? Scope { get; set; } + /// Source Kind to pull the configuration data from. + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType? SourceKind { get; set; } + /// Branch and/or SHA of the source commit synced with the cluster. + string SourceSyncedCommitId { get; set; } + /// Datetime the fluxConfiguration synced its source on the cluster. + global::System.DateTime? SourceUpdatedAt { get; set; } + /// Datetime the fluxConfiguration synced its status on the cluster with Azure. + global::System.DateTime? StatusUpdatedAt { get; set; } + /// + /// Statuses of the Flux Kubernetes resources created by the fluxConfiguration or created by the managed objects provisioned + /// by the fluxConfiguration. + /// + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectStatusDefinition[] Statuses { get; set; } + /// + /// Whether this configuration should suspend its reconciliation of its kustomizations and sources. + /// + bool? Suspend { get; set; } + /// + /// Top level metadata https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/common-api-contracts.md#system-metadata-for-all-azure-resources + /// + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemData SystemData { get; set; } + /// The timestamp of resource creation (UTC). + global::System.DateTime? SystemDataCreatedAt { get; set; } + /// The identity that created the resource. + string SystemDataCreatedBy { get; set; } + /// The type of identity that created the resource. + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.CreatedByType? SystemDataCreatedByType { get; set; } + /// The timestamp of resource last modification (UTC) + global::System.DateTime? SystemDataLastModifiedAt { get; set; } + /// The identity that last modified the resource. + string SystemDataLastModifiedBy { get; set; } + /// The type of identity that last modified the resource. + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.CreatedByType? SystemDataLastModifiedByType { get; set; } + + } +} \ No newline at end of file diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfiguration.json.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfiguration.json.cs new file mode 100644 index 000000000000..408ce8620d18 --- /dev/null +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfiguration.json.cs @@ -0,0 +1,115 @@ +// 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.KubernetesConfiguration.Models.Api20220301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; + + /// The Flux Configuration object returned in Get & Put response. + public partial class FluxConfiguration + { + + /// + /// 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.KubernetesConfiguration.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject instance to deserialize from. + internal FluxConfiguration(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __resource = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.Resource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.FluxConfigurationProperties.FromJson(__jsonProperties) : Property;} + {_systemData = If( json?.PropertyT("systemData"), out var __jsonSystemData) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.SystemData.FromJson(__jsonSystemData) : SystemData;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfiguration. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfiguration. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfiguration FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json ? new FluxConfiguration(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.KubernetesConfiguration.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __resource?.ToJson(container, serializationMode); + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._systemData ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) this._systemData.ToJson(null,serializationMode) : null, "systemData" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfigurationPatch.PowerShell.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfigurationPatch.PowerShell.cs new file mode 100644 index 000000000000..9e9db5d9dceb --- /dev/null +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfigurationPatch.PowerShell.cs @@ -0,0 +1,366 @@ +// 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.KubernetesConfiguration.Models.Api20220301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; + + /// The Flux Configuration Patch Request object. + [System.ComponentModel.TypeConverter(typeof(FluxConfigurationPatchTypeConverter))] + public partial class FluxConfigurationPatch + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatch DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new FluxConfigurationPatch(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.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatch DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new FluxConfigurationPatch(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal FluxConfigurationPatch(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.FluxConfigurationPatchPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("GitRepository")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchInternal)this).GitRepository = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryPatchDefinition) content.GetValueForProperty("GitRepository",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchInternal)this).GitRepository, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.GitRepositoryPatchDefinitionTypeConverter.ConvertFrom); + } + if (content.Contains("Bucket")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchInternal)this).Bucket = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IBucketPatchDefinition) content.GetValueForProperty("Bucket",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchInternal)this).Bucket, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.BucketPatchDefinitionTypeConverter.ConvertFrom); + } + if (content.Contains("SourceKind")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchInternal)this).SourceKind = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType?) content.GetValueForProperty("SourceKind",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchInternal)this).SourceKind, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType.CreateFrom); + } + if (content.Contains("Suspend")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchInternal)this).Suspend = (bool?) content.GetValueForProperty("Suspend",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchInternal)this).Suspend, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("Kustomization")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchInternal)this).Kustomization = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesKustomizations) content.GetValueForProperty("Kustomization",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchInternal)this).Kustomization, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.FluxConfigurationPatchPropertiesKustomizationsTypeConverter.ConvertFrom); + } + if (content.Contains("ConfigurationProtectedSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchInternal)this).ConfigurationProtectedSetting = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesConfigurationProtectedSettings) content.GetValueForProperty("ConfigurationProtectedSetting",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchInternal)this).ConfigurationProtectedSetting, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.FluxConfigurationPatchPropertiesConfigurationProtectedSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("GitRepositoryRef")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchInternal)this).GitRepositoryRef = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IRepositoryRefDefinition) content.GetValueForProperty("GitRepositoryRef",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchInternal)this).GitRepositoryRef, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.RepositoryRefDefinitionTypeConverter.ConvertFrom); + } + if (content.Contains("GitRepositoryUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchInternal)this).GitRepositoryUrl = (string) content.GetValueForProperty("GitRepositoryUrl",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchInternal)this).GitRepositoryUrl, global::System.Convert.ToString); + } + if (content.Contains("GitRepositoryTimeoutInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchInternal)this).GitRepositoryTimeoutInSecond = (long?) content.GetValueForProperty("GitRepositoryTimeoutInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchInternal)this).GitRepositoryTimeoutInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("GitRepositorySyncIntervalInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchInternal)this).GitRepositorySyncIntervalInSecond = (long?) content.GetValueForProperty("GitRepositorySyncIntervalInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchInternal)this).GitRepositorySyncIntervalInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("GitRepositorySshKnownHost")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchInternal)this).GitRepositorySshKnownHost = (string) content.GetValueForProperty("GitRepositorySshKnownHost",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchInternal)this).GitRepositorySshKnownHost, global::System.Convert.ToString); + } + if (content.Contains("GitRepositoryHttpsUser")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchInternal)this).GitRepositoryHttpsUser = (string) content.GetValueForProperty("GitRepositoryHttpsUser",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchInternal)this).GitRepositoryHttpsUser, global::System.Convert.ToString); + } + if (content.Contains("GitRepositoryHttpsCaCert")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchInternal)this).GitRepositoryHttpsCaCert = (string) content.GetValueForProperty("GitRepositoryHttpsCaCert",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchInternal)this).GitRepositoryHttpsCaCert, global::System.Convert.ToString); + } + if (content.Contains("GitRepositoryLocalAuthRef")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchInternal)this).GitRepositoryLocalAuthRef = (string) content.GetValueForProperty("GitRepositoryLocalAuthRef",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchInternal)this).GitRepositoryLocalAuthRef, global::System.Convert.ToString); + } + if (content.Contains("BucketUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchInternal)this).BucketUrl = (string) content.GetValueForProperty("BucketUrl",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchInternal)this).BucketUrl, global::System.Convert.ToString); + } + if (content.Contains("BucketName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchInternal)this).BucketName = (string) content.GetValueForProperty("BucketName",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchInternal)this).BucketName, global::System.Convert.ToString); + } + if (content.Contains("BucketInsecure")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchInternal)this).BucketInsecure = (bool?) content.GetValueForProperty("BucketInsecure",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchInternal)this).BucketInsecure, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("BucketTimeoutInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchInternal)this).BucketTimeoutInSecond = (long?) content.GetValueForProperty("BucketTimeoutInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchInternal)this).BucketTimeoutInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("BucketSyncIntervalInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchInternal)this).BucketSyncIntervalInSecond = (long?) content.GetValueForProperty("BucketSyncIntervalInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchInternal)this).BucketSyncIntervalInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("BucketAccessKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchInternal)this).BucketAccessKey = (System.Security.SecureString) content.GetValueForProperty("BucketAccessKey",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchInternal)this).BucketAccessKey, (object ss) => (System.Security.SecureString)ss); + } + if (content.Contains("BucketLocalAuthRef")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchInternal)this).BucketLocalAuthRef = (string) content.GetValueForProperty("BucketLocalAuthRef",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchInternal)this).BucketLocalAuthRef, global::System.Convert.ToString); + } + if (content.Contains("RepositoryRefBranch")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchInternal)this).RepositoryRefBranch = (string) content.GetValueForProperty("RepositoryRefBranch",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchInternal)this).RepositoryRefBranch, global::System.Convert.ToString); + } + if (content.Contains("RepositoryRefTag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchInternal)this).RepositoryRefTag = (string) content.GetValueForProperty("RepositoryRefTag",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchInternal)this).RepositoryRefTag, global::System.Convert.ToString); + } + if (content.Contains("RepositoryRefSemver")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchInternal)this).RepositoryRefSemver = (string) content.GetValueForProperty("RepositoryRefSemver",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchInternal)this).RepositoryRefSemver, global::System.Convert.ToString); + } + if (content.Contains("RepositoryRefCommit")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchInternal)this).RepositoryRefCommit = (string) content.GetValueForProperty("RepositoryRefCommit",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchInternal)this).RepositoryRefCommit, 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 FluxConfigurationPatch(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.FluxConfigurationPatchPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("GitRepository")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchInternal)this).GitRepository = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryPatchDefinition) content.GetValueForProperty("GitRepository",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchInternal)this).GitRepository, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.GitRepositoryPatchDefinitionTypeConverter.ConvertFrom); + } + if (content.Contains("Bucket")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchInternal)this).Bucket = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IBucketPatchDefinition) content.GetValueForProperty("Bucket",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchInternal)this).Bucket, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.BucketPatchDefinitionTypeConverter.ConvertFrom); + } + if (content.Contains("SourceKind")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchInternal)this).SourceKind = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType?) content.GetValueForProperty("SourceKind",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchInternal)this).SourceKind, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType.CreateFrom); + } + if (content.Contains("Suspend")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchInternal)this).Suspend = (bool?) content.GetValueForProperty("Suspend",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchInternal)this).Suspend, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("Kustomization")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchInternal)this).Kustomization = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesKustomizations) content.GetValueForProperty("Kustomization",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchInternal)this).Kustomization, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.FluxConfigurationPatchPropertiesKustomizationsTypeConverter.ConvertFrom); + } + if (content.Contains("ConfigurationProtectedSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchInternal)this).ConfigurationProtectedSetting = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesConfigurationProtectedSettings) content.GetValueForProperty("ConfigurationProtectedSetting",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchInternal)this).ConfigurationProtectedSetting, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.FluxConfigurationPatchPropertiesConfigurationProtectedSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("GitRepositoryRef")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchInternal)this).GitRepositoryRef = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IRepositoryRefDefinition) content.GetValueForProperty("GitRepositoryRef",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchInternal)this).GitRepositoryRef, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.RepositoryRefDefinitionTypeConverter.ConvertFrom); + } + if (content.Contains("GitRepositoryUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchInternal)this).GitRepositoryUrl = (string) content.GetValueForProperty("GitRepositoryUrl",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchInternal)this).GitRepositoryUrl, global::System.Convert.ToString); + } + if (content.Contains("GitRepositoryTimeoutInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchInternal)this).GitRepositoryTimeoutInSecond = (long?) content.GetValueForProperty("GitRepositoryTimeoutInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchInternal)this).GitRepositoryTimeoutInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("GitRepositorySyncIntervalInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchInternal)this).GitRepositorySyncIntervalInSecond = (long?) content.GetValueForProperty("GitRepositorySyncIntervalInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchInternal)this).GitRepositorySyncIntervalInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("GitRepositorySshKnownHost")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchInternal)this).GitRepositorySshKnownHost = (string) content.GetValueForProperty("GitRepositorySshKnownHost",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchInternal)this).GitRepositorySshKnownHost, global::System.Convert.ToString); + } + if (content.Contains("GitRepositoryHttpsUser")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchInternal)this).GitRepositoryHttpsUser = (string) content.GetValueForProperty("GitRepositoryHttpsUser",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchInternal)this).GitRepositoryHttpsUser, global::System.Convert.ToString); + } + if (content.Contains("GitRepositoryHttpsCaCert")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchInternal)this).GitRepositoryHttpsCaCert = (string) content.GetValueForProperty("GitRepositoryHttpsCaCert",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchInternal)this).GitRepositoryHttpsCaCert, global::System.Convert.ToString); + } + if (content.Contains("GitRepositoryLocalAuthRef")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchInternal)this).GitRepositoryLocalAuthRef = (string) content.GetValueForProperty("GitRepositoryLocalAuthRef",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchInternal)this).GitRepositoryLocalAuthRef, global::System.Convert.ToString); + } + if (content.Contains("BucketUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchInternal)this).BucketUrl = (string) content.GetValueForProperty("BucketUrl",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchInternal)this).BucketUrl, global::System.Convert.ToString); + } + if (content.Contains("BucketName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchInternal)this).BucketName = (string) content.GetValueForProperty("BucketName",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchInternal)this).BucketName, global::System.Convert.ToString); + } + if (content.Contains("BucketInsecure")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchInternal)this).BucketInsecure = (bool?) content.GetValueForProperty("BucketInsecure",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchInternal)this).BucketInsecure, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("BucketTimeoutInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchInternal)this).BucketTimeoutInSecond = (long?) content.GetValueForProperty("BucketTimeoutInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchInternal)this).BucketTimeoutInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("BucketSyncIntervalInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchInternal)this).BucketSyncIntervalInSecond = (long?) content.GetValueForProperty("BucketSyncIntervalInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchInternal)this).BucketSyncIntervalInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("BucketAccessKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchInternal)this).BucketAccessKey = (System.Security.SecureString) content.GetValueForProperty("BucketAccessKey",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchInternal)this).BucketAccessKey, (object ss) => (System.Security.SecureString)ss); + } + if (content.Contains("BucketLocalAuthRef")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchInternal)this).BucketLocalAuthRef = (string) content.GetValueForProperty("BucketLocalAuthRef",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchInternal)this).BucketLocalAuthRef, global::System.Convert.ToString); + } + if (content.Contains("RepositoryRefBranch")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchInternal)this).RepositoryRefBranch = (string) content.GetValueForProperty("RepositoryRefBranch",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchInternal)this).RepositoryRefBranch, global::System.Convert.ToString); + } + if (content.Contains("RepositoryRefTag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchInternal)this).RepositoryRefTag = (string) content.GetValueForProperty("RepositoryRefTag",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchInternal)this).RepositoryRefTag, global::System.Convert.ToString); + } + if (content.Contains("RepositoryRefSemver")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchInternal)this).RepositoryRefSemver = (string) content.GetValueForProperty("RepositoryRefSemver",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchInternal)this).RepositoryRefSemver, global::System.Convert.ToString); + } + if (content.Contains("RepositoryRefCommit")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchInternal)this).RepositoryRefCommit = (string) content.GetValueForProperty("RepositoryRefCommit",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchInternal)this).RepositoryRefCommit, 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.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatch FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The Flux Configuration Patch Request object. + [System.ComponentModel.TypeConverter(typeof(FluxConfigurationPatchTypeConverter))] + public partial interface IFluxConfigurationPatch + + { + + } +} \ No newline at end of file diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfigurationPatch.TypeConverter.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfigurationPatch.TypeConverter.cs new file mode 100644 index 000000000000..632fadd0bd32 --- /dev/null +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfigurationPatch.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class FluxConfigurationPatchTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatch ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatch).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return FluxConfigurationPatch.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return FluxConfigurationPatch.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return FluxConfigurationPatch.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/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfigurationPatch.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfigurationPatch.cs new file mode 100644 index 000000000000..8224457e866d --- /dev/null +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfigurationPatch.cs @@ -0,0 +1,453 @@ +// 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.KubernetesConfiguration.Models.Api20220301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; + + /// The Flux Configuration Patch Request object. + public partial class FluxConfigurationPatch : + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatch, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchInternal + { + + /// Plaintext access key used to securely access the S3 bucket + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] + public System.Security.SecureString BucketAccessKey { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)Property).BucketAccessKey; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)Property).BucketAccessKey = value ?? null; } + + /// + /// Specify whether to use insecure communication when puling data from the S3 bucket. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] + public bool? BucketInsecure { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)Property).BucketInsecure; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)Property).BucketInsecure = value ?? default(bool); } + + /// + /// Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided + /// configuration secrets. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] + public string BucketLocalAuthRef { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)Property).BucketLocalAuthRef; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)Property).BucketLocalAuthRef = value ?? null; } + + /// The bucket name to sync from the url endpoint for the flux configuration. + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] + public string BucketName { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)Property).BucketName; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)Property).BucketName = value ?? null; } + + /// + /// The interval at which to re-reconcile the cluster git repository source with the remote. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] + public long? BucketSyncIntervalInSecond { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)Property).BucketSyncIntervalInSecond; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)Property).BucketSyncIntervalInSecond = value ?? default(long); } + + /// + /// The maximum time to attempt to reconcile the cluster git repository source with the remote. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] + public long? BucketTimeoutInSecond { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)Property).BucketTimeoutInSecond; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)Property).BucketTimeoutInSecond = value ?? default(long); } + + /// The URL to sync for the flux configuration S3 bucket. + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] + public string BucketUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)Property).BucketUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)Property).BucketUrl = value ?? null; } + + /// Key-value pairs of protected configuration settings for the configuration + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesConfigurationProtectedSettings ConfigurationProtectedSetting { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)Property).ConfigurationProtectedSetting; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)Property).ConfigurationProtectedSetting = value ?? null /* model class */; } + + /// + /// Base64-encoded HTTPS certificate authority contents used to access git private git repositories over HTTPS + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] + public string GitRepositoryHttpsCaCert { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)Property).GitRepositoryHttpsCaCert; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)Property).GitRepositoryHttpsCaCert = value ?? null; } + + /// Plaintext HTTPS username used to access private git repositories over HTTPS + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] + public string GitRepositoryHttpsUser { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)Property).GitRepositoryHttpsUser; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)Property).GitRepositoryHttpsUser = value ?? null; } + + /// + /// Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided + /// configuration secrets. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] + public string GitRepositoryLocalAuthRef { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)Property).GitRepositoryLocalAuthRef; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)Property).GitRepositoryLocalAuthRef = value ?? null; } + + /// + /// Base64-encoded known_hosts value containing public SSH keys required to access private git repositories over SSH + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] + public string GitRepositorySshKnownHost { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)Property).GitRepositorySshKnownHost; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)Property).GitRepositorySshKnownHost = value ?? null; } + + /// + /// The interval at which to re-reconcile the cluster git repository source with the remote. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] + public long? GitRepositorySyncIntervalInSecond { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)Property).GitRepositorySyncIntervalInSecond; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)Property).GitRepositorySyncIntervalInSecond = value ?? default(long); } + + /// + /// The maximum time to attempt to reconcile the cluster git repository source with the remote. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] + public long? GitRepositoryTimeoutInSecond { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)Property).GitRepositoryTimeoutInSecond; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)Property).GitRepositoryTimeoutInSecond = value ?? default(long); } + + /// The URL to sync for the flux configuration git repository. + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] + public string GitRepositoryUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)Property).GitRepositoryUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)Property).GitRepositoryUrl = value ?? null; } + + /// + /// Array of kustomizations used to reconcile the artifact pulled by the source type on the cluster. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesKustomizations Kustomization { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)Property).Kustomization; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)Property).Kustomization = value ?? null /* model class */; } + + /// Internal Acessors for Bucket + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IBucketPatchDefinition Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchInternal.Bucket { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)Property).Bucket; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)Property).Bucket = value; } + + /// Internal Acessors for GitRepository + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryPatchDefinition Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchInternal.GitRepository { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)Property).GitRepository; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)Property).GitRepository = value; } + + /// Internal Acessors for GitRepositoryRef + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IRepositoryRefDefinition Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchInternal.GitRepositoryRef { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)Property).GitRepositoryRef; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)Property).GitRepositoryRef = value; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchProperties Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.FluxConfigurationPatchProperties()); set { {_property = value;} } } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchProperties _property; + + /// Updatable properties of an Flux Configuration Patch Request + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.FluxConfigurationPatchProperties()); set => this._property = value; } + + /// The git repository branch name to checkout. + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] + public string RepositoryRefBranch { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)Property).RepositoryRefBranch; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)Property).RepositoryRefBranch = value ?? null; } + + /// + /// The commit SHA to checkout. This value must be combined with the branch name to be valid. This takes precedence over semver. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] + public string RepositoryRefCommit { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)Property).RepositoryRefCommit; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)Property).RepositoryRefCommit = value ?? null; } + + /// + /// The semver range used to match against git repository tags. This takes precedence over tag. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] + public string RepositoryRefSemver { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)Property).RepositoryRefSemver; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)Property).RepositoryRefSemver = value ?? null; } + + /// The git repository tag name to checkout. This takes precedence over branch. + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] + public string RepositoryRefTag { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)Property).RepositoryRefTag; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)Property).RepositoryRefTag = value ?? null; } + + /// Source Kind to pull the configuration data from. + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType? SourceKind { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)Property).SourceKind; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)Property).SourceKind = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType)""); } + + /// + /// Whether this configuration should suspend its reconciliation of its kustomizations and sources. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] + public bool? Suspend { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)Property).Suspend; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)Property).Suspend = value ?? default(bool); } + + /// Creates an new instance. + public FluxConfigurationPatch() + { + + } + } + /// The Flux Configuration Patch Request object. + public partial interface IFluxConfigurationPatch : + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IJsonSerializable + { + /// Plaintext access key used to securely access the S3 bucket + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Plaintext access key used to securely access the S3 bucket", + SerializedName = @"accessKey", + PossibleTypes = new [] { typeof(System.Security.SecureString) })] + System.Security.SecureString BucketAccessKey { get; set; } + /// + /// Specify whether to use insecure communication when puling data from the S3 bucket. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Specify whether to use insecure communication when puling data from the S3 bucket.", + SerializedName = @"insecure", + PossibleTypes = new [] { typeof(bool) })] + bool? BucketInsecure { get; set; } + /// + /// Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided + /// configuration secrets. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided configuration secrets.", + SerializedName = @"localAuthRef", + PossibleTypes = new [] { typeof(string) })] + string BucketLocalAuthRef { get; set; } + /// The bucket name to sync from the url endpoint for the flux configuration. + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The bucket name to sync from the url endpoint for the flux configuration.", + SerializedName = @"bucketName", + PossibleTypes = new [] { typeof(string) })] + string BucketName { get; set; } + /// + /// The interval at which to re-reconcile the cluster git repository source with the remote. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The interval at which to re-reconcile the cluster git repository source with the remote.", + SerializedName = @"syncIntervalInSeconds", + PossibleTypes = new [] { typeof(long) })] + long? BucketSyncIntervalInSecond { get; set; } + /// + /// The maximum time to attempt to reconcile the cluster git repository source with the remote. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The maximum time to attempt to reconcile the cluster git repository source with the remote.", + SerializedName = @"timeoutInSeconds", + PossibleTypes = new [] { typeof(long) })] + long? BucketTimeoutInSecond { get; set; } + /// The URL to sync for the flux configuration S3 bucket. + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The URL to sync for the flux configuration S3 bucket.", + SerializedName = @"url", + PossibleTypes = new [] { typeof(string) })] + string BucketUrl { get; set; } + /// Key-value pairs of protected configuration settings for the configuration + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Key-value pairs of protected configuration settings for the configuration", + SerializedName = @"configurationProtectedSettings", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesConfigurationProtectedSettings) })] + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesConfigurationProtectedSettings ConfigurationProtectedSetting { get; set; } + /// + /// Base64-encoded HTTPS certificate authority contents used to access git private git repositories over HTTPS + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Base64-encoded HTTPS certificate authority contents used to access git private git repositories over HTTPS", + SerializedName = @"httpsCACert", + PossibleTypes = new [] { typeof(string) })] + string GitRepositoryHttpsCaCert { get; set; } + /// Plaintext HTTPS username used to access private git repositories over HTTPS + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Plaintext HTTPS username used to access private git repositories over HTTPS", + SerializedName = @"httpsUser", + PossibleTypes = new [] { typeof(string) })] + string GitRepositoryHttpsUser { get; set; } + /// + /// Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided + /// configuration secrets. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided configuration secrets.", + SerializedName = @"localAuthRef", + PossibleTypes = new [] { typeof(string) })] + string GitRepositoryLocalAuthRef { get; set; } + /// + /// Base64-encoded known_hosts value containing public SSH keys required to access private git repositories over SSH + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Base64-encoded known_hosts value containing public SSH keys required to access private git repositories over SSH", + SerializedName = @"sshKnownHosts", + PossibleTypes = new [] { typeof(string) })] + string GitRepositorySshKnownHost { get; set; } + /// + /// The interval at which to re-reconcile the cluster git repository source with the remote. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The interval at which to re-reconcile the cluster git repository source with the remote.", + SerializedName = @"syncIntervalInSeconds", + PossibleTypes = new [] { typeof(long) })] + long? GitRepositorySyncIntervalInSecond { get; set; } + /// + /// The maximum time to attempt to reconcile the cluster git repository source with the remote. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The maximum time to attempt to reconcile the cluster git repository source with the remote.", + SerializedName = @"timeoutInSeconds", + PossibleTypes = new [] { typeof(long) })] + long? GitRepositoryTimeoutInSecond { get; set; } + /// The URL to sync for the flux configuration git repository. + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The URL to sync for the flux configuration git repository.", + SerializedName = @"url", + PossibleTypes = new [] { typeof(string) })] + string GitRepositoryUrl { get; set; } + /// + /// Array of kustomizations used to reconcile the artifact pulled by the source type on the cluster. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Array of kustomizations used to reconcile the artifact pulled by the source type on the cluster.", + SerializedName = @"kustomizations", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesKustomizations) })] + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesKustomizations Kustomization { get; set; } + /// The git repository branch name to checkout. + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The git repository branch name to checkout.", + SerializedName = @"branch", + PossibleTypes = new [] { typeof(string) })] + string RepositoryRefBranch { get; set; } + /// + /// The commit SHA to checkout. This value must be combined with the branch name to be valid. This takes precedence over semver. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The commit SHA to checkout. This value must be combined with the branch name to be valid. This takes precedence over semver.", + SerializedName = @"commit", + PossibleTypes = new [] { typeof(string) })] + string RepositoryRefCommit { get; set; } + /// + /// The semver range used to match against git repository tags. This takes precedence over tag. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The semver range used to match against git repository tags. This takes precedence over tag.", + SerializedName = @"semver", + PossibleTypes = new [] { typeof(string) })] + string RepositoryRefSemver { get; set; } + /// The git repository tag name to checkout. This takes precedence over branch. + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The git repository tag name to checkout. This takes precedence over branch.", + SerializedName = @"tag", + PossibleTypes = new [] { typeof(string) })] + string RepositoryRefTag { get; set; } + /// Source Kind to pull the configuration data from. + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Source Kind to pull the configuration data from.", + SerializedName = @"sourceKind", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType) })] + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType? SourceKind { get; set; } + /// + /// Whether this configuration should suspend its reconciliation of its kustomizations and sources. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Whether this configuration should suspend its reconciliation of its kustomizations and sources.", + SerializedName = @"suspend", + PossibleTypes = new [] { typeof(bool) })] + bool? Suspend { get; set; } + + } + /// The Flux Configuration Patch Request object. + internal partial interface IFluxConfigurationPatchInternal + + { + /// Parameters to reconcile to the Bucket source kind type. + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IBucketPatchDefinition Bucket { get; set; } + /// Plaintext access key used to securely access the S3 bucket + System.Security.SecureString BucketAccessKey { get; set; } + /// + /// Specify whether to use insecure communication when puling data from the S3 bucket. + /// + bool? BucketInsecure { get; set; } + /// + /// Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided + /// configuration secrets. + /// + string BucketLocalAuthRef { get; set; } + /// The bucket name to sync from the url endpoint for the flux configuration. + string BucketName { get; set; } + /// + /// The interval at which to re-reconcile the cluster git repository source with the remote. + /// + long? BucketSyncIntervalInSecond { get; set; } + /// + /// The maximum time to attempt to reconcile the cluster git repository source with the remote. + /// + long? BucketTimeoutInSecond { get; set; } + /// The URL to sync for the flux configuration S3 bucket. + string BucketUrl { get; set; } + /// Key-value pairs of protected configuration settings for the configuration + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesConfigurationProtectedSettings ConfigurationProtectedSetting { get; set; } + /// Parameters to reconcile to the GitRepository source kind type. + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryPatchDefinition GitRepository { get; set; } + /// + /// Base64-encoded HTTPS certificate authority contents used to access git private git repositories over HTTPS + /// + string GitRepositoryHttpsCaCert { get; set; } + /// Plaintext HTTPS username used to access private git repositories over HTTPS + string GitRepositoryHttpsUser { get; set; } + /// + /// Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided + /// configuration secrets. + /// + string GitRepositoryLocalAuthRef { get; set; } + /// The source reference for the GitRepository object. + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IRepositoryRefDefinition GitRepositoryRef { get; set; } + /// + /// Base64-encoded known_hosts value containing public SSH keys required to access private git repositories over SSH + /// + string GitRepositorySshKnownHost { get; set; } + /// + /// The interval at which to re-reconcile the cluster git repository source with the remote. + /// + long? GitRepositorySyncIntervalInSecond { get; set; } + /// + /// The maximum time to attempt to reconcile the cluster git repository source with the remote. + /// + long? GitRepositoryTimeoutInSecond { get; set; } + /// The URL to sync for the flux configuration git repository. + string GitRepositoryUrl { get; set; } + /// + /// Array of kustomizations used to reconcile the artifact pulled by the source type on the cluster. + /// + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesKustomizations Kustomization { get; set; } + /// Updatable properties of an Flux Configuration Patch Request + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchProperties Property { get; set; } + /// The git repository branch name to checkout. + string RepositoryRefBranch { get; set; } + /// + /// The commit SHA to checkout. This value must be combined with the branch name to be valid. This takes precedence over semver. + /// + string RepositoryRefCommit { get; set; } + /// + /// The semver range used to match against git repository tags. This takes precedence over tag. + /// + string RepositoryRefSemver { get; set; } + /// The git repository tag name to checkout. This takes precedence over branch. + string RepositoryRefTag { get; set; } + /// Source Kind to pull the configuration data from. + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType? SourceKind { get; set; } + /// + /// Whether this configuration should suspend its reconciliation of its kustomizations and sources. + /// + bool? Suspend { get; set; } + + } +} \ No newline at end of file diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20210301/Result.json.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfigurationPatch.json.cs similarity index 73% rename from src/KubernetesConfiguration/generated/api/Models/Api20210301/Result.json.cs rename to src/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfigurationPatch.json.cs index e91b160398b3..8410aa45d0b8 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Api20210301/Result.json.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfigurationPatch.json.cs @@ -3,12 +3,12 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; - /// Sample result definition - public partial class Result + /// The Flux Configuration Patch Request object. + public partial class FluxConfigurationPatch { /// @@ -20,7 +20,7 @@ public partial class Result partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class Result /// /// 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. + /// 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. @@ -42,7 +43,8 @@ public partial class Result /// /// 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. + /// 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. @@ -52,22 +54,10 @@ public partial class Result partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IResult. - /// - /// a to deserialize from. - /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IResult. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) - { - return node is Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json ? new Result(json) : null; - } - - /// - /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject into a new instance of . + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject into a new instance of . /// /// A Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject instance to deserialize from. - internal Result(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json) + internal FluxConfigurationPatch(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); @@ -75,18 +65,30 @@ internal Result(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runti { return; } - {_sampleProperty = If( json?.PropertyT("sampleProperty"), out var __jsonSampleProperty) ? (string)__jsonSampleProperty : (string)SampleProperty;} + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.FluxConfigurationPatchProperties.FromJson(__jsonProperties) : Property;} AfterFromJson(json); } /// - /// Serializes this instance of into a . + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatch. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatch. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatch FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json ? new FluxConfigurationPatch(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 . + /// a serialized instance of as a . /// public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode serializationMode) { @@ -98,7 +100,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.J { return container; } - AddIf( null != (((object)this._sampleProperty)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonString(this._sampleProperty.ToString()) : null, "sampleProperty" ,container.Add ); + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); AfterToJson(ref container); return container; } diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfigurationPatchProperties.PowerShell.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfigurationPatchProperties.PowerShell.cs new file mode 100644 index 000000000000..8b107179a35b --- /dev/null +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfigurationPatchProperties.PowerShell.cs @@ -0,0 +1,358 @@ +// 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.KubernetesConfiguration.Models.Api20220301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; + + /// Updatable properties of an Flux Configuration Patch Request + [System.ComponentModel.TypeConverter(typeof(FluxConfigurationPatchPropertiesTypeConverter))] + public partial class FluxConfigurationPatchProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new FluxConfigurationPatchProperties(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.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new FluxConfigurationPatchProperties(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal FluxConfigurationPatchProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("GitRepository")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)this).GitRepository = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryPatchDefinition) content.GetValueForProperty("GitRepository",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)this).GitRepository, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.GitRepositoryPatchDefinitionTypeConverter.ConvertFrom); + } + if (content.Contains("Bucket")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)this).Bucket = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IBucketPatchDefinition) content.GetValueForProperty("Bucket",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)this).Bucket, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.BucketPatchDefinitionTypeConverter.ConvertFrom); + } + if (content.Contains("SourceKind")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)this).SourceKind = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType?) content.GetValueForProperty("SourceKind",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)this).SourceKind, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType.CreateFrom); + } + if (content.Contains("Suspend")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)this).Suspend = (bool?) content.GetValueForProperty("Suspend",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)this).Suspend, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("Kustomization")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)this).Kustomization = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesKustomizations) content.GetValueForProperty("Kustomization",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)this).Kustomization, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.FluxConfigurationPatchPropertiesKustomizationsTypeConverter.ConvertFrom); + } + if (content.Contains("ConfigurationProtectedSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)this).ConfigurationProtectedSetting = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesConfigurationProtectedSettings) content.GetValueForProperty("ConfigurationProtectedSetting",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)this).ConfigurationProtectedSetting, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.FluxConfigurationPatchPropertiesConfigurationProtectedSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("GitRepositoryRef")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)this).GitRepositoryRef = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IRepositoryRefDefinition) content.GetValueForProperty("GitRepositoryRef",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)this).GitRepositoryRef, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.RepositoryRefDefinitionTypeConverter.ConvertFrom); + } + if (content.Contains("GitRepositoryUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)this).GitRepositoryUrl = (string) content.GetValueForProperty("GitRepositoryUrl",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)this).GitRepositoryUrl, global::System.Convert.ToString); + } + if (content.Contains("GitRepositoryTimeoutInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)this).GitRepositoryTimeoutInSecond = (long?) content.GetValueForProperty("GitRepositoryTimeoutInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)this).GitRepositoryTimeoutInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("GitRepositorySyncIntervalInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)this).GitRepositorySyncIntervalInSecond = (long?) content.GetValueForProperty("GitRepositorySyncIntervalInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)this).GitRepositorySyncIntervalInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("GitRepositorySshKnownHost")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)this).GitRepositorySshKnownHost = (string) content.GetValueForProperty("GitRepositorySshKnownHost",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)this).GitRepositorySshKnownHost, global::System.Convert.ToString); + } + if (content.Contains("GitRepositoryHttpsUser")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)this).GitRepositoryHttpsUser = (string) content.GetValueForProperty("GitRepositoryHttpsUser",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)this).GitRepositoryHttpsUser, global::System.Convert.ToString); + } + if (content.Contains("GitRepositoryHttpsCaCert")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)this).GitRepositoryHttpsCaCert = (string) content.GetValueForProperty("GitRepositoryHttpsCaCert",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)this).GitRepositoryHttpsCaCert, global::System.Convert.ToString); + } + if (content.Contains("GitRepositoryLocalAuthRef")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)this).GitRepositoryLocalAuthRef = (string) content.GetValueForProperty("GitRepositoryLocalAuthRef",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)this).GitRepositoryLocalAuthRef, global::System.Convert.ToString); + } + if (content.Contains("BucketUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)this).BucketUrl = (string) content.GetValueForProperty("BucketUrl",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)this).BucketUrl, global::System.Convert.ToString); + } + if (content.Contains("BucketName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)this).BucketName = (string) content.GetValueForProperty("BucketName",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)this).BucketName, global::System.Convert.ToString); + } + if (content.Contains("BucketInsecure")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)this).BucketInsecure = (bool?) content.GetValueForProperty("BucketInsecure",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)this).BucketInsecure, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("BucketTimeoutInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)this).BucketTimeoutInSecond = (long?) content.GetValueForProperty("BucketTimeoutInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)this).BucketTimeoutInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("BucketSyncIntervalInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)this).BucketSyncIntervalInSecond = (long?) content.GetValueForProperty("BucketSyncIntervalInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)this).BucketSyncIntervalInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("BucketAccessKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)this).BucketAccessKey = (System.Security.SecureString) content.GetValueForProperty("BucketAccessKey",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)this).BucketAccessKey, (object ss) => (System.Security.SecureString)ss); + } + if (content.Contains("BucketLocalAuthRef")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)this).BucketLocalAuthRef = (string) content.GetValueForProperty("BucketLocalAuthRef",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)this).BucketLocalAuthRef, global::System.Convert.ToString); + } + if (content.Contains("RepositoryRefBranch")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)this).RepositoryRefBranch = (string) content.GetValueForProperty("RepositoryRefBranch",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)this).RepositoryRefBranch, global::System.Convert.ToString); + } + if (content.Contains("RepositoryRefTag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)this).RepositoryRefTag = (string) content.GetValueForProperty("RepositoryRefTag",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)this).RepositoryRefTag, global::System.Convert.ToString); + } + if (content.Contains("RepositoryRefSemver")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)this).RepositoryRefSemver = (string) content.GetValueForProperty("RepositoryRefSemver",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)this).RepositoryRefSemver, global::System.Convert.ToString); + } + if (content.Contains("RepositoryRefCommit")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)this).RepositoryRefCommit = (string) content.GetValueForProperty("RepositoryRefCommit",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)this).RepositoryRefCommit, 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 FluxConfigurationPatchProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("GitRepository")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)this).GitRepository = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryPatchDefinition) content.GetValueForProperty("GitRepository",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)this).GitRepository, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.GitRepositoryPatchDefinitionTypeConverter.ConvertFrom); + } + if (content.Contains("Bucket")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)this).Bucket = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IBucketPatchDefinition) content.GetValueForProperty("Bucket",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)this).Bucket, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.BucketPatchDefinitionTypeConverter.ConvertFrom); + } + if (content.Contains("SourceKind")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)this).SourceKind = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType?) content.GetValueForProperty("SourceKind",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)this).SourceKind, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType.CreateFrom); + } + if (content.Contains("Suspend")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)this).Suspend = (bool?) content.GetValueForProperty("Suspend",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)this).Suspend, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("Kustomization")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)this).Kustomization = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesKustomizations) content.GetValueForProperty("Kustomization",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)this).Kustomization, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.FluxConfigurationPatchPropertiesKustomizationsTypeConverter.ConvertFrom); + } + if (content.Contains("ConfigurationProtectedSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)this).ConfigurationProtectedSetting = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesConfigurationProtectedSettings) content.GetValueForProperty("ConfigurationProtectedSetting",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)this).ConfigurationProtectedSetting, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.FluxConfigurationPatchPropertiesConfigurationProtectedSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("GitRepositoryRef")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)this).GitRepositoryRef = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IRepositoryRefDefinition) content.GetValueForProperty("GitRepositoryRef",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)this).GitRepositoryRef, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.RepositoryRefDefinitionTypeConverter.ConvertFrom); + } + if (content.Contains("GitRepositoryUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)this).GitRepositoryUrl = (string) content.GetValueForProperty("GitRepositoryUrl",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)this).GitRepositoryUrl, global::System.Convert.ToString); + } + if (content.Contains("GitRepositoryTimeoutInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)this).GitRepositoryTimeoutInSecond = (long?) content.GetValueForProperty("GitRepositoryTimeoutInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)this).GitRepositoryTimeoutInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("GitRepositorySyncIntervalInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)this).GitRepositorySyncIntervalInSecond = (long?) content.GetValueForProperty("GitRepositorySyncIntervalInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)this).GitRepositorySyncIntervalInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("GitRepositorySshKnownHost")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)this).GitRepositorySshKnownHost = (string) content.GetValueForProperty("GitRepositorySshKnownHost",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)this).GitRepositorySshKnownHost, global::System.Convert.ToString); + } + if (content.Contains("GitRepositoryHttpsUser")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)this).GitRepositoryHttpsUser = (string) content.GetValueForProperty("GitRepositoryHttpsUser",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)this).GitRepositoryHttpsUser, global::System.Convert.ToString); + } + if (content.Contains("GitRepositoryHttpsCaCert")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)this).GitRepositoryHttpsCaCert = (string) content.GetValueForProperty("GitRepositoryHttpsCaCert",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)this).GitRepositoryHttpsCaCert, global::System.Convert.ToString); + } + if (content.Contains("GitRepositoryLocalAuthRef")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)this).GitRepositoryLocalAuthRef = (string) content.GetValueForProperty("GitRepositoryLocalAuthRef",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)this).GitRepositoryLocalAuthRef, global::System.Convert.ToString); + } + if (content.Contains("BucketUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)this).BucketUrl = (string) content.GetValueForProperty("BucketUrl",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)this).BucketUrl, global::System.Convert.ToString); + } + if (content.Contains("BucketName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)this).BucketName = (string) content.GetValueForProperty("BucketName",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)this).BucketName, global::System.Convert.ToString); + } + if (content.Contains("BucketInsecure")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)this).BucketInsecure = (bool?) content.GetValueForProperty("BucketInsecure",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)this).BucketInsecure, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("BucketTimeoutInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)this).BucketTimeoutInSecond = (long?) content.GetValueForProperty("BucketTimeoutInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)this).BucketTimeoutInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("BucketSyncIntervalInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)this).BucketSyncIntervalInSecond = (long?) content.GetValueForProperty("BucketSyncIntervalInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)this).BucketSyncIntervalInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("BucketAccessKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)this).BucketAccessKey = (System.Security.SecureString) content.GetValueForProperty("BucketAccessKey",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)this).BucketAccessKey, (object ss) => (System.Security.SecureString)ss); + } + if (content.Contains("BucketLocalAuthRef")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)this).BucketLocalAuthRef = (string) content.GetValueForProperty("BucketLocalAuthRef",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)this).BucketLocalAuthRef, global::System.Convert.ToString); + } + if (content.Contains("RepositoryRefBranch")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)this).RepositoryRefBranch = (string) content.GetValueForProperty("RepositoryRefBranch",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)this).RepositoryRefBranch, global::System.Convert.ToString); + } + if (content.Contains("RepositoryRefTag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)this).RepositoryRefTag = (string) content.GetValueForProperty("RepositoryRefTag",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)this).RepositoryRefTag, global::System.Convert.ToString); + } + if (content.Contains("RepositoryRefSemver")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)this).RepositoryRefSemver = (string) content.GetValueForProperty("RepositoryRefSemver",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)this).RepositoryRefSemver, global::System.Convert.ToString); + } + if (content.Contains("RepositoryRefCommit")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)this).RepositoryRefCommit = (string) content.GetValueForProperty("RepositoryRefCommit",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal)this).RepositoryRefCommit, 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.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Updatable properties of an Flux Configuration Patch Request + [System.ComponentModel.TypeConverter(typeof(FluxConfigurationPatchPropertiesTypeConverter))] + public partial interface IFluxConfigurationPatchProperties + + { + + } +} \ No newline at end of file diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfigurationPatchProperties.TypeConverter.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfigurationPatchProperties.TypeConverter.cs new file mode 100644 index 000000000000..4c29ddc970d9 --- /dev/null +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfigurationPatchProperties.TypeConverter.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class FluxConfigurationPatchPropertiesTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchProperties ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchProperties).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return FluxConfigurationPatchProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return FluxConfigurationPatchProperties.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return FluxConfigurationPatchProperties.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/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfigurationPatchProperties.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfigurationPatchProperties.cs new file mode 100644 index 000000000000..a1dc722affcb --- /dev/null +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfigurationPatchProperties.cs @@ -0,0 +1,467 @@ +// 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.KubernetesConfiguration.Models.Api20220301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; + + /// Updatable properties of an Flux Configuration Patch Request + public partial class FluxConfigurationPatchProperties : + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchProperties, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IBucketPatchDefinition _bucket; + + /// Parameters to reconcile to the Bucket source kind type. + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IBucketPatchDefinition Bucket { get => (this._bucket = this._bucket ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.BucketPatchDefinition()); set => this._bucket = value; } + + /// Plaintext access key used to securely access the S3 bucket + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] + public System.Security.SecureString BucketAccessKey { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IBucketPatchDefinitionInternal)Bucket).AccessKey; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IBucketPatchDefinitionInternal)Bucket).AccessKey = value ?? null; } + + /// + /// Specify whether to use insecure communication when puling data from the S3 bucket. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] + public bool? BucketInsecure { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IBucketPatchDefinitionInternal)Bucket).Insecure; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IBucketPatchDefinitionInternal)Bucket).Insecure = value ?? default(bool); } + + /// + /// Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided + /// configuration secrets. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] + public string BucketLocalAuthRef { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IBucketPatchDefinitionInternal)Bucket).LocalAuthRef; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IBucketPatchDefinitionInternal)Bucket).LocalAuthRef = value ?? null; } + + /// The bucket name to sync from the url endpoint for the flux configuration. + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] + public string BucketName { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IBucketPatchDefinitionInternal)Bucket).BucketName; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IBucketPatchDefinitionInternal)Bucket).BucketName = value ?? null; } + + /// + /// The interval at which to re-reconcile the cluster git repository source with the remote. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] + public long? BucketSyncIntervalInSecond { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IBucketPatchDefinitionInternal)Bucket).SyncIntervalInSecond; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IBucketPatchDefinitionInternal)Bucket).SyncIntervalInSecond = value ?? default(long); } + + /// + /// The maximum time to attempt to reconcile the cluster git repository source with the remote. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] + public long? BucketTimeoutInSecond { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IBucketPatchDefinitionInternal)Bucket).TimeoutInSecond; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IBucketPatchDefinitionInternal)Bucket).TimeoutInSecond = value ?? default(long); } + + /// The URL to sync for the flux configuration S3 bucket. + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] + public string BucketUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IBucketPatchDefinitionInternal)Bucket).Url; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IBucketPatchDefinitionInternal)Bucket).Url = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesConfigurationProtectedSettings _configurationProtectedSetting; + + /// Key-value pairs of protected configuration settings for the configuration + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesConfigurationProtectedSettings ConfigurationProtectedSetting { get => (this._configurationProtectedSetting = this._configurationProtectedSetting ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.FluxConfigurationPatchPropertiesConfigurationProtectedSettings()); set => this._configurationProtectedSetting = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryPatchDefinition _gitRepository; + + /// Parameters to reconcile to the GitRepository source kind type. + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryPatchDefinition GitRepository { get => (this._gitRepository = this._gitRepository ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.GitRepositoryPatchDefinition()); set => this._gitRepository = value; } + + /// + /// Base64-encoded HTTPS certificate authority contents used to access git private git repositories over HTTPS + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] + public string GitRepositoryHttpsCaCert { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryPatchDefinitionInternal)GitRepository).HttpsCaCert; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryPatchDefinitionInternal)GitRepository).HttpsCaCert = value ?? null; } + + /// Plaintext HTTPS username used to access private git repositories over HTTPS + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] + public string GitRepositoryHttpsUser { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryPatchDefinitionInternal)GitRepository).HttpsUser; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryPatchDefinitionInternal)GitRepository).HttpsUser = value ?? null; } + + /// + /// Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided + /// configuration secrets. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] + public string GitRepositoryLocalAuthRef { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryPatchDefinitionInternal)GitRepository).LocalAuthRef; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryPatchDefinitionInternal)GitRepository).LocalAuthRef = value ?? null; } + + /// + /// Base64-encoded known_hosts value containing public SSH keys required to access private git repositories over SSH + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] + public string GitRepositorySshKnownHost { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryPatchDefinitionInternal)GitRepository).SshKnownHost; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryPatchDefinitionInternal)GitRepository).SshKnownHost = value ?? null; } + + /// + /// The interval at which to re-reconcile the cluster git repository source with the remote. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] + public long? GitRepositorySyncIntervalInSecond { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryPatchDefinitionInternal)GitRepository).SyncIntervalInSecond; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryPatchDefinitionInternal)GitRepository).SyncIntervalInSecond = value ?? default(long); } + + /// + /// The maximum time to attempt to reconcile the cluster git repository source with the remote. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] + public long? GitRepositoryTimeoutInSecond { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryPatchDefinitionInternal)GitRepository).TimeoutInSecond; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryPatchDefinitionInternal)GitRepository).TimeoutInSecond = value ?? default(long); } + + /// The URL to sync for the flux configuration git repository. + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] + public string GitRepositoryUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryPatchDefinitionInternal)GitRepository).Url; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryPatchDefinitionInternal)GitRepository).Url = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesKustomizations _kustomization; + + /// + /// Array of kustomizations used to reconcile the artifact pulled by the source type on the cluster. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesKustomizations Kustomization { get => (this._kustomization = this._kustomization ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.FluxConfigurationPatchPropertiesKustomizations()); set => this._kustomization = value; } + + /// Internal Acessors for Bucket + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IBucketPatchDefinition Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal.Bucket { get => (this._bucket = this._bucket ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.BucketPatchDefinition()); set { {_bucket = value;} } } + + /// Internal Acessors for GitRepository + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryPatchDefinition Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal.GitRepository { get => (this._gitRepository = this._gitRepository ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.GitRepositoryPatchDefinition()); set { {_gitRepository = value;} } } + + /// Internal Acessors for GitRepositoryRef + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IRepositoryRefDefinition Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesInternal.GitRepositoryRef { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryPatchDefinitionInternal)GitRepository).RepositoryRef; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryPatchDefinitionInternal)GitRepository).RepositoryRef = value; } + + /// The git repository branch name to checkout. + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] + public string RepositoryRefBranch { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryPatchDefinitionInternal)GitRepository).RepositoryRefBranch; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryPatchDefinitionInternal)GitRepository).RepositoryRefBranch = value ?? null; } + + /// + /// The commit SHA to checkout. This value must be combined with the branch name to be valid. This takes precedence over semver. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] + public string RepositoryRefCommit { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryPatchDefinitionInternal)GitRepository).RepositoryRefCommit; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryPatchDefinitionInternal)GitRepository).RepositoryRefCommit = value ?? null; } + + /// + /// The semver range used to match against git repository tags. This takes precedence over tag. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] + public string RepositoryRefSemver { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryPatchDefinitionInternal)GitRepository).RepositoryRefSemver; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryPatchDefinitionInternal)GitRepository).RepositoryRefSemver = value ?? null; } + + /// The git repository tag name to checkout. This takes precedence over branch. + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] + public string RepositoryRefTag { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryPatchDefinitionInternal)GitRepository).RepositoryRefTag; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryPatchDefinitionInternal)GitRepository).RepositoryRefTag = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType? _sourceKind; + + /// Source Kind to pull the configuration data from. + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType? SourceKind { get => this._sourceKind; set => this._sourceKind = value; } + + /// Backing field for property. + private bool? _suspend; + + /// + /// Whether this configuration should suspend its reconciliation of its kustomizations and sources. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] + public bool? Suspend { get => this._suspend; set => this._suspend = value; } + + /// Creates an new instance. + public FluxConfigurationPatchProperties() + { + + } + } + /// Updatable properties of an Flux Configuration Patch Request + public partial interface IFluxConfigurationPatchProperties : + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IJsonSerializable + { + /// Plaintext access key used to securely access the S3 bucket + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Plaintext access key used to securely access the S3 bucket", + SerializedName = @"accessKey", + PossibleTypes = new [] { typeof(System.Security.SecureString) })] + System.Security.SecureString BucketAccessKey { get; set; } + /// + /// Specify whether to use insecure communication when puling data from the S3 bucket. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Specify whether to use insecure communication when puling data from the S3 bucket.", + SerializedName = @"insecure", + PossibleTypes = new [] { typeof(bool) })] + bool? BucketInsecure { get; set; } + /// + /// Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided + /// configuration secrets. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided configuration secrets.", + SerializedName = @"localAuthRef", + PossibleTypes = new [] { typeof(string) })] + string BucketLocalAuthRef { get; set; } + /// The bucket name to sync from the url endpoint for the flux configuration. + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The bucket name to sync from the url endpoint for the flux configuration.", + SerializedName = @"bucketName", + PossibleTypes = new [] { typeof(string) })] + string BucketName { get; set; } + /// + /// The interval at which to re-reconcile the cluster git repository source with the remote. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The interval at which to re-reconcile the cluster git repository source with the remote.", + SerializedName = @"syncIntervalInSeconds", + PossibleTypes = new [] { typeof(long) })] + long? BucketSyncIntervalInSecond { get; set; } + /// + /// The maximum time to attempt to reconcile the cluster git repository source with the remote. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The maximum time to attempt to reconcile the cluster git repository source with the remote.", + SerializedName = @"timeoutInSeconds", + PossibleTypes = new [] { typeof(long) })] + long? BucketTimeoutInSecond { get; set; } + /// The URL to sync for the flux configuration S3 bucket. + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The URL to sync for the flux configuration S3 bucket.", + SerializedName = @"url", + PossibleTypes = new [] { typeof(string) })] + string BucketUrl { get; set; } + /// Key-value pairs of protected configuration settings for the configuration + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Key-value pairs of protected configuration settings for the configuration", + SerializedName = @"configurationProtectedSettings", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesConfigurationProtectedSettings) })] + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesConfigurationProtectedSettings ConfigurationProtectedSetting { get; set; } + /// + /// Base64-encoded HTTPS certificate authority contents used to access git private git repositories over HTTPS + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Base64-encoded HTTPS certificate authority contents used to access git private git repositories over HTTPS", + SerializedName = @"httpsCACert", + PossibleTypes = new [] { typeof(string) })] + string GitRepositoryHttpsCaCert { get; set; } + /// Plaintext HTTPS username used to access private git repositories over HTTPS + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Plaintext HTTPS username used to access private git repositories over HTTPS", + SerializedName = @"httpsUser", + PossibleTypes = new [] { typeof(string) })] + string GitRepositoryHttpsUser { get; set; } + /// + /// Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided + /// configuration secrets. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided configuration secrets.", + SerializedName = @"localAuthRef", + PossibleTypes = new [] { typeof(string) })] + string GitRepositoryLocalAuthRef { get; set; } + /// + /// Base64-encoded known_hosts value containing public SSH keys required to access private git repositories over SSH + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Base64-encoded known_hosts value containing public SSH keys required to access private git repositories over SSH", + SerializedName = @"sshKnownHosts", + PossibleTypes = new [] { typeof(string) })] + string GitRepositorySshKnownHost { get; set; } + /// + /// The interval at which to re-reconcile the cluster git repository source with the remote. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The interval at which to re-reconcile the cluster git repository source with the remote.", + SerializedName = @"syncIntervalInSeconds", + PossibleTypes = new [] { typeof(long) })] + long? GitRepositorySyncIntervalInSecond { get; set; } + /// + /// The maximum time to attempt to reconcile the cluster git repository source with the remote. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The maximum time to attempt to reconcile the cluster git repository source with the remote.", + SerializedName = @"timeoutInSeconds", + PossibleTypes = new [] { typeof(long) })] + long? GitRepositoryTimeoutInSecond { get; set; } + /// The URL to sync for the flux configuration git repository. + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The URL to sync for the flux configuration git repository.", + SerializedName = @"url", + PossibleTypes = new [] { typeof(string) })] + string GitRepositoryUrl { get; set; } + /// + /// Array of kustomizations used to reconcile the artifact pulled by the source type on the cluster. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Array of kustomizations used to reconcile the artifact pulled by the source type on the cluster.", + SerializedName = @"kustomizations", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesKustomizations) })] + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesKustomizations Kustomization { get; set; } + /// The git repository branch name to checkout. + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The git repository branch name to checkout.", + SerializedName = @"branch", + PossibleTypes = new [] { typeof(string) })] + string RepositoryRefBranch { get; set; } + /// + /// The commit SHA to checkout. This value must be combined with the branch name to be valid. This takes precedence over semver. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The commit SHA to checkout. This value must be combined with the branch name to be valid. This takes precedence over semver.", + SerializedName = @"commit", + PossibleTypes = new [] { typeof(string) })] + string RepositoryRefCommit { get; set; } + /// + /// The semver range used to match against git repository tags. This takes precedence over tag. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The semver range used to match against git repository tags. This takes precedence over tag.", + SerializedName = @"semver", + PossibleTypes = new [] { typeof(string) })] + string RepositoryRefSemver { get; set; } + /// The git repository tag name to checkout. This takes precedence over branch. + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The git repository tag name to checkout. This takes precedence over branch.", + SerializedName = @"tag", + PossibleTypes = new [] { typeof(string) })] + string RepositoryRefTag { get; set; } + /// Source Kind to pull the configuration data from. + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Source Kind to pull the configuration data from.", + SerializedName = @"sourceKind", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType) })] + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType? SourceKind { get; set; } + /// + /// Whether this configuration should suspend its reconciliation of its kustomizations and sources. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Whether this configuration should suspend its reconciliation of its kustomizations and sources.", + SerializedName = @"suspend", + PossibleTypes = new [] { typeof(bool) })] + bool? Suspend { get; set; } + + } + /// Updatable properties of an Flux Configuration Patch Request + internal partial interface IFluxConfigurationPatchPropertiesInternal + + { + /// Parameters to reconcile to the Bucket source kind type. + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IBucketPatchDefinition Bucket { get; set; } + /// Plaintext access key used to securely access the S3 bucket + System.Security.SecureString BucketAccessKey { get; set; } + /// + /// Specify whether to use insecure communication when puling data from the S3 bucket. + /// + bool? BucketInsecure { get; set; } + /// + /// Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided + /// configuration secrets. + /// + string BucketLocalAuthRef { get; set; } + /// The bucket name to sync from the url endpoint for the flux configuration. + string BucketName { get; set; } + /// + /// The interval at which to re-reconcile the cluster git repository source with the remote. + /// + long? BucketSyncIntervalInSecond { get; set; } + /// + /// The maximum time to attempt to reconcile the cluster git repository source with the remote. + /// + long? BucketTimeoutInSecond { get; set; } + /// The URL to sync for the flux configuration S3 bucket. + string BucketUrl { get; set; } + /// Key-value pairs of protected configuration settings for the configuration + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesConfigurationProtectedSettings ConfigurationProtectedSetting { get; set; } + /// Parameters to reconcile to the GitRepository source kind type. + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryPatchDefinition GitRepository { get; set; } + /// + /// Base64-encoded HTTPS certificate authority contents used to access git private git repositories over HTTPS + /// + string GitRepositoryHttpsCaCert { get; set; } + /// Plaintext HTTPS username used to access private git repositories over HTTPS + string GitRepositoryHttpsUser { get; set; } + /// + /// Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided + /// configuration secrets. + /// + string GitRepositoryLocalAuthRef { get; set; } + /// The source reference for the GitRepository object. + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IRepositoryRefDefinition GitRepositoryRef { get; set; } + /// + /// Base64-encoded known_hosts value containing public SSH keys required to access private git repositories over SSH + /// + string GitRepositorySshKnownHost { get; set; } + /// + /// The interval at which to re-reconcile the cluster git repository source with the remote. + /// + long? GitRepositorySyncIntervalInSecond { get; set; } + /// + /// The maximum time to attempt to reconcile the cluster git repository source with the remote. + /// + long? GitRepositoryTimeoutInSecond { get; set; } + /// The URL to sync for the flux configuration git repository. + string GitRepositoryUrl { get; set; } + /// + /// Array of kustomizations used to reconcile the artifact pulled by the source type on the cluster. + /// + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesKustomizations Kustomization { get; set; } + /// The git repository branch name to checkout. + string RepositoryRefBranch { get; set; } + /// + /// The commit SHA to checkout. This value must be combined with the branch name to be valid. This takes precedence over semver. + /// + string RepositoryRefCommit { get; set; } + /// + /// The semver range used to match against git repository tags. This takes precedence over tag. + /// + string RepositoryRefSemver { get; set; } + /// The git repository tag name to checkout. This takes precedence over branch. + string RepositoryRefTag { get; set; } + /// Source Kind to pull the configuration data from. + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType? SourceKind { get; set; } + /// + /// Whether this configuration should suspend its reconciliation of its kustomizations and sources. + /// + bool? Suspend { get; set; } + + } +} \ No newline at end of file diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfigurationPatchProperties.json.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfigurationPatchProperties.json.cs new file mode 100644 index 000000000000..8d29f3e855ad --- /dev/null +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfigurationPatchProperties.json.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; + + /// Updatable properties of an Flux Configuration Patch Request + public partial class FluxConfigurationPatchProperties + { + + /// + /// 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.KubernetesConfiguration.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject instance to deserialize from. + internal FluxConfigurationPatchProperties(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_gitRepository = If( json?.PropertyT("gitRepository"), out var __jsonGitRepository) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.GitRepositoryPatchDefinition.FromJson(__jsonGitRepository) : GitRepository;} + {_bucket = If( json?.PropertyT("bucket"), out var __jsonBucket) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.BucketPatchDefinition.FromJson(__jsonBucket) : Bucket;} + {_sourceKind = If( json?.PropertyT("sourceKind"), out var __jsonSourceKind) ? (string)__jsonSourceKind : (string)SourceKind;} + {_suspend = If( json?.PropertyT("suspend"), out var __jsonSuspend) ? (bool?)__jsonSuspend : Suspend;} + {_kustomization = If( json?.PropertyT("kustomizations"), out var __jsonKustomizations) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.FluxConfigurationPatchPropertiesKustomizations.FromJson(__jsonKustomizations) : Kustomization;} + {_configurationProtectedSetting = If( json?.PropertyT("configurationProtectedSettings"), out var __jsonConfigurationProtectedSettings) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.FluxConfigurationPatchPropertiesConfigurationProtectedSettings.FromJson(__jsonConfigurationProtectedSettings) : ConfigurationProtectedSetting;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchProperties. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchProperties. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json ? new FluxConfigurationPatchProperties(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.KubernetesConfiguration.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._gitRepository ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) this._gitRepository.ToJson(null,serializationMode) : null, "gitRepository" ,container.Add ); + AddIf( null != this._bucket ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) this._bucket.ToJson(null,serializationMode) : null, "bucket" ,container.Add ); + AddIf( null != (((object)this._sourceKind)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonString(this._sourceKind.ToString()) : null, "sourceKind" ,container.Add ); + AddIf( null != this._suspend ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonBoolean((bool)this._suspend) : null, "suspend" ,container.Add ); + AddIf( null != this._kustomization ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) this._kustomization.ToJson(null,serializationMode) : null, "kustomizations" ,container.Add ); + AddIf( null != this._configurationProtectedSetting ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) this._configurationProtectedSetting.ToJson(null,serializationMode) : null, "configurationProtectedSettings" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20210301/ErrorDefinition.PowerShell.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfigurationPatchPropertiesConfigurationProtectedSettings.PowerShell.cs similarity index 68% rename from src/KubernetesConfiguration/generated/api/Models/Api20210301/ErrorDefinition.PowerShell.cs rename to src/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfigurationPatchPropertiesConfigurationProtectedSettings.PowerShell.cs index 78fcd68bddd2..4d64d8c0f7b9 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Api20210301/ErrorDefinition.PowerShell.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfigurationPatchPropertiesConfigurationProtectedSettings.PowerShell.cs @@ -3,13 +3,13 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; - /// Error definition. - [System.ComponentModel.TypeConverter(typeof(ErrorDefinitionTypeConverter))] - public partial class ErrorDefinition + /// Key-value pairs of protected configuration settings for the configuration + [System.ComponentModel.TypeConverter(typeof(FluxConfigurationPatchPropertiesConfigurationProtectedSettingsTypeConverter))] + public partial class FluxConfigurationPatchPropertiesConfigurationProtectedSettings { /// @@ -31,7 +31,8 @@ public partial class ErrorDefinition /// /// 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. + /// 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. @@ -43,7 +44,8 @@ public partial class ErrorDefinition /// /// 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. + /// 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. @@ -61,39 +63,39 @@ public partial class ErrorDefinition partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IErrorDefinition DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesConfigurationProtectedSettings DeserializeFromDictionary(global::System.Collections.IDictionary content) { - return new ErrorDefinition(content); + return new FluxConfigurationPatchPropertiesConfigurationProtectedSettings(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IErrorDefinition DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesConfigurationProtectedSettings DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { - return new ErrorDefinition(content); + return new FluxConfigurationPatchPropertiesConfigurationProtectedSettings(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. - internal ErrorDefinition(global::System.Collections.IDictionary content) + internal FluxConfigurationPatchPropertiesConfigurationProtectedSettings(global::System.Collections.IDictionary content) { bool returnNow = false; BeforeDeserializeDictionary(content, ref returnNow); @@ -102,17 +104,17 @@ internal ErrorDefinition(global::System.Collections.IDictionary content) return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IErrorDefinitionInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IErrorDefinitionInternal)this).Code, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IErrorDefinitionInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IErrorDefinitionInternal)this).Message, global::System.Convert.ToString); + // this type is a dictionary; copy elements from source to here. + CopyFrom(content); AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. - internal ErrorDefinition(global::System.Management.Automation.PSObject content) + internal FluxConfigurationPatchPropertiesConfigurationProtectedSettings(global::System.Management.Automation.PSObject content) { bool returnNow = false; BeforeDeserializePSObject(content, ref returnNow); @@ -121,17 +123,20 @@ internal ErrorDefinition(global::System.Management.Automation.PSObject content) return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IErrorDefinitionInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IErrorDefinitionInternal)this).Code, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IErrorDefinitionInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IErrorDefinitionInternal)this).Message, global::System.Convert.ToString); + // this type is a dictionary; copy elements from source to here. + CopyFrom(content); AfterDeserializePSObject(content); } /// - /// Creates a new instance of , deserializing the content from a json string. + /// Creates a new instance of , deserializing + /// the content from a json string. /// /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IErrorDefinition FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesConfigurationProtectedSettings FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. @@ -150,9 +155,9 @@ public override string ToString() return ToJsonString(); } } - /// Error definition. - [System.ComponentModel.TypeConverter(typeof(ErrorDefinitionTypeConverter))] - public partial interface IErrorDefinition + /// Key-value pairs of protected configuration settings for the configuration + [System.ComponentModel.TypeConverter(typeof(FluxConfigurationPatchPropertiesConfigurationProtectedSettingsTypeConverter))] + public partial interface IFluxConfigurationPatchPropertiesConfigurationProtectedSettings { diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfigurationPatchPropertiesConfigurationProtectedSettings.TypeConverter.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfigurationPatchPropertiesConfigurationProtectedSettings.TypeConverter.cs new file mode 100644 index 000000000000..b085c54df0a9 --- /dev/null +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfigurationPatchPropertiesConfigurationProtectedSettings.TypeConverter.cs @@ -0,0 +1,153 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class FluxConfigurationPatchPropertiesConfigurationProtectedSettingsTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there + /// is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there + /// is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesConfigurationProtectedSettings ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesConfigurationProtectedSettings).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return FluxConfigurationPatchPropertiesConfigurationProtectedSettings.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return FluxConfigurationPatchPropertiesConfigurationProtectedSettings.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return FluxConfigurationPatchPropertiesConfigurationProtectedSettings.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/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfigurationPatchPropertiesConfigurationProtectedSettings.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfigurationPatchPropertiesConfigurationProtectedSettings.cs new file mode 100644 index 000000000000..827eb6078a35 --- /dev/null +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfigurationPatchPropertiesConfigurationProtectedSettings.cs @@ -0,0 +1,37 @@ +// 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.KubernetesConfiguration.Models.Api20220301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; + + /// Key-value pairs of protected configuration settings for the configuration + public partial class FluxConfigurationPatchPropertiesConfigurationProtectedSettings : + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesConfigurationProtectedSettings, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesConfigurationProtectedSettingsInternal + { + + /// + /// Creates an new instance. + /// + public FluxConfigurationPatchPropertiesConfigurationProtectedSettings() + { + + } + } + /// Key-value pairs of protected configuration settings for the configuration + public partial interface IFluxConfigurationPatchPropertiesConfigurationProtectedSettings : + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IAssociativeArray + { + + } + /// Key-value pairs of protected configuration settings for the configuration + internal partial interface IFluxConfigurationPatchPropertiesConfigurationProtectedSettingsInternal + + { + + } +} \ No newline at end of file diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfigurationPatchPropertiesConfigurationProtectedSettings.dictionary.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfigurationPatchPropertiesConfigurationProtectedSettings.dictionary.cs new file mode 100644 index 000000000000..8abdaee9fe72 --- /dev/null +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfigurationPatchPropertiesConfigurationProtectedSettings.dictionary.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; + + public partial class FluxConfigurationPatchPropertiesConfigurationProtectedSettings : + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IAssociativeArray + { + protected global::System.Collections.Generic.Dictionary __additionalProperties = new global::System.Collections.Generic.Dictionary(); + + global::System.Collections.Generic.IDictionary Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IAssociativeArray.AdditionalProperties { get => __additionalProperties; } + + int Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IAssociativeArray.Count { get => __additionalProperties.Count; } + + global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IAssociativeArray.Keys { get => __additionalProperties.Keys; } + + global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.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.KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20220301.FluxConfigurationPatchPropertiesConfigurationProtectedSettings source) => source.__additionalProperties; + } +} \ No newline at end of file diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfigurationPatchPropertiesConfigurationProtectedSettings.json.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfigurationPatchPropertiesConfigurationProtectedSettings.json.cs new file mode 100644 index 000000000000..4683782009c6 --- /dev/null +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfigurationPatchPropertiesConfigurationProtectedSettings.json.cs @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; + + /// Key-value pairs of protected configuration settings for the configuration + public partial class FluxConfigurationPatchPropertiesConfigurationProtectedSettings + { + + /// + /// 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.KubernetesConfiguration.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject instance to deserialize from. + /// + internal FluxConfigurationPatchPropertiesConfigurationProtectedSettings(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.JsonSerializable.FromJson( json, ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IAssociativeArray)this).AdditionalProperties, null ,exclusions ); + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesConfigurationProtectedSettings. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesConfigurationProtectedSettings. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesConfigurationProtectedSettings FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json ? new FluxConfigurationPatchPropertiesConfigurationProtectedSettings(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.KubernetesConfiguration.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.JsonSerializable.ToJson( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IAssociativeArray)this).AdditionalProperties, container); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfigurationPatchPropertiesKustomizations.PowerShell.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfigurationPatchPropertiesKustomizations.PowerShell.cs new file mode 100644 index 000000000000..7ec392732990 --- /dev/null +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfigurationPatchPropertiesKustomizations.PowerShell.cs @@ -0,0 +1,167 @@ +// 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.KubernetesConfiguration.Models.Api20220301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; + + /// + /// Array of kustomizations used to reconcile the artifact pulled by the source type on the cluster. + /// + [System.ComponentModel.TypeConverter(typeof(FluxConfigurationPatchPropertiesKustomizationsTypeConverter))] + public partial class FluxConfigurationPatchPropertiesKustomizations + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesKustomizations DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new FluxConfigurationPatchPropertiesKustomizations(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.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesKustomizations DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new FluxConfigurationPatchPropertiesKustomizations(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal FluxConfigurationPatchPropertiesKustomizations(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 FluxConfigurationPatchPropertiesKustomizations(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); + } + + /// + /// 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.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesKustomizations FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Array of kustomizations used to reconcile the artifact pulled by the source type on the cluster. + [System.ComponentModel.TypeConverter(typeof(FluxConfigurationPatchPropertiesKustomizationsTypeConverter))] + public partial interface IFluxConfigurationPatchPropertiesKustomizations + + { + + } +} \ No newline at end of file diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfigurationPatchPropertiesKustomizations.TypeConverter.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfigurationPatchPropertiesKustomizations.TypeConverter.cs new file mode 100644 index 000000000000..d0905a123a39 --- /dev/null +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfigurationPatchPropertiesKustomizations.TypeConverter.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class FluxConfigurationPatchPropertiesKustomizationsTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, + /// otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesKustomizations ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesKustomizations).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return FluxConfigurationPatchPropertiesKustomizations.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return FluxConfigurationPatchPropertiesKustomizations.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return FluxConfigurationPatchPropertiesKustomizations.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/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfigurationPatchPropertiesKustomizations.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfigurationPatchPropertiesKustomizations.cs new file mode 100644 index 000000000000..cae783501467 --- /dev/null +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfigurationPatchPropertiesKustomizations.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.KubernetesConfiguration.Models.Api20220301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; + + /// + /// Array of kustomizations used to reconcile the artifact pulled by the source type on the cluster. + /// + public partial class FluxConfigurationPatchPropertiesKustomizations : + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesKustomizations, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesKustomizationsInternal + { + + /// + /// Creates an new instance. + /// + public FluxConfigurationPatchPropertiesKustomizations() + { + + } + } + /// Array of kustomizations used to reconcile the artifact pulled by the source type on the cluster. + public partial interface IFluxConfigurationPatchPropertiesKustomizations : + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IAssociativeArray + { + + } + /// Array of kustomizations used to reconcile the artifact pulled by the source type on the cluster. + internal partial interface IFluxConfigurationPatchPropertiesKustomizationsInternal + + { + + } +} \ No newline at end of file diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfigurationPatchPropertiesKustomizations.dictionary.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfigurationPatchPropertiesKustomizations.dictionary.cs new file mode 100644 index 000000000000..a371efb6be99 --- /dev/null +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfigurationPatchPropertiesKustomizations.dictionary.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; + + public partial class FluxConfigurationPatchPropertiesKustomizations : + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IAssociativeArray + { + protected global::System.Collections.Generic.Dictionary __additionalProperties = new global::System.Collections.Generic.Dictionary(); + + global::System.Collections.Generic.IDictionary Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IAssociativeArray.AdditionalProperties { get => __additionalProperties; } + + int Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IAssociativeArray.Count { get => __additionalProperties.Count; } + + global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IAssociativeArray.Keys { get => __additionalProperties.Keys; } + + global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IAssociativeArray.Values { get => __additionalProperties.Values; } + + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IKustomizationPatchDefinition this[global::System.String index] { get => __additionalProperties[index]; set => __additionalProperties[index] = value; } + + /// + /// + public void Add(global::System.String key, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IKustomizationPatchDefinition 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.KubernetesConfiguration.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.KubernetesConfiguration.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 Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IKustomizationPatchDefinition value) => __additionalProperties.TryGetValue( key, out value); + + /// + + public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.FluxConfigurationPatchPropertiesKustomizations source) => source.__additionalProperties; + } +} \ No newline at end of file diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfigurationPatchPropertiesKustomizations.json.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfigurationPatchPropertiesKustomizations.json.cs new file mode 100644 index 000000000000..520f5bf79918 --- /dev/null +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfigurationPatchPropertiesKustomizations.json.cs @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; + + /// + /// Array of kustomizations used to reconcile the artifact pulled by the source type on the cluster. + /// + public partial class FluxConfigurationPatchPropertiesKustomizations + { + + /// + /// 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.KubernetesConfiguration.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject instance to deserialize from. + /// + internal FluxConfigurationPatchPropertiesKustomizations(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.JsonSerializable.FromJson( json, ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IAssociativeArray)this).AdditionalProperties, (j) => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.KustomizationPatchDefinition.FromJson(j) ,exclusions ); + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesKustomizations. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesKustomizations. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesKustomizations FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json ? new FluxConfigurationPatchPropertiesKustomizations(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.KubernetesConfiguration.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.JsonSerializable.ToJson( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IAssociativeArray)this).AdditionalProperties, container); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfigurationProperties.PowerShell.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfigurationProperties.PowerShell.cs new file mode 100644 index 000000000000..b0913ab7c633 --- /dev/null +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfigurationProperties.PowerShell.cs @@ -0,0 +1,438 @@ +// 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.KubernetesConfiguration.Models.Api20220301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; + + /// Properties to create a Flux Configuration resource + [System.ComponentModel.TypeConverter(typeof(FluxConfigurationPropertiesTypeConverter))] + public partial class FluxConfigurationProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new FluxConfigurationProperties(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.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new FluxConfigurationProperties(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal FluxConfigurationProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("GitRepository")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)this).GitRepository = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryDefinition) content.GetValueForProperty("GitRepository",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)this).GitRepository, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.GitRepositoryDefinitionTypeConverter.ConvertFrom); + } + if (content.Contains("Bucket")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)this).Bucket = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IBucketDefinition) content.GetValueForProperty("Bucket",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)this).Bucket, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.BucketDefinitionTypeConverter.ConvertFrom); + } + if (content.Contains("Scope")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)this).Scope = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ScopeType?) content.GetValueForProperty("Scope",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)this).Scope, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ScopeType.CreateFrom); + } + if (content.Contains("Namespace")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)this).Namespace = (string) content.GetValueForProperty("Namespace",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)this).Namespace, global::System.Convert.ToString); + } + if (content.Contains("SourceKind")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)this).SourceKind = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType?) content.GetValueForProperty("SourceKind",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)this).SourceKind, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType.CreateFrom); + } + if (content.Contains("Suspend")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)this).Suspend = (bool?) content.GetValueForProperty("Suspend",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)this).Suspend, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("Kustomization")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)this).Kustomization = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesKustomizations) content.GetValueForProperty("Kustomization",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)this).Kustomization, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.FluxConfigurationPropertiesKustomizationsTypeConverter.ConvertFrom); + } + if (content.Contains("ConfigurationProtectedSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)this).ConfigurationProtectedSetting = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesConfigurationProtectedSettings) content.GetValueForProperty("ConfigurationProtectedSetting",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)this).ConfigurationProtectedSetting, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.FluxConfigurationPropertiesConfigurationProtectedSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("Statuses")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)this).Statuses = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectStatusDefinition[]) content.GetValueForProperty("Statuses",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)this).Statuses, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ObjectStatusDefinitionTypeConverter.ConvertFrom)); + } + if (content.Contains("RepositoryPublicKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)this).RepositoryPublicKey = (string) content.GetValueForProperty("RepositoryPublicKey",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)this).RepositoryPublicKey, global::System.Convert.ToString); + } + if (content.Contains("SourceSyncedCommitId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)this).SourceSyncedCommitId = (string) content.GetValueForProperty("SourceSyncedCommitId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)this).SourceSyncedCommitId, global::System.Convert.ToString); + } + if (content.Contains("SourceUpdatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)this).SourceUpdatedAt = (global::System.DateTime?) content.GetValueForProperty("SourceUpdatedAt",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)this).SourceUpdatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("StatusUpdatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)this).StatusUpdatedAt = (global::System.DateTime?) content.GetValueForProperty("StatusUpdatedAt",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)this).StatusUpdatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("ComplianceState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)this).ComplianceState = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.FluxComplianceState?) content.GetValueForProperty("ComplianceState",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)this).ComplianceState, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.FluxComplianceState.CreateFrom); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningState.CreateFrom); + } + if (content.Contains("ErrorMessage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)this).ErrorMessage = (string) content.GetValueForProperty("ErrorMessage",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)this).ErrorMessage, global::System.Convert.ToString); + } + if (content.Contains("GitRepositoryRef")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)this).GitRepositoryRef = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IRepositoryRefDefinition) content.GetValueForProperty("GitRepositoryRef",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)this).GitRepositoryRef, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.RepositoryRefDefinitionTypeConverter.ConvertFrom); + } + if (content.Contains("GitRepositoryUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)this).GitRepositoryUrl = (string) content.GetValueForProperty("GitRepositoryUrl",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)this).GitRepositoryUrl, global::System.Convert.ToString); + } + if (content.Contains("GitRepositoryTimeoutInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)this).GitRepositoryTimeoutInSecond = (long?) content.GetValueForProperty("GitRepositoryTimeoutInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)this).GitRepositoryTimeoutInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("GitRepositorySyncIntervalInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)this).GitRepositorySyncIntervalInSecond = (long?) content.GetValueForProperty("GitRepositorySyncIntervalInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)this).GitRepositorySyncIntervalInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("GitRepositorySshKnownHost")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)this).GitRepositorySshKnownHost = (string) content.GetValueForProperty("GitRepositorySshKnownHost",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)this).GitRepositorySshKnownHost, global::System.Convert.ToString); + } + if (content.Contains("GitRepositoryHttpsUser")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)this).GitRepositoryHttpsUser = (string) content.GetValueForProperty("GitRepositoryHttpsUser",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)this).GitRepositoryHttpsUser, global::System.Convert.ToString); + } + if (content.Contains("GitRepositoryHttpsCaCert")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)this).GitRepositoryHttpsCaCert = (string) content.GetValueForProperty("GitRepositoryHttpsCaCert",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)this).GitRepositoryHttpsCaCert, global::System.Convert.ToString); + } + if (content.Contains("GitRepositoryLocalAuthRef")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)this).GitRepositoryLocalAuthRef = (string) content.GetValueForProperty("GitRepositoryLocalAuthRef",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)this).GitRepositoryLocalAuthRef, global::System.Convert.ToString); + } + if (content.Contains("BucketUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)this).BucketUrl = (string) content.GetValueForProperty("BucketUrl",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)this).BucketUrl, global::System.Convert.ToString); + } + if (content.Contains("BucketName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)this).BucketName = (string) content.GetValueForProperty("BucketName",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)this).BucketName, global::System.Convert.ToString); + } + if (content.Contains("BucketInsecure")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)this).BucketInsecure = (bool?) content.GetValueForProperty("BucketInsecure",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)this).BucketInsecure, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("BucketTimeoutInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)this).BucketTimeoutInSecond = (long?) content.GetValueForProperty("BucketTimeoutInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)this).BucketTimeoutInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("BucketSyncIntervalInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)this).BucketSyncIntervalInSecond = (long?) content.GetValueForProperty("BucketSyncIntervalInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)this).BucketSyncIntervalInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("BucketAccessKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)this).BucketAccessKey = (System.Security.SecureString) content.GetValueForProperty("BucketAccessKey",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)this).BucketAccessKey, (object ss) => (System.Security.SecureString)ss); + } + if (content.Contains("BucketLocalAuthRef")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)this).BucketLocalAuthRef = (string) content.GetValueForProperty("BucketLocalAuthRef",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)this).BucketLocalAuthRef, global::System.Convert.ToString); + } + if (content.Contains("RepositoryRefBranch")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)this).RepositoryRefBranch = (string) content.GetValueForProperty("RepositoryRefBranch",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)this).RepositoryRefBranch, global::System.Convert.ToString); + } + if (content.Contains("RepositoryRefTag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)this).RepositoryRefTag = (string) content.GetValueForProperty("RepositoryRefTag",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)this).RepositoryRefTag, global::System.Convert.ToString); + } + if (content.Contains("RepositoryRefSemver")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)this).RepositoryRefSemver = (string) content.GetValueForProperty("RepositoryRefSemver",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)this).RepositoryRefSemver, global::System.Convert.ToString); + } + if (content.Contains("RepositoryRefCommit")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)this).RepositoryRefCommit = (string) content.GetValueForProperty("RepositoryRefCommit",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)this).RepositoryRefCommit, 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 FluxConfigurationProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("GitRepository")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)this).GitRepository = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryDefinition) content.GetValueForProperty("GitRepository",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)this).GitRepository, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.GitRepositoryDefinitionTypeConverter.ConvertFrom); + } + if (content.Contains("Bucket")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)this).Bucket = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IBucketDefinition) content.GetValueForProperty("Bucket",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)this).Bucket, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.BucketDefinitionTypeConverter.ConvertFrom); + } + if (content.Contains("Scope")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)this).Scope = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ScopeType?) content.GetValueForProperty("Scope",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)this).Scope, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ScopeType.CreateFrom); + } + if (content.Contains("Namespace")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)this).Namespace = (string) content.GetValueForProperty("Namespace",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)this).Namespace, global::System.Convert.ToString); + } + if (content.Contains("SourceKind")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)this).SourceKind = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType?) content.GetValueForProperty("SourceKind",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)this).SourceKind, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType.CreateFrom); + } + if (content.Contains("Suspend")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)this).Suspend = (bool?) content.GetValueForProperty("Suspend",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)this).Suspend, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("Kustomization")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)this).Kustomization = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesKustomizations) content.GetValueForProperty("Kustomization",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)this).Kustomization, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.FluxConfigurationPropertiesKustomizationsTypeConverter.ConvertFrom); + } + if (content.Contains("ConfigurationProtectedSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)this).ConfigurationProtectedSetting = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesConfigurationProtectedSettings) content.GetValueForProperty("ConfigurationProtectedSetting",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)this).ConfigurationProtectedSetting, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.FluxConfigurationPropertiesConfigurationProtectedSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("Statuses")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)this).Statuses = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectStatusDefinition[]) content.GetValueForProperty("Statuses",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)this).Statuses, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ObjectStatusDefinitionTypeConverter.ConvertFrom)); + } + if (content.Contains("RepositoryPublicKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)this).RepositoryPublicKey = (string) content.GetValueForProperty("RepositoryPublicKey",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)this).RepositoryPublicKey, global::System.Convert.ToString); + } + if (content.Contains("SourceSyncedCommitId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)this).SourceSyncedCommitId = (string) content.GetValueForProperty("SourceSyncedCommitId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)this).SourceSyncedCommitId, global::System.Convert.ToString); + } + if (content.Contains("SourceUpdatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)this).SourceUpdatedAt = (global::System.DateTime?) content.GetValueForProperty("SourceUpdatedAt",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)this).SourceUpdatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("StatusUpdatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)this).StatusUpdatedAt = (global::System.DateTime?) content.GetValueForProperty("StatusUpdatedAt",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)this).StatusUpdatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("ComplianceState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)this).ComplianceState = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.FluxComplianceState?) content.GetValueForProperty("ComplianceState",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)this).ComplianceState, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.FluxComplianceState.CreateFrom); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningState.CreateFrom); + } + if (content.Contains("ErrorMessage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)this).ErrorMessage = (string) content.GetValueForProperty("ErrorMessage",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)this).ErrorMessage, global::System.Convert.ToString); + } + if (content.Contains("GitRepositoryRef")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)this).GitRepositoryRef = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IRepositoryRefDefinition) content.GetValueForProperty("GitRepositoryRef",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)this).GitRepositoryRef, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.RepositoryRefDefinitionTypeConverter.ConvertFrom); + } + if (content.Contains("GitRepositoryUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)this).GitRepositoryUrl = (string) content.GetValueForProperty("GitRepositoryUrl",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)this).GitRepositoryUrl, global::System.Convert.ToString); + } + if (content.Contains("GitRepositoryTimeoutInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)this).GitRepositoryTimeoutInSecond = (long?) content.GetValueForProperty("GitRepositoryTimeoutInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)this).GitRepositoryTimeoutInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("GitRepositorySyncIntervalInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)this).GitRepositorySyncIntervalInSecond = (long?) content.GetValueForProperty("GitRepositorySyncIntervalInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)this).GitRepositorySyncIntervalInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("GitRepositorySshKnownHost")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)this).GitRepositorySshKnownHost = (string) content.GetValueForProperty("GitRepositorySshKnownHost",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)this).GitRepositorySshKnownHost, global::System.Convert.ToString); + } + if (content.Contains("GitRepositoryHttpsUser")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)this).GitRepositoryHttpsUser = (string) content.GetValueForProperty("GitRepositoryHttpsUser",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)this).GitRepositoryHttpsUser, global::System.Convert.ToString); + } + if (content.Contains("GitRepositoryHttpsCaCert")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)this).GitRepositoryHttpsCaCert = (string) content.GetValueForProperty("GitRepositoryHttpsCaCert",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)this).GitRepositoryHttpsCaCert, global::System.Convert.ToString); + } + if (content.Contains("GitRepositoryLocalAuthRef")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)this).GitRepositoryLocalAuthRef = (string) content.GetValueForProperty("GitRepositoryLocalAuthRef",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)this).GitRepositoryLocalAuthRef, global::System.Convert.ToString); + } + if (content.Contains("BucketUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)this).BucketUrl = (string) content.GetValueForProperty("BucketUrl",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)this).BucketUrl, global::System.Convert.ToString); + } + if (content.Contains("BucketName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)this).BucketName = (string) content.GetValueForProperty("BucketName",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)this).BucketName, global::System.Convert.ToString); + } + if (content.Contains("BucketInsecure")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)this).BucketInsecure = (bool?) content.GetValueForProperty("BucketInsecure",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)this).BucketInsecure, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("BucketTimeoutInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)this).BucketTimeoutInSecond = (long?) content.GetValueForProperty("BucketTimeoutInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)this).BucketTimeoutInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("BucketSyncIntervalInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)this).BucketSyncIntervalInSecond = (long?) content.GetValueForProperty("BucketSyncIntervalInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)this).BucketSyncIntervalInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("BucketAccessKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)this).BucketAccessKey = (System.Security.SecureString) content.GetValueForProperty("BucketAccessKey",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)this).BucketAccessKey, (object ss) => (System.Security.SecureString)ss); + } + if (content.Contains("BucketLocalAuthRef")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)this).BucketLocalAuthRef = (string) content.GetValueForProperty("BucketLocalAuthRef",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)this).BucketLocalAuthRef, global::System.Convert.ToString); + } + if (content.Contains("RepositoryRefBranch")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)this).RepositoryRefBranch = (string) content.GetValueForProperty("RepositoryRefBranch",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)this).RepositoryRefBranch, global::System.Convert.ToString); + } + if (content.Contains("RepositoryRefTag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)this).RepositoryRefTag = (string) content.GetValueForProperty("RepositoryRefTag",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)this).RepositoryRefTag, global::System.Convert.ToString); + } + if (content.Contains("RepositoryRefSemver")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)this).RepositoryRefSemver = (string) content.GetValueForProperty("RepositoryRefSemver",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)this).RepositoryRefSemver, global::System.Convert.ToString); + } + if (content.Contains("RepositoryRefCommit")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)this).RepositoryRefCommit = (string) content.GetValueForProperty("RepositoryRefCommit",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal)this).RepositoryRefCommit, 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.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Properties to create a Flux Configuration resource + [System.ComponentModel.TypeConverter(typeof(FluxConfigurationPropertiesTypeConverter))] + public partial interface IFluxConfigurationProperties + + { + + } +} \ No newline at end of file diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfigurationProperties.TypeConverter.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfigurationProperties.TypeConverter.cs new file mode 100644 index 000000000000..8824fea04b7a --- /dev/null +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfigurationProperties.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class FluxConfigurationPropertiesTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationProperties ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationProperties).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return FluxConfigurationProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return FluxConfigurationProperties.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return FluxConfigurationProperties.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/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfigurationProperties.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfigurationProperties.cs new file mode 100644 index 000000000000..b04b18064de3 --- /dev/null +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfigurationProperties.cs @@ -0,0 +1,691 @@ +// 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.KubernetesConfiguration.Models.Api20220301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; + + /// Properties to create a Flux Configuration resource + public partial class FluxConfigurationProperties : + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationProperties, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IBucketDefinition _bucket; + + /// Parameters to reconcile to the Bucket source kind type. + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IBucketDefinition Bucket { get => (this._bucket = this._bucket ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.BucketDefinition()); set => this._bucket = value; } + + /// Plaintext access key used to securely access the S3 bucket + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] + public System.Security.SecureString BucketAccessKey { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IBucketDefinitionInternal)Bucket).AccessKey; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IBucketDefinitionInternal)Bucket).AccessKey = value ?? null; } + + /// + /// Specify whether to use insecure communication when puling data from the S3 bucket. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] + public bool? BucketInsecure { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IBucketDefinitionInternal)Bucket).Insecure; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IBucketDefinitionInternal)Bucket).Insecure = value ?? default(bool); } + + /// + /// Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided + /// configuration secrets. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] + public string BucketLocalAuthRef { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IBucketDefinitionInternal)Bucket).LocalAuthRef; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IBucketDefinitionInternal)Bucket).LocalAuthRef = value ?? null; } + + /// The bucket name to sync from the url endpoint for the flux configuration. + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] + public string BucketName { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IBucketDefinitionInternal)Bucket).BucketName; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IBucketDefinitionInternal)Bucket).BucketName = value ?? null; } + + /// + /// The interval at which to re-reconcile the cluster git repository source with the remote. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] + public long? BucketSyncIntervalInSecond { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IBucketDefinitionInternal)Bucket).SyncIntervalInSecond; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IBucketDefinitionInternal)Bucket).SyncIntervalInSecond = value ?? default(long); } + + /// + /// The maximum time to attempt to reconcile the cluster git repository source with the remote. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] + public long? BucketTimeoutInSecond { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IBucketDefinitionInternal)Bucket).TimeoutInSecond; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IBucketDefinitionInternal)Bucket).TimeoutInSecond = value ?? default(long); } + + /// The URL to sync for the flux configuration S3 bucket. + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] + public string BucketUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IBucketDefinitionInternal)Bucket).Url; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IBucketDefinitionInternal)Bucket).Url = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.FluxComplianceState? _complianceState; + + /// + /// Combined status of the Flux Kubernetes resources created by the fluxConfiguration or created by the managed objects. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.FluxComplianceState? ComplianceState { get => this._complianceState; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesConfigurationProtectedSettings _configurationProtectedSetting; + + /// Key-value pairs of protected configuration settings for the configuration + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesConfigurationProtectedSettings ConfigurationProtectedSetting { get => (this._configurationProtectedSetting = this._configurationProtectedSetting ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.FluxConfigurationPropertiesConfigurationProtectedSettings()); set => this._configurationProtectedSetting = value; } + + /// Backing field for property. + private string _errorMessage; + + /// Error message returned to the user in the case of provisioning failure. + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] + public string ErrorMessage { get => this._errorMessage; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryDefinition _gitRepository; + + /// Parameters to reconcile to the GitRepository source kind type. + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryDefinition GitRepository { get => (this._gitRepository = this._gitRepository ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.GitRepositoryDefinition()); set => this._gitRepository = value; } + + /// + /// Base64-encoded HTTPS certificate authority contents used to access git private git repositories over HTTPS + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] + public string GitRepositoryHttpsCaCert { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryDefinitionInternal)GitRepository).HttpsCaCert; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryDefinitionInternal)GitRepository).HttpsCaCert = value ?? null; } + + /// Plaintext HTTPS username used to access private git repositories over HTTPS + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] + public string GitRepositoryHttpsUser { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryDefinitionInternal)GitRepository).HttpsUser; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryDefinitionInternal)GitRepository).HttpsUser = value ?? null; } + + /// + /// Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided + /// configuration secrets. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] + public string GitRepositoryLocalAuthRef { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryDefinitionInternal)GitRepository).LocalAuthRef; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryDefinitionInternal)GitRepository).LocalAuthRef = value ?? null; } + + /// + /// Base64-encoded known_hosts value containing public SSH keys required to access private git repositories over SSH + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] + public string GitRepositorySshKnownHost { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryDefinitionInternal)GitRepository).SshKnownHost; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryDefinitionInternal)GitRepository).SshKnownHost = value ?? null; } + + /// + /// The interval at which to re-reconcile the cluster git repository source with the remote. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] + public long? GitRepositorySyncIntervalInSecond { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryDefinitionInternal)GitRepository).SyncIntervalInSecond; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryDefinitionInternal)GitRepository).SyncIntervalInSecond = value ?? default(long); } + + /// + /// The maximum time to attempt to reconcile the cluster git repository source with the remote. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] + public long? GitRepositoryTimeoutInSecond { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryDefinitionInternal)GitRepository).TimeoutInSecond; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryDefinitionInternal)GitRepository).TimeoutInSecond = value ?? default(long); } + + /// The URL to sync for the flux configuration git repository. + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] + public string GitRepositoryUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryDefinitionInternal)GitRepository).Url; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryDefinitionInternal)GitRepository).Url = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesKustomizations _kustomization; + + /// + /// Array of kustomizations used to reconcile the artifact pulled by the source type on the cluster. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesKustomizations Kustomization { get => (this._kustomization = this._kustomization ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.FluxConfigurationPropertiesKustomizations()); set => this._kustomization = value; } + + /// Internal Acessors for Bucket + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IBucketDefinition Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal.Bucket { get => (this._bucket = this._bucket ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.BucketDefinition()); set { {_bucket = value;} } } + + /// Internal Acessors for ComplianceState + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.FluxComplianceState? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal.ComplianceState { get => this._complianceState; set { {_complianceState = value;} } } + + /// Internal Acessors for ErrorMessage + string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal.ErrorMessage { get => this._errorMessage; set { {_errorMessage = value;} } } + + /// Internal Acessors for GitRepository + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryDefinition Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal.GitRepository { get => (this._gitRepository = this._gitRepository ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.GitRepositoryDefinition()); set { {_gitRepository = value;} } } + + /// Internal Acessors for GitRepositoryRef + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IRepositoryRefDefinition Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal.GitRepositoryRef { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryDefinitionInternal)GitRepository).RepositoryRef; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryDefinitionInternal)GitRepository).RepositoryRef = value; } + + /// Internal Acessors for ProvisioningState + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } + + /// Internal Acessors for RepositoryPublicKey + string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal.RepositoryPublicKey { get => this._repositoryPublicKey; set { {_repositoryPublicKey = value;} } } + + /// Internal Acessors for SourceSyncedCommitId + string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal.SourceSyncedCommitId { get => this._sourceSyncedCommitId; set { {_sourceSyncedCommitId = value;} } } + + /// Internal Acessors for SourceUpdatedAt + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal.SourceUpdatedAt { get => this._sourceUpdatedAt; set { {_sourceUpdatedAt = value;} } } + + /// Internal Acessors for StatusUpdatedAt + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal.StatusUpdatedAt { get => this._statusUpdatedAt; set { {_statusUpdatedAt = value;} } } + + /// Internal Acessors for Statuses + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectStatusDefinition[] Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesInternal.Statuses { get => this._statuses; set { {_statuses = value;} } } + + /// Backing field for property. + private string _namespace; + + /// + /// The namespace to which this configuration is installed to. Maximum of 253 lower case alphanumeric characters, hyphen and + /// period only. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] + public string Namespace { get => this._namespace; set => this._namespace = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningState? _provisioningState; + + /// Status of the creation of the fluxConfiguration. + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningState? ProvisioningState { get => this._provisioningState; } + + /// Backing field for property. + private string _repositoryPublicKey; + + /// + /// Public Key associated with this fluxConfiguration (either generated within the cluster or provided by the user). + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] + public string RepositoryPublicKey { get => this._repositoryPublicKey; } + + /// The git repository branch name to checkout. + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] + public string RepositoryRefBranch { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryDefinitionInternal)GitRepository).RepositoryRefBranch; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryDefinitionInternal)GitRepository).RepositoryRefBranch = value ?? null; } + + /// + /// The commit SHA to checkout. This value must be combined with the branch name to be valid. This takes precedence over semver. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] + public string RepositoryRefCommit { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryDefinitionInternal)GitRepository).RepositoryRefCommit; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryDefinitionInternal)GitRepository).RepositoryRefCommit = value ?? null; } + + /// + /// The semver range used to match against git repository tags. This takes precedence over tag. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] + public string RepositoryRefSemver { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryDefinitionInternal)GitRepository).RepositoryRefSemver; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryDefinitionInternal)GitRepository).RepositoryRefSemver = value ?? null; } + + /// The git repository tag name to checkout. This takes precedence over branch. + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] + public string RepositoryRefTag { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryDefinitionInternal)GitRepository).RepositoryRefTag; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryDefinitionInternal)GitRepository).RepositoryRefTag = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ScopeType? _scope; + + /// Scope at which the operator will be installed. + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ScopeType? Scope { get => this._scope; set => this._scope = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType? _sourceKind; + + /// Source Kind to pull the configuration data from. + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType? SourceKind { get => this._sourceKind; set => this._sourceKind = value; } + + /// Backing field for property. + private string _sourceSyncedCommitId; + + /// Branch and/or SHA of the source commit synced with the cluster. + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] + public string SourceSyncedCommitId { get => this._sourceSyncedCommitId; } + + /// Backing field for property. + private global::System.DateTime? _sourceUpdatedAt; + + /// Datetime the fluxConfiguration synced its source on the cluster. + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] + public global::System.DateTime? SourceUpdatedAt { get => this._sourceUpdatedAt; } + + /// Backing field for property. + private global::System.DateTime? _statusUpdatedAt; + + /// Datetime the fluxConfiguration synced its status on the cluster with Azure. + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] + public global::System.DateTime? StatusUpdatedAt { get => this._statusUpdatedAt; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectStatusDefinition[] _statuses; + + /// + /// Statuses of the Flux Kubernetes resources created by the fluxConfiguration or created by the managed objects provisioned + /// by the fluxConfiguration. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectStatusDefinition[] Statuses { get => this._statuses; } + + /// Backing field for property. + private bool? _suspend; + + /// + /// Whether this configuration should suspend its reconciliation of its kustomizations and sources. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] + public bool? Suspend { get => this._suspend; set => this._suspend = value; } + + /// Creates an new instance. + public FluxConfigurationProperties() + { + + } + } + /// Properties to create a Flux Configuration resource + public partial interface IFluxConfigurationProperties : + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IJsonSerializable + { + /// Plaintext access key used to securely access the S3 bucket + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Plaintext access key used to securely access the S3 bucket", + SerializedName = @"accessKey", + PossibleTypes = new [] { typeof(System.Security.SecureString) })] + System.Security.SecureString BucketAccessKey { get; set; } + /// + /// Specify whether to use insecure communication when puling data from the S3 bucket. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Specify whether to use insecure communication when puling data from the S3 bucket.", + SerializedName = @"insecure", + PossibleTypes = new [] { typeof(bool) })] + bool? BucketInsecure { get; set; } + /// + /// Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided + /// configuration secrets. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided configuration secrets.", + SerializedName = @"localAuthRef", + PossibleTypes = new [] { typeof(string) })] + string BucketLocalAuthRef { get; set; } + /// The bucket name to sync from the url endpoint for the flux configuration. + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The bucket name to sync from the url endpoint for the flux configuration.", + SerializedName = @"bucketName", + PossibleTypes = new [] { typeof(string) })] + string BucketName { get; set; } + /// + /// The interval at which to re-reconcile the cluster git repository source with the remote. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The interval at which to re-reconcile the cluster git repository source with the remote.", + SerializedName = @"syncIntervalInSeconds", + PossibleTypes = new [] { typeof(long) })] + long? BucketSyncIntervalInSecond { get; set; } + /// + /// The maximum time to attempt to reconcile the cluster git repository source with the remote. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The maximum time to attempt to reconcile the cluster git repository source with the remote.", + SerializedName = @"timeoutInSeconds", + PossibleTypes = new [] { typeof(long) })] + long? BucketTimeoutInSecond { get; set; } + /// The URL to sync for the flux configuration S3 bucket. + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The URL to sync for the flux configuration S3 bucket.", + SerializedName = @"url", + PossibleTypes = new [] { typeof(string) })] + string BucketUrl { get; set; } + /// + /// Combined status of the Flux Kubernetes resources created by the fluxConfiguration or created by the managed objects. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Combined status of the Flux Kubernetes resources created by the fluxConfiguration or created by the managed objects.", + SerializedName = @"complianceState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.FluxComplianceState) })] + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.FluxComplianceState? ComplianceState { get; } + /// Key-value pairs of protected configuration settings for the configuration + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Key-value pairs of protected configuration settings for the configuration", + SerializedName = @"configurationProtectedSettings", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesConfigurationProtectedSettings) })] + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesConfigurationProtectedSettings ConfigurationProtectedSetting { get; set; } + /// Error message returned to the user in the case of provisioning failure. + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Error message returned to the user in the case of provisioning failure.", + SerializedName = @"errorMessage", + PossibleTypes = new [] { typeof(string) })] + string ErrorMessage { get; } + /// + /// Base64-encoded HTTPS certificate authority contents used to access git private git repositories over HTTPS + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Base64-encoded HTTPS certificate authority contents used to access git private git repositories over HTTPS", + SerializedName = @"httpsCACert", + PossibleTypes = new [] { typeof(string) })] + string GitRepositoryHttpsCaCert { get; set; } + /// Plaintext HTTPS username used to access private git repositories over HTTPS + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Plaintext HTTPS username used to access private git repositories over HTTPS", + SerializedName = @"httpsUser", + PossibleTypes = new [] { typeof(string) })] + string GitRepositoryHttpsUser { get; set; } + /// + /// Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided + /// configuration secrets. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided configuration secrets.", + SerializedName = @"localAuthRef", + PossibleTypes = new [] { typeof(string) })] + string GitRepositoryLocalAuthRef { get; set; } + /// + /// Base64-encoded known_hosts value containing public SSH keys required to access private git repositories over SSH + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Base64-encoded known_hosts value containing public SSH keys required to access private git repositories over SSH", + SerializedName = @"sshKnownHosts", + PossibleTypes = new [] { typeof(string) })] + string GitRepositorySshKnownHost { get; set; } + /// + /// The interval at which to re-reconcile the cluster git repository source with the remote. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The interval at which to re-reconcile the cluster git repository source with the remote.", + SerializedName = @"syncIntervalInSeconds", + PossibleTypes = new [] { typeof(long) })] + long? GitRepositorySyncIntervalInSecond { get; set; } + /// + /// The maximum time to attempt to reconcile the cluster git repository source with the remote. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The maximum time to attempt to reconcile the cluster git repository source with the remote.", + SerializedName = @"timeoutInSeconds", + PossibleTypes = new [] { typeof(long) })] + long? GitRepositoryTimeoutInSecond { get; set; } + /// The URL to sync for the flux configuration git repository. + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The URL to sync for the flux configuration git repository.", + SerializedName = @"url", + PossibleTypes = new [] { typeof(string) })] + string GitRepositoryUrl { get; set; } + /// + /// Array of kustomizations used to reconcile the artifact pulled by the source type on the cluster. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Array of kustomizations used to reconcile the artifact pulled by the source type on the cluster.", + SerializedName = @"kustomizations", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesKustomizations) })] + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesKustomizations Kustomization { get; set; } + /// + /// The namespace to which this configuration is installed to. Maximum of 253 lower case alphanumeric characters, hyphen and + /// period only. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The namespace to which this configuration is installed to. Maximum of 253 lower case alphanumeric characters, hyphen and period only.", + SerializedName = @"namespace", + PossibleTypes = new [] { typeof(string) })] + string Namespace { get; set; } + /// Status of the creation of the fluxConfiguration. + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Status of the creation of the fluxConfiguration.", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningState) })] + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningState? ProvisioningState { get; } + /// + /// Public Key associated with this fluxConfiguration (either generated within the cluster or provided by the user). + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Public Key associated with this fluxConfiguration (either generated within the cluster or provided by the user).", + SerializedName = @"repositoryPublicKey", + PossibleTypes = new [] { typeof(string) })] + string RepositoryPublicKey { get; } + /// The git repository branch name to checkout. + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The git repository branch name to checkout.", + SerializedName = @"branch", + PossibleTypes = new [] { typeof(string) })] + string RepositoryRefBranch { get; set; } + /// + /// The commit SHA to checkout. This value must be combined with the branch name to be valid. This takes precedence over semver. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The commit SHA to checkout. This value must be combined with the branch name to be valid. This takes precedence over semver.", + SerializedName = @"commit", + PossibleTypes = new [] { typeof(string) })] + string RepositoryRefCommit { get; set; } + /// + /// The semver range used to match against git repository tags. This takes precedence over tag. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The semver range used to match against git repository tags. This takes precedence over tag.", + SerializedName = @"semver", + PossibleTypes = new [] { typeof(string) })] + string RepositoryRefSemver { get; set; } + /// The git repository tag name to checkout. This takes precedence over branch. + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The git repository tag name to checkout. This takes precedence over branch.", + SerializedName = @"tag", + PossibleTypes = new [] { typeof(string) })] + string RepositoryRefTag { get; set; } + /// Scope at which the operator will be installed. + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Scope at which the operator will be installed.", + SerializedName = @"scope", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ScopeType) })] + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ScopeType? Scope { get; set; } + /// Source Kind to pull the configuration data from. + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Source Kind to pull the configuration data from.", + SerializedName = @"sourceKind", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType) })] + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType? SourceKind { get; set; } + /// Branch and/or SHA of the source commit synced with the cluster. + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Branch and/or SHA of the source commit synced with the cluster.", + SerializedName = @"sourceSyncedCommitId", + PossibleTypes = new [] { typeof(string) })] + string SourceSyncedCommitId { get; } + /// Datetime the fluxConfiguration synced its source on the cluster. + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Datetime the fluxConfiguration synced its source on the cluster.", + SerializedName = @"sourceUpdatedAt", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? SourceUpdatedAt { get; } + /// Datetime the fluxConfiguration synced its status on the cluster with Azure. + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Datetime the fluxConfiguration synced its status on the cluster with Azure.", + SerializedName = @"statusUpdatedAt", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? StatusUpdatedAt { get; } + /// + /// Statuses of the Flux Kubernetes resources created by the fluxConfiguration or created by the managed objects provisioned + /// by the fluxConfiguration. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Statuses of the Flux Kubernetes resources created by the fluxConfiguration or created by the managed objects provisioned by the fluxConfiguration.", + SerializedName = @"statuses", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectStatusDefinition) })] + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectStatusDefinition[] Statuses { get; } + /// + /// Whether this configuration should suspend its reconciliation of its kustomizations and sources. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Whether this configuration should suspend its reconciliation of its kustomizations and sources.", + SerializedName = @"suspend", + PossibleTypes = new [] { typeof(bool) })] + bool? Suspend { get; set; } + + } + /// Properties to create a Flux Configuration resource + internal partial interface IFluxConfigurationPropertiesInternal + + { + /// Parameters to reconcile to the Bucket source kind type. + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IBucketDefinition Bucket { get; set; } + /// Plaintext access key used to securely access the S3 bucket + System.Security.SecureString BucketAccessKey { get; set; } + /// + /// Specify whether to use insecure communication when puling data from the S3 bucket. + /// + bool? BucketInsecure { get; set; } + /// + /// Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided + /// configuration secrets. + /// + string BucketLocalAuthRef { get; set; } + /// The bucket name to sync from the url endpoint for the flux configuration. + string BucketName { get; set; } + /// + /// The interval at which to re-reconcile the cluster git repository source with the remote. + /// + long? BucketSyncIntervalInSecond { get; set; } + /// + /// The maximum time to attempt to reconcile the cluster git repository source with the remote. + /// + long? BucketTimeoutInSecond { get; set; } + /// The URL to sync for the flux configuration S3 bucket. + string BucketUrl { get; set; } + /// + /// Combined status of the Flux Kubernetes resources created by the fluxConfiguration or created by the managed objects. + /// + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.FluxComplianceState? ComplianceState { get; set; } + /// Key-value pairs of protected configuration settings for the configuration + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesConfigurationProtectedSettings ConfigurationProtectedSetting { get; set; } + /// Error message returned to the user in the case of provisioning failure. + string ErrorMessage { get; set; } + /// Parameters to reconcile to the GitRepository source kind type. + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryDefinition GitRepository { get; set; } + /// + /// Base64-encoded HTTPS certificate authority contents used to access git private git repositories over HTTPS + /// + string GitRepositoryHttpsCaCert { get; set; } + /// Plaintext HTTPS username used to access private git repositories over HTTPS + string GitRepositoryHttpsUser { get; set; } + /// + /// Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided + /// configuration secrets. + /// + string GitRepositoryLocalAuthRef { get; set; } + /// The source reference for the GitRepository object. + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IRepositoryRefDefinition GitRepositoryRef { get; set; } + /// + /// Base64-encoded known_hosts value containing public SSH keys required to access private git repositories over SSH + /// + string GitRepositorySshKnownHost { get; set; } + /// + /// The interval at which to re-reconcile the cluster git repository source with the remote. + /// + long? GitRepositorySyncIntervalInSecond { get; set; } + /// + /// The maximum time to attempt to reconcile the cluster git repository source with the remote. + /// + long? GitRepositoryTimeoutInSecond { get; set; } + /// The URL to sync for the flux configuration git repository. + string GitRepositoryUrl { get; set; } + /// + /// Array of kustomizations used to reconcile the artifact pulled by the source type on the cluster. + /// + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesKustomizations Kustomization { get; set; } + /// + /// The namespace to which this configuration is installed to. Maximum of 253 lower case alphanumeric characters, hyphen and + /// period only. + /// + string Namespace { get; set; } + /// Status of the creation of the fluxConfiguration. + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningState? ProvisioningState { get; set; } + /// + /// Public Key associated with this fluxConfiguration (either generated within the cluster or provided by the user). + /// + string RepositoryPublicKey { get; set; } + /// The git repository branch name to checkout. + string RepositoryRefBranch { get; set; } + /// + /// The commit SHA to checkout. This value must be combined with the branch name to be valid. This takes precedence over semver. + /// + string RepositoryRefCommit { get; set; } + /// + /// The semver range used to match against git repository tags. This takes precedence over tag. + /// + string RepositoryRefSemver { get; set; } + /// The git repository tag name to checkout. This takes precedence over branch. + string RepositoryRefTag { get; set; } + /// Scope at which the operator will be installed. + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ScopeType? Scope { get; set; } + /// Source Kind to pull the configuration data from. + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType? SourceKind { get; set; } + /// Branch and/or SHA of the source commit synced with the cluster. + string SourceSyncedCommitId { get; set; } + /// Datetime the fluxConfiguration synced its source on the cluster. + global::System.DateTime? SourceUpdatedAt { get; set; } + /// Datetime the fluxConfiguration synced its status on the cluster with Azure. + global::System.DateTime? StatusUpdatedAt { get; set; } + /// + /// Statuses of the Flux Kubernetes resources created by the fluxConfiguration or created by the managed objects provisioned + /// by the fluxConfiguration. + /// + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectStatusDefinition[] Statuses { get; set; } + /// + /// Whether this configuration should suspend its reconciliation of its kustomizations and sources. + /// + bool? Suspend { get; set; } + + } +} \ No newline at end of file diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfigurationProperties.json.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfigurationProperties.json.cs new file mode 100644 index 000000000000..91d21f1828de --- /dev/null +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfigurationProperties.json.cs @@ -0,0 +1,170 @@ +// 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.KubernetesConfiguration.Models.Api20220301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; + + /// Properties to create a Flux Configuration resource + public partial class FluxConfigurationProperties + { + + /// + /// 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.KubernetesConfiguration.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject instance to deserialize from. + internal FluxConfigurationProperties(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_gitRepository = If( json?.PropertyT("gitRepository"), out var __jsonGitRepository) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.GitRepositoryDefinition.FromJson(__jsonGitRepository) : GitRepository;} + {_bucket = If( json?.PropertyT("bucket"), out var __jsonBucket) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.BucketDefinition.FromJson(__jsonBucket) : Bucket;} + {_scope = If( json?.PropertyT("scope"), out var __jsonScope) ? (string)__jsonScope : (string)Scope;} + {_namespace = If( json?.PropertyT("namespace"), out var __jsonNamespace) ? (string)__jsonNamespace : (string)Namespace;} + {_sourceKind = If( json?.PropertyT("sourceKind"), out var __jsonSourceKind) ? (string)__jsonSourceKind : (string)SourceKind;} + {_suspend = If( json?.PropertyT("suspend"), out var __jsonSuspend) ? (bool?)__jsonSuspend : Suspend;} + {_kustomization = If( json?.PropertyT("kustomizations"), out var __jsonKustomizations) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.FluxConfigurationPropertiesKustomizations.FromJson(__jsonKustomizations) : Kustomization;} + {_configurationProtectedSetting = If( json?.PropertyT("configurationProtectedSettings"), out var __jsonConfigurationProtectedSettings) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.FluxConfigurationPropertiesConfigurationProtectedSettings.FromJson(__jsonConfigurationProtectedSettings) : ConfigurationProtectedSetting;} + {_statuses = If( json?.PropertyT("statuses"), out var __jsonStatuses) ? If( __jsonStatuses as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20220301.IObjectStatusDefinition) (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ObjectStatusDefinition.FromJson(__u) )) ))() : null : Statuses;} + {_repositoryPublicKey = If( json?.PropertyT("repositoryPublicKey"), out var __jsonRepositoryPublicKey) ? (string)__jsonRepositoryPublicKey : (string)RepositoryPublicKey;} + {_sourceSyncedCommitId = If( json?.PropertyT("sourceSyncedCommitId"), out var __jsonSourceSyncedCommitId) ? (string)__jsonSourceSyncedCommitId : (string)SourceSyncedCommitId;} + {_sourceUpdatedAt = If( json?.PropertyT("sourceUpdatedAt"), out var __jsonSourceUpdatedAt) ? global::System.DateTime.TryParse((string)__jsonSourceUpdatedAt, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonSourceUpdatedAtValue) ? __jsonSourceUpdatedAtValue : SourceUpdatedAt : SourceUpdatedAt;} + {_statusUpdatedAt = If( json?.PropertyT("statusUpdatedAt"), out var __jsonStatusUpdatedAt) ? global::System.DateTime.TryParse((string)__jsonStatusUpdatedAt, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonStatusUpdatedAtValue) ? __jsonStatusUpdatedAtValue : StatusUpdatedAt : StatusUpdatedAt;} + {_complianceState = If( json?.PropertyT("complianceState"), out var __jsonComplianceState) ? (string)__jsonComplianceState : (string)ComplianceState;} + {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)ProvisioningState;} + {_errorMessage = If( json?.PropertyT("errorMessage"), out var __jsonErrorMessage) ? (string)__jsonErrorMessage : (string)ErrorMessage;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationProperties. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationProperties. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json ? new FluxConfigurationProperties(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.KubernetesConfiguration.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._gitRepository ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) this._gitRepository.ToJson(null,serializationMode) : null, "gitRepository" ,container.Add ); + AddIf( null != this._bucket ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) this._bucket.ToJson(null,serializationMode) : null, "bucket" ,container.Add ); + AddIf( null != (((object)this._scope)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonString(this._scope.ToString()) : null, "scope" ,container.Add ); + AddIf( null != (((object)this._namespace)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonString(this._namespace.ToString()) : null, "namespace" ,container.Add ); + AddIf( null != (((object)this._sourceKind)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonString(this._sourceKind.ToString()) : null, "sourceKind" ,container.Add ); + AddIf( null != this._suspend ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonBoolean((bool)this._suspend) : null, "suspend" ,container.Add ); + AddIf( null != this._kustomization ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) this._kustomization.ToJson(null,serializationMode) : null, "kustomizations" ,container.Add ); + AddIf( null != this._configurationProtectedSetting ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) this._configurationProtectedSetting.ToJson(null,serializationMode) : null, "configurationProtectedSettings" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeReadOnly)) + { + if (null != this._statuses) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.XNodeArray(); + foreach( var __x in this._statuses ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("statuses",__w); + } + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._repositoryPublicKey)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonString(this._repositoryPublicKey.ToString()) : null, "repositoryPublicKey" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._sourceSyncedCommitId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonString(this._sourceSyncedCommitId.ToString()) : null, "sourceSyncedCommitId" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._sourceUpdatedAt ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonString(this._sourceUpdatedAt?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "sourceUpdatedAt" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._statusUpdatedAt ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonString(this._statusUpdatedAt?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "statusUpdatedAt" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._complianceState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonString(this._complianceState.ToString()) : null, "complianceState" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._provisioningState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonString(this._provisioningState.ToString()) : null, "provisioningState" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._errorMessage)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonString(this._errorMessage.ToString()) : null, "errorMessage" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfigurationPropertiesConfigurationProtectedSettings.PowerShell.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfigurationPropertiesConfigurationProtectedSettings.PowerShell.cs new file mode 100644 index 000000000000..bc3ddf87b3cb --- /dev/null +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfigurationPropertiesConfigurationProtectedSettings.PowerShell.cs @@ -0,0 +1,165 @@ +// 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.KubernetesConfiguration.Models.Api20220301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; + + /// Key-value pairs of protected configuration settings for the configuration + [System.ComponentModel.TypeConverter(typeof(FluxConfigurationPropertiesConfigurationProtectedSettingsTypeConverter))] + public partial class FluxConfigurationPropertiesConfigurationProtectedSettings + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesConfigurationProtectedSettings DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new FluxConfigurationPropertiesConfigurationProtectedSettings(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.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesConfigurationProtectedSettings DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new FluxConfigurationPropertiesConfigurationProtectedSettings(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal FluxConfigurationPropertiesConfigurationProtectedSettings(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 FluxConfigurationPropertiesConfigurationProtectedSettings(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); + } + + /// + /// 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.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesConfigurationProtectedSettings FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Key-value pairs of protected configuration settings for the configuration + [System.ComponentModel.TypeConverter(typeof(FluxConfigurationPropertiesConfigurationProtectedSettingsTypeConverter))] + public partial interface IFluxConfigurationPropertiesConfigurationProtectedSettings + + { + + } +} \ No newline at end of file diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfigurationPropertiesConfigurationProtectedSettings.TypeConverter.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfigurationPropertiesConfigurationProtectedSettings.TypeConverter.cs new file mode 100644 index 000000000000..99234241da4a --- /dev/null +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfigurationPropertiesConfigurationProtectedSettings.TypeConverter.cs @@ -0,0 +1,153 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class FluxConfigurationPropertiesConfigurationProtectedSettingsTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no + /// suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no + /// suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesConfigurationProtectedSettings ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesConfigurationProtectedSettings).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return FluxConfigurationPropertiesConfigurationProtectedSettings.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return FluxConfigurationPropertiesConfigurationProtectedSettings.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return FluxConfigurationPropertiesConfigurationProtectedSettings.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/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfigurationPropertiesConfigurationProtectedSettings.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfigurationPropertiesConfigurationProtectedSettings.cs new file mode 100644 index 000000000000..221506f0ef7d --- /dev/null +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfigurationPropertiesConfigurationProtectedSettings.cs @@ -0,0 +1,37 @@ +// 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.KubernetesConfiguration.Models.Api20220301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; + + /// Key-value pairs of protected configuration settings for the configuration + public partial class FluxConfigurationPropertiesConfigurationProtectedSettings : + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesConfigurationProtectedSettings, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesConfigurationProtectedSettingsInternal + { + + /// + /// Creates an new instance. + /// + public FluxConfigurationPropertiesConfigurationProtectedSettings() + { + + } + } + /// Key-value pairs of protected configuration settings for the configuration + public partial interface IFluxConfigurationPropertiesConfigurationProtectedSettings : + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IAssociativeArray + { + + } + /// Key-value pairs of protected configuration settings for the configuration + internal partial interface IFluxConfigurationPropertiesConfigurationProtectedSettingsInternal + + { + + } +} \ No newline at end of file diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfigurationPropertiesConfigurationProtectedSettings.dictionary.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfigurationPropertiesConfigurationProtectedSettings.dictionary.cs new file mode 100644 index 000000000000..5216a9e32d78 --- /dev/null +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfigurationPropertiesConfigurationProtectedSettings.dictionary.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; + + public partial class FluxConfigurationPropertiesConfigurationProtectedSettings : + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IAssociativeArray + { + protected global::System.Collections.Generic.Dictionary __additionalProperties = new global::System.Collections.Generic.Dictionary(); + + global::System.Collections.Generic.IDictionary Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IAssociativeArray.AdditionalProperties { get => __additionalProperties; } + + int Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IAssociativeArray.Count { get => __additionalProperties.Count; } + + global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IAssociativeArray.Keys { get => __additionalProperties.Keys; } + + global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.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.KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20220301.FluxConfigurationPropertiesConfigurationProtectedSettings source) => source.__additionalProperties; + } +} \ No newline at end of file diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20/ErrorResponseAutoGenerated.json.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfigurationPropertiesConfigurationProtectedSettings.json.cs similarity index 69% rename from src/KubernetesConfiguration/generated/api/Models/Api20/ErrorResponseAutoGenerated.json.cs rename to src/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfigurationPropertiesConfigurationProtectedSettings.json.cs index e36edc803e78..cb40baa5402e 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Api20/ErrorResponseAutoGenerated.json.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfigurationPropertiesConfigurationProtectedSettings.json.cs @@ -3,15 +3,12 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; - /// - /// Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows - /// the OData error response format.). - /// - public partial class ErrorResponseAutoGenerated + /// Key-value pairs of protected configuration settings for the configuration + public partial class FluxConfigurationPropertiesConfigurationProtectedSettings { /// @@ -23,7 +20,7 @@ public partial class ErrorResponseAutoGenerated partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -33,7 +30,8 @@ public partial class ErrorResponseAutoGenerated /// /// 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. + /// 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. @@ -45,7 +43,8 @@ public partial class ErrorResponseAutoGenerated /// /// 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. + /// 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. @@ -55,10 +54,12 @@ public partial class ErrorResponseAutoGenerated partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject into a new instance of . + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject into a new instance of . /// /// A Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject instance to deserialize from. - internal ErrorResponseAutoGenerated(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json) + /// + internal FluxConfigurationPropertiesConfigurationProtectedSettings(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json, global::System.Collections.Generic.HashSet exclusions = null) { bool returnNow = false; BeforeFromJson(json, ref returnNow); @@ -66,30 +67,32 @@ internal ErrorResponseAutoGenerated(Microsoft.Azure.PowerShell.Cmdlets.Kubernete { return; } - {_error = If( json?.PropertyT("error"), out var __jsonError) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorDetail.FromJson(__jsonError) : Error;} + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.JsonSerializable.FromJson( json, ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IAssociativeArray)this).AdditionalProperties, null ,exclusions ); AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponseAutoGenerated. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesConfigurationProtectedSettings. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponseAutoGenerated. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesConfigurationProtectedSettings. /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponseAutoGenerated FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesConfigurationProtectedSettings FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) { - return node is Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json ? new ErrorResponseAutoGenerated(json) : null; + return node is Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json ? new FluxConfigurationPropertiesConfigurationProtectedSettings(json) : null; } /// - /// Serializes this instance of into a . + /// Serializes this instance of into a . /// /// The container to serialize this object into. If the caller /// passes in null, a new instance will be created and returned to the caller. /// Allows the caller to choose the depth of the serialization. See . /// - /// a serialized instance of as a . + /// a serialized instance of as a . /// public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode serializationMode) { @@ -101,7 +104,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.J { return container; } - AddIf( null != this._error ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) this._error.ToJson(null,serializationMode) : null, "error" ,container.Add ); + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.JsonSerializable.ToJson( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IAssociativeArray)this).AdditionalProperties, container); AfterToJson(ref container); return container; } diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20210301/Result.PowerShell.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfigurationPropertiesKustomizations.PowerShell.cs similarity index 70% rename from src/KubernetesConfiguration/generated/api/Models/Api20210301/Result.PowerShell.cs rename to src/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfigurationPropertiesKustomizations.PowerShell.cs index 7d0f15f40355..6844a679807f 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Api20210301/Result.PowerShell.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfigurationPropertiesKustomizations.PowerShell.cs @@ -3,13 +3,15 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; - /// Sample result definition - [System.ComponentModel.TypeConverter(typeof(ResultTypeConverter))] - public partial class Result + /// + /// Array of kustomizations used to reconcile the artifact pulled by the source type on the cluster. + /// + [System.ComponentModel.TypeConverter(typeof(FluxConfigurationPropertiesKustomizationsTypeConverter))] + public partial class FluxConfigurationPropertiesKustomizations { /// @@ -31,7 +33,8 @@ public partial class Result /// /// 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. + /// 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. @@ -43,7 +46,8 @@ public partial class Result /// /// 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. + /// 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. @@ -61,44 +65,39 @@ public partial class Result partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesKustomizations DeserializeFromDictionary(global::System.Collections.IDictionary content) { - return new Result(content); + return new FluxConfigurationPropertiesKustomizations(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesKustomizations DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { - return new Result(content); + return new FluxConfigurationPropertiesKustomizations(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.KubernetesConfiguration.Models.Api20210301.IResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. - internal Result(global::System.Collections.IDictionary content) + internal FluxConfigurationPropertiesKustomizations(global::System.Collections.IDictionary content) { bool returnNow = false; BeforeDeserializeDictionary(content, ref returnNow); @@ -107,16 +106,17 @@ internal Result(global::System.Collections.IDictionary content) return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IResultInternal)this).SampleProperty = (string) content.GetValueForProperty("SampleProperty",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IResultInternal)this).SampleProperty, global::System.Convert.ToString); + // this type is a dictionary; copy elements from source to here. + CopyFrom(content); AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. - internal Result(global::System.Management.Automation.PSObject content) + internal FluxConfigurationPropertiesKustomizations(global::System.Management.Automation.PSObject content) { bool returnNow = false; BeforeDeserializePSObject(content, ref returnNow); @@ -125,10 +125,21 @@ internal Result(global::System.Management.Automation.PSObject content) return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IResultInternal)this).SampleProperty = (string) content.GetValueForProperty("SampleProperty",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IResultInternal)this).SampleProperty, global::System.Convert.ToString); + // this type is a dictionary; copy elements from source to here. + CopyFrom(content); 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.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesKustomizations FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); + /// Serializes this instance to a json string. /// a containing this model serialized to JSON text. @@ -146,9 +157,9 @@ public override string ToString() return ToJsonString(); } } - /// Sample result definition - [System.ComponentModel.TypeConverter(typeof(ResultTypeConverter))] - public partial interface IResult + /// Array of kustomizations used to reconcile the artifact pulled by the source type on the cluster. + [System.ComponentModel.TypeConverter(typeof(FluxConfigurationPropertiesKustomizationsTypeConverter))] + public partial interface IFluxConfigurationPropertiesKustomizations { diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20210901/ResourceProviderOperationListAutoGenerated.TypeConverter.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfigurationPropertiesKustomizations.TypeConverter.cs similarity index 68% rename from src/KubernetesConfiguration/generated/api/Models/Api20210901/ResourceProviderOperationListAutoGenerated.TypeConverter.cs rename to src/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfigurationPropertiesKustomizations.TypeConverter.cs index 9bc99b5a246f..e60819c02023 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Api20210901/ResourceProviderOperationListAutoGenerated.TypeConverter.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfigurationPropertiesKustomizations.TypeConverter.cs @@ -3,37 +3,37 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; /// - /// A PowerShell PSTypeConverter to support converting to an instance of /// - public partial class ResourceProviderOperationListAutoGeneratedTypeConverter : global::System.Management.Automation.PSTypeConverter + public partial class FluxConfigurationPropertiesKustomizationsTypeConverter : global::System.Management.Automation.PSTypeConverter { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// 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. + /// 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. + /// Determines if the converter can convert the parameter to the + /// type. /// - /// the instance to check if it can be converted to the the instance to check if it can be converted to the type. /// - /// true if the instance could be converted to a type, otherwise + /// true if the instance could be converted to a type, otherwise /// false /// public static bool CanConvertFrom(dynamic sourceValue) @@ -77,52 +77,53 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// 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 + /// 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 + /// 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. + /// 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 + /// Converts the parameter into an instance of /// - /// the value to convert into an instance of the value to convert into an instance of . /// - /// an instance of , or null if there is no suitable conversion. + /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IResourceProviderOperationListAutoGenerated ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesKustomizations ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IResourceProviderOperationListAutoGenerated).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesKustomizations).IsAssignableFrom(type)) { return sourceValue; } try { - return ResourceProviderOperationListAutoGenerated.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + return FluxConfigurationPropertiesKustomizations.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; } catch { @@ -130,11 +131,11 @@ public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models. } if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) { - return ResourceProviderOperationListAutoGenerated.DeserializeFromPSObject(sourceValue); + return FluxConfigurationPropertiesKustomizations.DeserializeFromPSObject(sourceValue); } if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) { - return ResourceProviderOperationListAutoGenerated.DeserializeFromDictionary(sourceValue); + return FluxConfigurationPropertiesKustomizations.DeserializeFromDictionary(sourceValue); } return null; } diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfigurationPropertiesKustomizations.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfigurationPropertiesKustomizations.cs new file mode 100644 index 000000000000..eecb4811a8a1 --- /dev/null +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfigurationPropertiesKustomizations.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.KubernetesConfiguration.Models.Api20220301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; + + /// + /// Array of kustomizations used to reconcile the artifact pulled by the source type on the cluster. + /// + public partial class FluxConfigurationPropertiesKustomizations : + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesKustomizations, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesKustomizationsInternal + { + + /// + /// Creates an new instance. + /// + public FluxConfigurationPropertiesKustomizations() + { + + } + } + /// Array of kustomizations used to reconcile the artifact pulled by the source type on the cluster. + public partial interface IFluxConfigurationPropertiesKustomizations : + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IAssociativeArray + { + + } + /// Array of kustomizations used to reconcile the artifact pulled by the source type on the cluster. + internal partial interface IFluxConfigurationPropertiesKustomizationsInternal + + { + + } +} \ No newline at end of file diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfigurationPropertiesKustomizations.dictionary.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfigurationPropertiesKustomizations.dictionary.cs new file mode 100644 index 000000000000..97cb23e718da --- /dev/null +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfigurationPropertiesKustomizations.dictionary.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; + + public partial class FluxConfigurationPropertiesKustomizations : + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IAssociativeArray + { + protected global::System.Collections.Generic.Dictionary __additionalProperties = new global::System.Collections.Generic.Dictionary(); + + global::System.Collections.Generic.IDictionary Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IAssociativeArray.AdditionalProperties { get => __additionalProperties; } + + int Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IAssociativeArray.Count { get => __additionalProperties.Count; } + + global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IAssociativeArray.Keys { get => __additionalProperties.Keys; } + + global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IAssociativeArray.Values { get => __additionalProperties.Values; } + + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IKustomizationDefinition this[global::System.String index] { get => __additionalProperties[index]; set => __additionalProperties[index] = value; } + + /// + /// + public void Add(global::System.String key, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IKustomizationDefinition 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.KubernetesConfiguration.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.KubernetesConfiguration.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 Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IKustomizationDefinition value) => __additionalProperties.TryGetValue( key, out value); + + /// + + public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.FluxConfigurationPropertiesKustomizations source) => source.__additionalProperties; + } +} \ No newline at end of file diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfigurationPropertiesKustomizations.json.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfigurationPropertiesKustomizations.json.cs new file mode 100644 index 000000000000..1e15d55c5a49 --- /dev/null +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfigurationPropertiesKustomizations.json.cs @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; + + /// + /// Array of kustomizations used to reconcile the artifact pulled by the source type on the cluster. + /// + public partial class FluxConfigurationPropertiesKustomizations + { + + /// + /// 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.KubernetesConfiguration.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject instance to deserialize from. + /// + internal FluxConfigurationPropertiesKustomizations(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.JsonSerializable.FromJson( json, ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IAssociativeArray)this).AdditionalProperties, (j) => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.KustomizationDefinition.FromJson(j) ,exclusions ); + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesKustomizations. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesKustomizations. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesKustomizations FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json ? new FluxConfigurationPropertiesKustomizations(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.KubernetesConfiguration.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.JsonSerializable.ToJson( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IAssociativeArray)this).AdditionalProperties, container); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20210301/ErrorResponse.PowerShell.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfigurationsList.PowerShell.cs similarity index 59% rename from src/KubernetesConfiguration/generated/api/Models/Api20210301/ErrorResponse.PowerShell.cs rename to src/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfigurationsList.PowerShell.cs index cc4d8998a8b3..792c5190decb 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Api20210301/ErrorResponse.PowerShell.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfigurationsList.PowerShell.cs @@ -3,13 +3,16 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; - /// Error response. - [System.ComponentModel.TypeConverter(typeof(ErrorResponseTypeConverter))] - public partial class ErrorResponse + /// + /// Result of the request to list Flux Configurations. It contains a list of FluxConfiguration objects and a URL link to get + /// the next set of results. + /// + [System.ComponentModel.TypeConverter(typeof(FluxConfigurationsListTypeConverter))] + public partial class FluxConfigurationsList { /// @@ -31,7 +34,8 @@ public partial class ErrorResponse /// /// 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. + /// 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. @@ -43,7 +47,8 @@ public partial class ErrorResponse /// /// 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. + /// 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. @@ -61,39 +66,39 @@ public partial class ErrorResponse partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IErrorResponse DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationsList DeserializeFromDictionary(global::System.Collections.IDictionary content) { - return new ErrorResponse(content); + return new FluxConfigurationsList(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IErrorResponse DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationsList DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { - return new ErrorResponse(content); + return new FluxConfigurationsList(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. - internal ErrorResponse(global::System.Collections.IDictionary content) + internal FluxConfigurationsList(global::System.Collections.IDictionary content) { bool returnNow = false; BeforeDeserializeDictionary(content, ref returnNow); @@ -102,18 +107,23 @@ internal ErrorResponse(global::System.Collections.IDictionary content) return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IErrorResponseInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IErrorDefinition) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IErrorResponseInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ErrorDefinitionTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IErrorResponseInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IErrorResponseInternal)this).Code, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IErrorResponseInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IErrorResponseInternal)this).Message, global::System.Convert.ToString); + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationsListInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfiguration[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationsListInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.FluxConfigurationTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationsListInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationsListInternal)this).NextLink, global::System.Convert.ToString); + } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. - internal ErrorResponse(global::System.Management.Automation.PSObject content) + internal FluxConfigurationsList(global::System.Management.Automation.PSObject content) { bool returnNow = false; BeforeDeserializePSObject(content, ref returnNow); @@ -122,18 +132,23 @@ internal ErrorResponse(global::System.Management.Automation.PSObject content) return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IErrorResponseInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IErrorDefinition) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IErrorResponseInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ErrorDefinitionTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IErrorResponseInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IErrorResponseInternal)this).Code, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IErrorResponseInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IErrorResponseInternal)this).Message, global::System.Convert.ToString); + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationsListInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfiguration[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationsListInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.FluxConfigurationTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationsListInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationsListInternal)this).NextLink, global::System.Convert.ToString); + } AfterDeserializePSObject(content); } /// - /// Creates a new instance of , deserializing the content from a json string. + /// Creates a new instance of , deserializing the content from a json string. /// /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IErrorResponse FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationsList FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. @@ -152,9 +167,10 @@ public override string ToString() return ToJsonString(); } } - /// Error response. - [System.ComponentModel.TypeConverter(typeof(ErrorResponseTypeConverter))] - public partial interface IErrorResponse + /// Result of the request to list Flux Configurations. It contains a list of FluxConfiguration objects and a URL link to get + /// the next set of results. + [System.ComponentModel.TypeConverter(typeof(FluxConfigurationsListTypeConverter))] + public partial interface IFluxConfigurationsList { diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfigurationsList.TypeConverter.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfigurationsList.TypeConverter.cs new file mode 100644 index 000000000000..f4aea3bd03ad --- /dev/null +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfigurationsList.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class FluxConfigurationsListTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationsList ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationsList).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return FluxConfigurationsList.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return FluxConfigurationsList.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return FluxConfigurationsList.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/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfigurationsList.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfigurationsList.cs new file mode 100644 index 000000000000..f005ff84b50c --- /dev/null +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfigurationsList.cs @@ -0,0 +1,79 @@ +// 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.KubernetesConfiguration.Models.Api20220301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; + + /// + /// Result of the request to list Flux Configurations. It contains a list of FluxConfiguration objects and a URL link to get + /// the next set of results. + /// + public partial class FluxConfigurationsList : + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationsList, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationsListInternal + { + + /// Internal Acessors for NextLink + string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationsListInternal.NextLink { get => this._nextLink; set { {_nextLink = value;} } } + + /// Internal Acessors for Value + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfiguration[] Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationsListInternal.Value { get => this._value; set { {_value = value;} } } + + /// Backing field for property. + private string _nextLink; + + /// URL to get the next set of configuration objects, if any. + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] + public string NextLink { get => this._nextLink; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfiguration[] _value; + + /// List of Flux Configurations within a Kubernetes cluster. + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfiguration[] Value { get => this._value; } + + /// Creates an new instance. + public FluxConfigurationsList() + { + + } + } + /// Result of the request to list Flux Configurations. It contains a list of FluxConfiguration objects and a URL link to get + /// the next set of results. + public partial interface IFluxConfigurationsList : + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IJsonSerializable + { + /// URL to get the next set of configuration objects, if any. + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"URL to get the next set of configuration objects, if any.", + SerializedName = @"nextLink", + PossibleTypes = new [] { typeof(string) })] + string NextLink { get; } + /// List of Flux Configurations within a Kubernetes cluster. + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"List of Flux Configurations within a Kubernetes cluster.", + SerializedName = @"value", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfiguration) })] + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfiguration[] Value { get; } + + } + /// Result of the request to list Flux Configurations. It contains a list of FluxConfiguration objects and a URL link to get + /// the next set of results. + internal partial interface IFluxConfigurationsListInternal + + { + /// URL to get the next set of configuration objects, if any. + string NextLink { get; set; } + /// List of Flux Configurations within a Kubernetes cluster. + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfiguration[] Value { get; set; } + + } +} \ No newline at end of file diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20210901/ResourceProviderOperationListAutoGenerated.json.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfigurationsList.json.cs similarity index 72% rename from src/KubernetesConfiguration/generated/api/Models/Api20210901/ResourceProviderOperationListAutoGenerated.json.cs rename to src/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfigurationsList.json.cs index 74de0a22e822..4e258ab5202d 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Api20210901/ResourceProviderOperationListAutoGenerated.json.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/FluxConfigurationsList.json.cs @@ -3,12 +3,15 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; - /// Result of the request to list operations. - public partial class ResourceProviderOperationListAutoGenerated + /// + /// Result of the request to list Flux Configurations. It contains a list of FluxConfiguration objects and a URL link to get + /// the next set of results. + /// + public partial class FluxConfigurationsList { /// @@ -20,7 +23,7 @@ public partial class ResourceProviderOperationListAutoGenerated partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +33,8 @@ public partial class ResourceProviderOperationListAutoGenerated /// /// 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. + /// 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. @@ -42,7 +46,8 @@ public partial class ResourceProviderOperationListAutoGenerated /// /// 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. + /// 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. @@ -52,22 +57,10 @@ public partial class ResourceProviderOperationListAutoGenerated partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IResourceProviderOperationListAutoGenerated. - /// - /// a to deserialize from. - /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IResourceProviderOperationListAutoGenerated. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IResourceProviderOperationListAutoGenerated FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) - { - return node is Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json ? new ResourceProviderOperationListAutoGenerated(json) : null; - } - - /// - /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject into a new instance of . + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject into a new instance of . /// /// A Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject instance to deserialize from. - internal ResourceProviderOperationListAutoGenerated(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json) + internal FluxConfigurationsList(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); @@ -75,21 +68,31 @@ internal ResourceProviderOperationListAutoGenerated(Microsoft.Azure.PowerShell.C { return; } - {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20210901.IResourceProviderOperationAutoGenerated) (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.ResourceProviderOperationAutoGenerated.FromJson(__u) )) ))() : null : Value;} + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20220301.IFluxConfiguration) (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.FluxConfiguration.FromJson(__u) )) ))() : null : Value;} {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} AfterFromJson(json); } /// - /// Serializes this instance of into a . + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationsList. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationsList. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationsList FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json ? new FluxConfigurationsList(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 . + /// a serialized instance of as a . /// public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode serializationMode) { @@ -101,14 +104,17 @@ public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.J { return container; } - if (null != this._value) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeReadOnly)) { - var __w = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.XNodeArray(); - foreach( var __x in this._value ) + if (null != this._value) { - AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + var __w = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.XNodeArray(); + foreach( var __x in this._value ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("value",__w); } - container.Add("value",__w); } if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeReadOnly)) { diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20220301/GitRepositoryDefinition.PowerShell.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/GitRepositoryDefinition.PowerShell.cs new file mode 100644 index 000000000000..bd90e92fd474 --- /dev/null +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/GitRepositoryDefinition.PowerShell.cs @@ -0,0 +1,254 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; + + /// Parameters to reconcile to the GitRepository source kind type. + [System.ComponentModel.TypeConverter(typeof(GitRepositoryDefinitionTypeConverter))] + public partial class GitRepositoryDefinition + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryDefinition DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new GitRepositoryDefinition(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.KubernetesConfiguration.Models.Api20220301.IGitRepositoryDefinition DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new GitRepositoryDefinition(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.KubernetesConfiguration.Models.Api20220301.IGitRepositoryDefinition FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal GitRepositoryDefinition(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("RepositoryRef")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryDefinitionInternal)this).RepositoryRef = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IRepositoryRefDefinition) content.GetValueForProperty("RepositoryRef",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryDefinitionInternal)this).RepositoryRef, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.RepositoryRefDefinitionTypeConverter.ConvertFrom); + } + if (content.Contains("Url")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryDefinitionInternal)this).Url = (string) content.GetValueForProperty("Url",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryDefinitionInternal)this).Url, global::System.Convert.ToString); + } + if (content.Contains("TimeoutInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryDefinitionInternal)this).TimeoutInSecond = (long?) content.GetValueForProperty("TimeoutInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryDefinitionInternal)this).TimeoutInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("SyncIntervalInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryDefinitionInternal)this).SyncIntervalInSecond = (long?) content.GetValueForProperty("SyncIntervalInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryDefinitionInternal)this).SyncIntervalInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("SshKnownHost")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryDefinitionInternal)this).SshKnownHost = (string) content.GetValueForProperty("SshKnownHost",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryDefinitionInternal)this).SshKnownHost, global::System.Convert.ToString); + } + if (content.Contains("HttpsUser")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryDefinitionInternal)this).HttpsUser = (string) content.GetValueForProperty("HttpsUser",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryDefinitionInternal)this).HttpsUser, global::System.Convert.ToString); + } + if (content.Contains("HttpsCaCert")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryDefinitionInternal)this).HttpsCaCert = (string) content.GetValueForProperty("HttpsCaCert",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryDefinitionInternal)this).HttpsCaCert, global::System.Convert.ToString); + } + if (content.Contains("LocalAuthRef")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryDefinitionInternal)this).LocalAuthRef = (string) content.GetValueForProperty("LocalAuthRef",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryDefinitionInternal)this).LocalAuthRef, global::System.Convert.ToString); + } + if (content.Contains("RepositoryRefBranch")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryDefinitionInternal)this).RepositoryRefBranch = (string) content.GetValueForProperty("RepositoryRefBranch",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryDefinitionInternal)this).RepositoryRefBranch, global::System.Convert.ToString); + } + if (content.Contains("RepositoryRefTag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryDefinitionInternal)this).RepositoryRefTag = (string) content.GetValueForProperty("RepositoryRefTag",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryDefinitionInternal)this).RepositoryRefTag, global::System.Convert.ToString); + } + if (content.Contains("RepositoryRefSemver")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryDefinitionInternal)this).RepositoryRefSemver = (string) content.GetValueForProperty("RepositoryRefSemver",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryDefinitionInternal)this).RepositoryRefSemver, global::System.Convert.ToString); + } + if (content.Contains("RepositoryRefCommit")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryDefinitionInternal)this).RepositoryRefCommit = (string) content.GetValueForProperty("RepositoryRefCommit",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryDefinitionInternal)this).RepositoryRefCommit, 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 GitRepositoryDefinition(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("RepositoryRef")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryDefinitionInternal)this).RepositoryRef = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IRepositoryRefDefinition) content.GetValueForProperty("RepositoryRef",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryDefinitionInternal)this).RepositoryRef, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.RepositoryRefDefinitionTypeConverter.ConvertFrom); + } + if (content.Contains("Url")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryDefinitionInternal)this).Url = (string) content.GetValueForProperty("Url",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryDefinitionInternal)this).Url, global::System.Convert.ToString); + } + if (content.Contains("TimeoutInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryDefinitionInternal)this).TimeoutInSecond = (long?) content.GetValueForProperty("TimeoutInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryDefinitionInternal)this).TimeoutInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("SyncIntervalInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryDefinitionInternal)this).SyncIntervalInSecond = (long?) content.GetValueForProperty("SyncIntervalInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryDefinitionInternal)this).SyncIntervalInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("SshKnownHost")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryDefinitionInternal)this).SshKnownHost = (string) content.GetValueForProperty("SshKnownHost",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryDefinitionInternal)this).SshKnownHost, global::System.Convert.ToString); + } + if (content.Contains("HttpsUser")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryDefinitionInternal)this).HttpsUser = (string) content.GetValueForProperty("HttpsUser",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryDefinitionInternal)this).HttpsUser, global::System.Convert.ToString); + } + if (content.Contains("HttpsCaCert")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryDefinitionInternal)this).HttpsCaCert = (string) content.GetValueForProperty("HttpsCaCert",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryDefinitionInternal)this).HttpsCaCert, global::System.Convert.ToString); + } + if (content.Contains("LocalAuthRef")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryDefinitionInternal)this).LocalAuthRef = (string) content.GetValueForProperty("LocalAuthRef",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryDefinitionInternal)this).LocalAuthRef, global::System.Convert.ToString); + } + if (content.Contains("RepositoryRefBranch")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryDefinitionInternal)this).RepositoryRefBranch = (string) content.GetValueForProperty("RepositoryRefBranch",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryDefinitionInternal)this).RepositoryRefBranch, global::System.Convert.ToString); + } + if (content.Contains("RepositoryRefTag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryDefinitionInternal)this).RepositoryRefTag = (string) content.GetValueForProperty("RepositoryRefTag",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryDefinitionInternal)this).RepositoryRefTag, global::System.Convert.ToString); + } + if (content.Contains("RepositoryRefSemver")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryDefinitionInternal)this).RepositoryRefSemver = (string) content.GetValueForProperty("RepositoryRefSemver",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryDefinitionInternal)this).RepositoryRefSemver, global::System.Convert.ToString); + } + if (content.Contains("RepositoryRefCommit")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryDefinitionInternal)this).RepositoryRefCommit = (string) content.GetValueForProperty("RepositoryRefCommit",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryDefinitionInternal)this).RepositoryRefCommit, 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.KubernetesConfiguration.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Parameters to reconcile to the GitRepository source kind type. + [System.ComponentModel.TypeConverter(typeof(GitRepositoryDefinitionTypeConverter))] + public partial interface IGitRepositoryDefinition + + { + + } +} \ No newline at end of file diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20220301/GitRepositoryDefinition.TypeConverter.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/GitRepositoryDefinition.TypeConverter.cs new file mode 100644 index 000000000000..82dcc336e9ac --- /dev/null +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/GitRepositoryDefinition.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class GitRepositoryDefinitionTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryDefinition ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryDefinition).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return GitRepositoryDefinition.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return GitRepositoryDefinition.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return GitRepositoryDefinition.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/KubernetesConfiguration/generated/api/Models/Api20220301/GitRepositoryDefinition.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/GitRepositoryDefinition.cs new file mode 100644 index 000000000000..e7942050d7d1 --- /dev/null +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/GitRepositoryDefinition.cs @@ -0,0 +1,266 @@ +// 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.KubernetesConfiguration.Models.Api20220301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; + + /// Parameters to reconcile to the GitRepository source kind type. + public partial class GitRepositoryDefinition : + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryDefinition, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryDefinitionInternal + { + + /// Backing field for property. + private string _httpsCaCert; + + /// + /// Base64-encoded HTTPS certificate authority contents used to access git private git repositories over HTTPS + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] + public string HttpsCaCert { get => this._httpsCaCert; set => this._httpsCaCert = value; } + + /// Backing field for property. + private string _httpsUser; + + /// Plaintext HTTPS username used to access private git repositories over HTTPS + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] + public string HttpsUser { get => this._httpsUser; set => this._httpsUser = value; } + + /// Backing field for property. + private string _localAuthRef; + + /// + /// Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided + /// configuration secrets. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] + public string LocalAuthRef { get => this._localAuthRef; set => this._localAuthRef = value; } + + /// Internal Acessors for RepositoryRef + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IRepositoryRefDefinition Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryDefinitionInternal.RepositoryRef { get => (this._repositoryRef = this._repositoryRef ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.RepositoryRefDefinition()); set { {_repositoryRef = value;} } } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IRepositoryRefDefinition _repositoryRef; + + /// The source reference for the GitRepository object. + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IRepositoryRefDefinition RepositoryRef { get => (this._repositoryRef = this._repositoryRef ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.RepositoryRefDefinition()); set => this._repositoryRef = value; } + + /// The git repository branch name to checkout. + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] + public string RepositoryRefBranch { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IRepositoryRefDefinitionInternal)RepositoryRef).Branch; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IRepositoryRefDefinitionInternal)RepositoryRef).Branch = value ?? null; } + + /// + /// The commit SHA to checkout. This value must be combined with the branch name to be valid. This takes precedence over semver. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] + public string RepositoryRefCommit { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IRepositoryRefDefinitionInternal)RepositoryRef).Commit; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IRepositoryRefDefinitionInternal)RepositoryRef).Commit = value ?? null; } + + /// + /// The semver range used to match against git repository tags. This takes precedence over tag. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] + public string RepositoryRefSemver { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IRepositoryRefDefinitionInternal)RepositoryRef).Semver; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IRepositoryRefDefinitionInternal)RepositoryRef).Semver = value ?? null; } + + /// The git repository tag name to checkout. This takes precedence over branch. + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] + public string RepositoryRefTag { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IRepositoryRefDefinitionInternal)RepositoryRef).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IRepositoryRefDefinitionInternal)RepositoryRef).Tag = value ?? null; } + + /// Backing field for property. + private string _sshKnownHost; + + /// + /// Base64-encoded known_hosts value containing public SSH keys required to access private git repositories over SSH + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] + public string SshKnownHost { get => this._sshKnownHost; set => this._sshKnownHost = value; } + + /// Backing field for property. + private long? _syncIntervalInSecond; + + /// + /// The interval at which to re-reconcile the cluster git repository source with the remote. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] + public long? SyncIntervalInSecond { get => this._syncIntervalInSecond; set => this._syncIntervalInSecond = value; } + + /// Backing field for property. + private long? _timeoutInSecond; + + /// + /// The maximum time to attempt to reconcile the cluster git repository source with the remote. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] + public long? TimeoutInSecond { get => this._timeoutInSecond; set => this._timeoutInSecond = value; } + + /// Backing field for property. + private string _url; + + /// The URL to sync for the flux configuration git repository. + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] + public string Url { get => this._url; set => this._url = value; } + + /// Creates an new instance. + public GitRepositoryDefinition() + { + + } + } + /// Parameters to reconcile to the GitRepository source kind type. + public partial interface IGitRepositoryDefinition : + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IJsonSerializable + { + /// + /// Base64-encoded HTTPS certificate authority contents used to access git private git repositories over HTTPS + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Base64-encoded HTTPS certificate authority contents used to access git private git repositories over HTTPS", + SerializedName = @"httpsCACert", + PossibleTypes = new [] { typeof(string) })] + string HttpsCaCert { get; set; } + /// Plaintext HTTPS username used to access private git repositories over HTTPS + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Plaintext HTTPS username used to access private git repositories over HTTPS", + SerializedName = @"httpsUser", + PossibleTypes = new [] { typeof(string) })] + string HttpsUser { get; set; } + /// + /// Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided + /// configuration secrets. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided configuration secrets.", + SerializedName = @"localAuthRef", + PossibleTypes = new [] { typeof(string) })] + string LocalAuthRef { get; set; } + /// The git repository branch name to checkout. + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The git repository branch name to checkout.", + SerializedName = @"branch", + PossibleTypes = new [] { typeof(string) })] + string RepositoryRefBranch { get; set; } + /// + /// The commit SHA to checkout. This value must be combined with the branch name to be valid. This takes precedence over semver. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The commit SHA to checkout. This value must be combined with the branch name to be valid. This takes precedence over semver.", + SerializedName = @"commit", + PossibleTypes = new [] { typeof(string) })] + string RepositoryRefCommit { get; set; } + /// + /// The semver range used to match against git repository tags. This takes precedence over tag. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The semver range used to match against git repository tags. This takes precedence over tag.", + SerializedName = @"semver", + PossibleTypes = new [] { typeof(string) })] + string RepositoryRefSemver { get; set; } + /// The git repository tag name to checkout. This takes precedence over branch. + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The git repository tag name to checkout. This takes precedence over branch.", + SerializedName = @"tag", + PossibleTypes = new [] { typeof(string) })] + string RepositoryRefTag { get; set; } + /// + /// Base64-encoded known_hosts value containing public SSH keys required to access private git repositories over SSH + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Base64-encoded known_hosts value containing public SSH keys required to access private git repositories over SSH", + SerializedName = @"sshKnownHosts", + PossibleTypes = new [] { typeof(string) })] + string SshKnownHost { get; set; } + /// + /// The interval at which to re-reconcile the cluster git repository source with the remote. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The interval at which to re-reconcile the cluster git repository source with the remote.", + SerializedName = @"syncIntervalInSeconds", + PossibleTypes = new [] { typeof(long) })] + long? SyncIntervalInSecond { get; set; } + /// + /// The maximum time to attempt to reconcile the cluster git repository source with the remote. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The maximum time to attempt to reconcile the cluster git repository source with the remote.", + SerializedName = @"timeoutInSeconds", + PossibleTypes = new [] { typeof(long) })] + long? TimeoutInSecond { get; set; } + /// The URL to sync for the flux configuration git repository. + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The URL to sync for the flux configuration git repository.", + SerializedName = @"url", + PossibleTypes = new [] { typeof(string) })] + string Url { get; set; } + + } + /// Parameters to reconcile to the GitRepository source kind type. + internal partial interface IGitRepositoryDefinitionInternal + + { + /// + /// Base64-encoded HTTPS certificate authority contents used to access git private git repositories over HTTPS + /// + string HttpsCaCert { get; set; } + /// Plaintext HTTPS username used to access private git repositories over HTTPS + string HttpsUser { get; set; } + /// + /// Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided + /// configuration secrets. + /// + string LocalAuthRef { get; set; } + /// The source reference for the GitRepository object. + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IRepositoryRefDefinition RepositoryRef { get; set; } + /// The git repository branch name to checkout. + string RepositoryRefBranch { get; set; } + /// + /// The commit SHA to checkout. This value must be combined with the branch name to be valid. This takes precedence over semver. + /// + string RepositoryRefCommit { get; set; } + /// + /// The semver range used to match against git repository tags. This takes precedence over tag. + /// + string RepositoryRefSemver { get; set; } + /// The git repository tag name to checkout. This takes precedence over branch. + string RepositoryRefTag { get; set; } + /// + /// Base64-encoded known_hosts value containing public SSH keys required to access private git repositories over SSH + /// + string SshKnownHost { get; set; } + /// + /// The interval at which to re-reconcile the cluster git repository source with the remote. + /// + long? SyncIntervalInSecond { get; set; } + /// + /// The maximum time to attempt to reconcile the cluster git repository source with the remote. + /// + long? TimeoutInSecond { get; set; } + /// The URL to sync for the flux configuration git repository. + string Url { get; set; } + + } +} \ No newline at end of file diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20220301/GitRepositoryDefinition.json.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/GitRepositoryDefinition.json.cs new file mode 100644 index 000000000000..3f7ecf5ccd64 --- /dev/null +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/GitRepositoryDefinition.json.cs @@ -0,0 +1,122 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; + + /// Parameters to reconcile to the GitRepository source kind type. + public partial class GitRepositoryDefinition + { + + /// + /// 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.KubernetesConfiguration.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryDefinition. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryDefinition. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryDefinition FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json ? new GitRepositoryDefinition(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject instance to deserialize from. + internal GitRepositoryDefinition(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_repositoryRef = If( json?.PropertyT("repositoryRef"), out var __jsonRepositoryRef) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.RepositoryRefDefinition.FromJson(__jsonRepositoryRef) : RepositoryRef;} + {_url = If( json?.PropertyT("url"), out var __jsonUrl) ? (string)__jsonUrl : (string)Url;} + {_timeoutInSecond = If( json?.PropertyT("timeoutInSeconds"), out var __jsonTimeoutInSeconds) ? (long?)__jsonTimeoutInSeconds : TimeoutInSecond;} + {_syncIntervalInSecond = If( json?.PropertyT("syncIntervalInSeconds"), out var __jsonSyncIntervalInSeconds) ? (long?)__jsonSyncIntervalInSeconds : SyncIntervalInSecond;} + {_sshKnownHost = If( json?.PropertyT("sshKnownHosts"), out var __jsonSshKnownHosts) ? (string)__jsonSshKnownHosts : (string)SshKnownHost;} + {_httpsUser = If( json?.PropertyT("httpsUser"), out var __jsonHttpsUser) ? (string)__jsonHttpsUser : (string)HttpsUser;} + {_httpsCaCert = If( json?.PropertyT("httpsCACert"), out var __jsonHttpsCaCert) ? (string)__jsonHttpsCaCert : (string)HttpsCaCert;} + {_localAuthRef = If( json?.PropertyT("localAuthRef"), out var __jsonLocalAuthRef) ? (string)__jsonLocalAuthRef : (string)LocalAuthRef;} + 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.KubernetesConfiguration.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._repositoryRef ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) this._repositoryRef.ToJson(null,serializationMode) : null, "repositoryRef" ,container.Add ); + AddIf( null != (((object)this._url)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonString(this._url.ToString()) : null, "url" ,container.Add ); + AddIf( null != this._timeoutInSecond ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNumber((long)this._timeoutInSecond) : null, "timeoutInSeconds" ,container.Add ); + AddIf( null != this._syncIntervalInSecond ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNumber((long)this._syncIntervalInSecond) : null, "syncIntervalInSeconds" ,container.Add ); + AddIf( null != (((object)this._sshKnownHost)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonString(this._sshKnownHost.ToString()) : null, "sshKnownHosts" ,container.Add ); + AddIf( null != (((object)this._httpsUser)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonString(this._httpsUser.ToString()) : null, "httpsUser" ,container.Add ); + AddIf( null != (((object)this._httpsCaCert)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonString(this._httpsCaCert.ToString()) : null, "httpsCACert" ,container.Add ); + AddIf( null != (((object)this._localAuthRef)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonString(this._localAuthRef.ToString()) : null, "localAuthRef" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20220301/GitRepositoryPatchDefinition.PowerShell.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/GitRepositoryPatchDefinition.PowerShell.cs new file mode 100644 index 000000000000..53f444caab8b --- /dev/null +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/GitRepositoryPatchDefinition.PowerShell.cs @@ -0,0 +1,254 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; + + /// Parameters to reconcile to the GitRepository source kind type. + [System.ComponentModel.TypeConverter(typeof(GitRepositoryPatchDefinitionTypeConverter))] + public partial class GitRepositoryPatchDefinition + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryPatchDefinition DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new GitRepositoryPatchDefinition(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.KubernetesConfiguration.Models.Api20220301.IGitRepositoryPatchDefinition DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new GitRepositoryPatchDefinition(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.KubernetesConfiguration.Models.Api20220301.IGitRepositoryPatchDefinition FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal GitRepositoryPatchDefinition(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("RepositoryRef")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryPatchDefinitionInternal)this).RepositoryRef = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IRepositoryRefDefinition) content.GetValueForProperty("RepositoryRef",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryPatchDefinitionInternal)this).RepositoryRef, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.RepositoryRefDefinitionTypeConverter.ConvertFrom); + } + if (content.Contains("Url")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryPatchDefinitionInternal)this).Url = (string) content.GetValueForProperty("Url",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryPatchDefinitionInternal)this).Url, global::System.Convert.ToString); + } + if (content.Contains("TimeoutInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryPatchDefinitionInternal)this).TimeoutInSecond = (long?) content.GetValueForProperty("TimeoutInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryPatchDefinitionInternal)this).TimeoutInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("SyncIntervalInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryPatchDefinitionInternal)this).SyncIntervalInSecond = (long?) content.GetValueForProperty("SyncIntervalInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryPatchDefinitionInternal)this).SyncIntervalInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("SshKnownHost")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryPatchDefinitionInternal)this).SshKnownHost = (string) content.GetValueForProperty("SshKnownHost",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryPatchDefinitionInternal)this).SshKnownHost, global::System.Convert.ToString); + } + if (content.Contains("HttpsUser")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryPatchDefinitionInternal)this).HttpsUser = (string) content.GetValueForProperty("HttpsUser",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryPatchDefinitionInternal)this).HttpsUser, global::System.Convert.ToString); + } + if (content.Contains("HttpsCaCert")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryPatchDefinitionInternal)this).HttpsCaCert = (string) content.GetValueForProperty("HttpsCaCert",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryPatchDefinitionInternal)this).HttpsCaCert, global::System.Convert.ToString); + } + if (content.Contains("LocalAuthRef")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryPatchDefinitionInternal)this).LocalAuthRef = (string) content.GetValueForProperty("LocalAuthRef",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryPatchDefinitionInternal)this).LocalAuthRef, global::System.Convert.ToString); + } + if (content.Contains("RepositoryRefBranch")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryPatchDefinitionInternal)this).RepositoryRefBranch = (string) content.GetValueForProperty("RepositoryRefBranch",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryPatchDefinitionInternal)this).RepositoryRefBranch, global::System.Convert.ToString); + } + if (content.Contains("RepositoryRefTag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryPatchDefinitionInternal)this).RepositoryRefTag = (string) content.GetValueForProperty("RepositoryRefTag",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryPatchDefinitionInternal)this).RepositoryRefTag, global::System.Convert.ToString); + } + if (content.Contains("RepositoryRefSemver")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryPatchDefinitionInternal)this).RepositoryRefSemver = (string) content.GetValueForProperty("RepositoryRefSemver",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryPatchDefinitionInternal)this).RepositoryRefSemver, global::System.Convert.ToString); + } + if (content.Contains("RepositoryRefCommit")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryPatchDefinitionInternal)this).RepositoryRefCommit = (string) content.GetValueForProperty("RepositoryRefCommit",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryPatchDefinitionInternal)this).RepositoryRefCommit, 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 GitRepositoryPatchDefinition(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("RepositoryRef")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryPatchDefinitionInternal)this).RepositoryRef = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IRepositoryRefDefinition) content.GetValueForProperty("RepositoryRef",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryPatchDefinitionInternal)this).RepositoryRef, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.RepositoryRefDefinitionTypeConverter.ConvertFrom); + } + if (content.Contains("Url")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryPatchDefinitionInternal)this).Url = (string) content.GetValueForProperty("Url",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryPatchDefinitionInternal)this).Url, global::System.Convert.ToString); + } + if (content.Contains("TimeoutInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryPatchDefinitionInternal)this).TimeoutInSecond = (long?) content.GetValueForProperty("TimeoutInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryPatchDefinitionInternal)this).TimeoutInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("SyncIntervalInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryPatchDefinitionInternal)this).SyncIntervalInSecond = (long?) content.GetValueForProperty("SyncIntervalInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryPatchDefinitionInternal)this).SyncIntervalInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("SshKnownHost")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryPatchDefinitionInternal)this).SshKnownHost = (string) content.GetValueForProperty("SshKnownHost",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryPatchDefinitionInternal)this).SshKnownHost, global::System.Convert.ToString); + } + if (content.Contains("HttpsUser")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryPatchDefinitionInternal)this).HttpsUser = (string) content.GetValueForProperty("HttpsUser",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryPatchDefinitionInternal)this).HttpsUser, global::System.Convert.ToString); + } + if (content.Contains("HttpsCaCert")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryPatchDefinitionInternal)this).HttpsCaCert = (string) content.GetValueForProperty("HttpsCaCert",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryPatchDefinitionInternal)this).HttpsCaCert, global::System.Convert.ToString); + } + if (content.Contains("LocalAuthRef")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryPatchDefinitionInternal)this).LocalAuthRef = (string) content.GetValueForProperty("LocalAuthRef",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryPatchDefinitionInternal)this).LocalAuthRef, global::System.Convert.ToString); + } + if (content.Contains("RepositoryRefBranch")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryPatchDefinitionInternal)this).RepositoryRefBranch = (string) content.GetValueForProperty("RepositoryRefBranch",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryPatchDefinitionInternal)this).RepositoryRefBranch, global::System.Convert.ToString); + } + if (content.Contains("RepositoryRefTag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryPatchDefinitionInternal)this).RepositoryRefTag = (string) content.GetValueForProperty("RepositoryRefTag",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryPatchDefinitionInternal)this).RepositoryRefTag, global::System.Convert.ToString); + } + if (content.Contains("RepositoryRefSemver")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryPatchDefinitionInternal)this).RepositoryRefSemver = (string) content.GetValueForProperty("RepositoryRefSemver",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryPatchDefinitionInternal)this).RepositoryRefSemver, global::System.Convert.ToString); + } + if (content.Contains("RepositoryRefCommit")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryPatchDefinitionInternal)this).RepositoryRefCommit = (string) content.GetValueForProperty("RepositoryRefCommit",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryPatchDefinitionInternal)this).RepositoryRefCommit, 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.KubernetesConfiguration.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Parameters to reconcile to the GitRepository source kind type. + [System.ComponentModel.TypeConverter(typeof(GitRepositoryPatchDefinitionTypeConverter))] + public partial interface IGitRepositoryPatchDefinition + + { + + } +} \ No newline at end of file diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20210901/ResourceProviderOperationAutoGenerated.TypeConverter.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/GitRepositoryPatchDefinition.TypeConverter.cs similarity index 68% rename from src/KubernetesConfiguration/generated/api/Models/Api20210901/ResourceProviderOperationAutoGenerated.TypeConverter.cs rename to src/KubernetesConfiguration/generated/api/Models/Api20220301/GitRepositoryPatchDefinition.TypeConverter.cs index 426fb9302a93..2c90f0693001 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Api20210901/ResourceProviderOperationAutoGenerated.TypeConverter.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/GitRepositoryPatchDefinition.TypeConverter.cs @@ -3,38 +3,36 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; /// - /// A PowerShell PSTypeConverter to support converting to an instance of + /// A PowerShell PSTypeConverter to support converting to an instance of /// - public partial class ResourceProviderOperationAutoGeneratedTypeConverter : global::System.Management.Automation.PSTypeConverter + public partial class GitRepositoryPatchDefinitionTypeConverter : global::System.Management.Automation.PSTypeConverter { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// 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. + /// 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. + /// Determines if the converter can convert the parameter to the + /// type. /// - /// the instance to check if it can be converted to the the instance to check if it can be converted to the type. /// - /// true if the instance could be converted to a type, otherwise - /// false + /// true if the instance could be converted to a type, otherwise false /// public static bool CanConvertFrom(dynamic sourceValue) { @@ -77,52 +75,51 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// 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 + /// 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 + /// 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. + /// 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 + /// Converts the parameter into an instance of /// - /// the value to convert into an instance of . + /// the value to convert into an instance of . /// - /// an instance of , or null if there is no suitable conversion. + /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IResourceProviderOperationAutoGenerated ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryPatchDefinition ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IResourceProviderOperationAutoGenerated).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryPatchDefinition).IsAssignableFrom(type)) { return sourceValue; } try { - return ResourceProviderOperationAutoGenerated.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + return GitRepositoryPatchDefinition.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; } catch { @@ -130,11 +127,11 @@ public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models. } if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) { - return ResourceProviderOperationAutoGenerated.DeserializeFromPSObject(sourceValue); + return GitRepositoryPatchDefinition.DeserializeFromPSObject(sourceValue); } if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) { - return ResourceProviderOperationAutoGenerated.DeserializeFromDictionary(sourceValue); + return GitRepositoryPatchDefinition.DeserializeFromDictionary(sourceValue); } return null; } diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20220301/GitRepositoryPatchDefinition.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/GitRepositoryPatchDefinition.cs new file mode 100644 index 000000000000..641f9a1bd73f --- /dev/null +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/GitRepositoryPatchDefinition.cs @@ -0,0 +1,266 @@ +// 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.KubernetesConfiguration.Models.Api20220301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; + + /// Parameters to reconcile to the GitRepository source kind type. + public partial class GitRepositoryPatchDefinition : + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryPatchDefinition, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryPatchDefinitionInternal + { + + /// Backing field for property. + private string _httpsCaCert; + + /// + /// Base64-encoded HTTPS certificate authority contents used to access git private git repositories over HTTPS + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] + public string HttpsCaCert { get => this._httpsCaCert; set => this._httpsCaCert = value; } + + /// Backing field for property. + private string _httpsUser; + + /// Plaintext HTTPS username used to access private git repositories over HTTPS + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] + public string HttpsUser { get => this._httpsUser; set => this._httpsUser = value; } + + /// Backing field for property. + private string _localAuthRef; + + /// + /// Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided + /// configuration secrets. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] + public string LocalAuthRef { get => this._localAuthRef; set => this._localAuthRef = value; } + + /// Internal Acessors for RepositoryRef + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IRepositoryRefDefinition Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryPatchDefinitionInternal.RepositoryRef { get => (this._repositoryRef = this._repositoryRef ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.RepositoryRefDefinition()); set { {_repositoryRef = value;} } } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IRepositoryRefDefinition _repositoryRef; + + /// The source reference for the GitRepository object. + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IRepositoryRefDefinition RepositoryRef { get => (this._repositoryRef = this._repositoryRef ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.RepositoryRefDefinition()); set => this._repositoryRef = value; } + + /// The git repository branch name to checkout. + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] + public string RepositoryRefBranch { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IRepositoryRefDefinitionInternal)RepositoryRef).Branch; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IRepositoryRefDefinitionInternal)RepositoryRef).Branch = value ?? null; } + + /// + /// The commit SHA to checkout. This value must be combined with the branch name to be valid. This takes precedence over semver. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] + public string RepositoryRefCommit { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IRepositoryRefDefinitionInternal)RepositoryRef).Commit; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IRepositoryRefDefinitionInternal)RepositoryRef).Commit = value ?? null; } + + /// + /// The semver range used to match against git repository tags. This takes precedence over tag. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] + public string RepositoryRefSemver { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IRepositoryRefDefinitionInternal)RepositoryRef).Semver; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IRepositoryRefDefinitionInternal)RepositoryRef).Semver = value ?? null; } + + /// The git repository tag name to checkout. This takes precedence over branch. + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] + public string RepositoryRefTag { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IRepositoryRefDefinitionInternal)RepositoryRef).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IRepositoryRefDefinitionInternal)RepositoryRef).Tag = value ?? null; } + + /// Backing field for property. + private string _sshKnownHost; + + /// + /// Base64-encoded known_hosts value containing public SSH keys required to access private git repositories over SSH + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] + public string SshKnownHost { get => this._sshKnownHost; set => this._sshKnownHost = value; } + + /// Backing field for property. + private long? _syncIntervalInSecond; + + /// + /// The interval at which to re-reconcile the cluster git repository source with the remote. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] + public long? SyncIntervalInSecond { get => this._syncIntervalInSecond; set => this._syncIntervalInSecond = value; } + + /// Backing field for property. + private long? _timeoutInSecond; + + /// + /// The maximum time to attempt to reconcile the cluster git repository source with the remote. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] + public long? TimeoutInSecond { get => this._timeoutInSecond; set => this._timeoutInSecond = value; } + + /// Backing field for property. + private string _url; + + /// The URL to sync for the flux configuration git repository. + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] + public string Url { get => this._url; set => this._url = value; } + + /// Creates an new instance. + public GitRepositoryPatchDefinition() + { + + } + } + /// Parameters to reconcile to the GitRepository source kind type. + public partial interface IGitRepositoryPatchDefinition : + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IJsonSerializable + { + /// + /// Base64-encoded HTTPS certificate authority contents used to access git private git repositories over HTTPS + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Base64-encoded HTTPS certificate authority contents used to access git private git repositories over HTTPS", + SerializedName = @"httpsCACert", + PossibleTypes = new [] { typeof(string) })] + string HttpsCaCert { get; set; } + /// Plaintext HTTPS username used to access private git repositories over HTTPS + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Plaintext HTTPS username used to access private git repositories over HTTPS", + SerializedName = @"httpsUser", + PossibleTypes = new [] { typeof(string) })] + string HttpsUser { get; set; } + /// + /// Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided + /// configuration secrets. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided configuration secrets.", + SerializedName = @"localAuthRef", + PossibleTypes = new [] { typeof(string) })] + string LocalAuthRef { get; set; } + /// The git repository branch name to checkout. + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The git repository branch name to checkout.", + SerializedName = @"branch", + PossibleTypes = new [] { typeof(string) })] + string RepositoryRefBranch { get; set; } + /// + /// The commit SHA to checkout. This value must be combined with the branch name to be valid. This takes precedence over semver. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The commit SHA to checkout. This value must be combined with the branch name to be valid. This takes precedence over semver.", + SerializedName = @"commit", + PossibleTypes = new [] { typeof(string) })] + string RepositoryRefCommit { get; set; } + /// + /// The semver range used to match against git repository tags. This takes precedence over tag. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The semver range used to match against git repository tags. This takes precedence over tag.", + SerializedName = @"semver", + PossibleTypes = new [] { typeof(string) })] + string RepositoryRefSemver { get; set; } + /// The git repository tag name to checkout. This takes precedence over branch. + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The git repository tag name to checkout. This takes precedence over branch.", + SerializedName = @"tag", + PossibleTypes = new [] { typeof(string) })] + string RepositoryRefTag { get; set; } + /// + /// Base64-encoded known_hosts value containing public SSH keys required to access private git repositories over SSH + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Base64-encoded known_hosts value containing public SSH keys required to access private git repositories over SSH", + SerializedName = @"sshKnownHosts", + PossibleTypes = new [] { typeof(string) })] + string SshKnownHost { get; set; } + /// + /// The interval at which to re-reconcile the cluster git repository source with the remote. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The interval at which to re-reconcile the cluster git repository source with the remote.", + SerializedName = @"syncIntervalInSeconds", + PossibleTypes = new [] { typeof(long) })] + long? SyncIntervalInSecond { get; set; } + /// + /// The maximum time to attempt to reconcile the cluster git repository source with the remote. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The maximum time to attempt to reconcile the cluster git repository source with the remote.", + SerializedName = @"timeoutInSeconds", + PossibleTypes = new [] { typeof(long) })] + long? TimeoutInSecond { get; set; } + /// The URL to sync for the flux configuration git repository. + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The URL to sync for the flux configuration git repository.", + SerializedName = @"url", + PossibleTypes = new [] { typeof(string) })] + string Url { get; set; } + + } + /// Parameters to reconcile to the GitRepository source kind type. + internal partial interface IGitRepositoryPatchDefinitionInternal + + { + /// + /// Base64-encoded HTTPS certificate authority contents used to access git private git repositories over HTTPS + /// + string HttpsCaCert { get; set; } + /// Plaintext HTTPS username used to access private git repositories over HTTPS + string HttpsUser { get; set; } + /// + /// Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided + /// configuration secrets. + /// + string LocalAuthRef { get; set; } + /// The source reference for the GitRepository object. + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IRepositoryRefDefinition RepositoryRef { get; set; } + /// The git repository branch name to checkout. + string RepositoryRefBranch { get; set; } + /// + /// The commit SHA to checkout. This value must be combined with the branch name to be valid. This takes precedence over semver. + /// + string RepositoryRefCommit { get; set; } + /// + /// The semver range used to match against git repository tags. This takes precedence over tag. + /// + string RepositoryRefSemver { get; set; } + /// The git repository tag name to checkout. This takes precedence over branch. + string RepositoryRefTag { get; set; } + /// + /// Base64-encoded known_hosts value containing public SSH keys required to access private git repositories over SSH + /// + string SshKnownHost { get; set; } + /// + /// The interval at which to re-reconcile the cluster git repository source with the remote. + /// + long? SyncIntervalInSecond { get; set; } + /// + /// The maximum time to attempt to reconcile the cluster git repository source with the remote. + /// + long? TimeoutInSecond { get; set; } + /// The URL to sync for the flux configuration git repository. + string Url { get; set; } + + } +} \ No newline at end of file diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20220301/GitRepositoryPatchDefinition.json.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/GitRepositoryPatchDefinition.json.cs new file mode 100644 index 000000000000..54e67363785b --- /dev/null +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/GitRepositoryPatchDefinition.json.cs @@ -0,0 +1,122 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; + + /// Parameters to reconcile to the GitRepository source kind type. + public partial class GitRepositoryPatchDefinition + { + + /// + /// 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.KubernetesConfiguration.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryPatchDefinition. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryPatchDefinition. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IGitRepositoryPatchDefinition FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json ? new GitRepositoryPatchDefinition(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject instance to deserialize from. + internal GitRepositoryPatchDefinition(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_repositoryRef = If( json?.PropertyT("repositoryRef"), out var __jsonRepositoryRef) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.RepositoryRefDefinition.FromJson(__jsonRepositoryRef) : RepositoryRef;} + {_url = If( json?.PropertyT("url"), out var __jsonUrl) ? (string)__jsonUrl : (string)Url;} + {_timeoutInSecond = If( json?.PropertyT("timeoutInSeconds"), out var __jsonTimeoutInSeconds) ? (long?)__jsonTimeoutInSeconds : TimeoutInSecond;} + {_syncIntervalInSecond = If( json?.PropertyT("syncIntervalInSeconds"), out var __jsonSyncIntervalInSeconds) ? (long?)__jsonSyncIntervalInSeconds : SyncIntervalInSecond;} + {_sshKnownHost = If( json?.PropertyT("sshKnownHosts"), out var __jsonSshKnownHosts) ? (string)__jsonSshKnownHosts : (string)SshKnownHost;} + {_httpsUser = If( json?.PropertyT("httpsUser"), out var __jsonHttpsUser) ? (string)__jsonHttpsUser : (string)HttpsUser;} + {_httpsCaCert = If( json?.PropertyT("httpsCACert"), out var __jsonHttpsCaCert) ? (string)__jsonHttpsCaCert : (string)HttpsCaCert;} + {_localAuthRef = If( json?.PropertyT("localAuthRef"), out var __jsonLocalAuthRef) ? (string)__jsonLocalAuthRef : (string)LocalAuthRef;} + 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.KubernetesConfiguration.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._repositoryRef ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) this._repositoryRef.ToJson(null,serializationMode) : null, "repositoryRef" ,container.Add ); + AddIf( null != (((object)this._url)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonString(this._url.ToString()) : null, "url" ,container.Add ); + AddIf( null != this._timeoutInSecond ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNumber((long)this._timeoutInSecond) : null, "timeoutInSeconds" ,container.Add ); + AddIf( null != this._syncIntervalInSecond ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNumber((long)this._syncIntervalInSecond) : null, "syncIntervalInSeconds" ,container.Add ); + AddIf( null != (((object)this._sshKnownHost)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonString(this._sshKnownHost.ToString()) : null, "sshKnownHosts" ,container.Add ); + AddIf( null != (((object)this._httpsUser)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonString(this._httpsUser.ToString()) : null, "httpsUser" ,container.Add ); + AddIf( null != (((object)this._httpsCaCert)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonString(this._httpsCaCert.ToString()) : null, "httpsCACert" ,container.Add ); + AddIf( null != (((object)this._localAuthRef)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonString(this._localAuthRef.ToString()) : null, "localAuthRef" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20210301/HelmOperatorProperties.PowerShell.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/HelmOperatorProperties.PowerShell.cs similarity index 75% rename from src/KubernetesConfiguration/generated/api/Models/Api20210301/HelmOperatorProperties.PowerShell.cs rename to src/KubernetesConfiguration/generated/api/Models/Api20220301/HelmOperatorProperties.PowerShell.cs index 5798f8706758..07f250b2e8bc 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Api20210301/HelmOperatorProperties.PowerShell.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/HelmOperatorProperties.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; @@ -31,7 +31,8 @@ public partial class HelmOperatorProperties /// /// 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. + /// 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. @@ -43,7 +44,8 @@ public partial class HelmOperatorProperties /// /// 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. + /// 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. @@ -61,29 +63,29 @@ public partial class HelmOperatorProperties partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IHelmOperatorProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IHelmOperatorProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new HelmOperatorProperties(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IHelmOperatorProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IHelmOperatorProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new HelmOperatorProperties(content); } @@ -92,11 +94,11 @@ public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models. /// 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.KubernetesConfiguration.Models.Api20210301.IHelmOperatorProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IHelmOperatorProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -109,13 +111,19 @@ internal HelmOperatorProperties(global::System.Collections.IDictionary content) return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IHelmOperatorPropertiesInternal)this).ChartVersion = (string) content.GetValueForProperty("ChartVersion",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IHelmOperatorPropertiesInternal)this).ChartVersion, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IHelmOperatorPropertiesInternal)this).ChartValue = (string) content.GetValueForProperty("ChartValue",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IHelmOperatorPropertiesInternal)this).ChartValue, global::System.Convert.ToString); + if (content.Contains("ChartVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IHelmOperatorPropertiesInternal)this).ChartVersion = (string) content.GetValueForProperty("ChartVersion",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IHelmOperatorPropertiesInternal)this).ChartVersion, global::System.Convert.ToString); + } + if (content.Contains("ChartValue")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IHelmOperatorPropertiesInternal)this).ChartValue = (string) content.GetValueForProperty("ChartValue",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IHelmOperatorPropertiesInternal)this).ChartValue, global::System.Convert.ToString); + } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -128,8 +136,14 @@ internal HelmOperatorProperties(global::System.Management.Automation.PSObject co return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IHelmOperatorPropertiesInternal)this).ChartVersion = (string) content.GetValueForProperty("ChartVersion",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IHelmOperatorPropertiesInternal)this).ChartVersion, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IHelmOperatorPropertiesInternal)this).ChartValue = (string) content.GetValueForProperty("ChartValue",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IHelmOperatorPropertiesInternal)this).ChartValue, global::System.Convert.ToString); + if (content.Contains("ChartVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IHelmOperatorPropertiesInternal)this).ChartVersion = (string) content.GetValueForProperty("ChartVersion",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IHelmOperatorPropertiesInternal)this).ChartVersion, global::System.Convert.ToString); + } + if (content.Contains("ChartValue")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IHelmOperatorPropertiesInternal)this).ChartValue = (string) content.GetValueForProperty("ChartValue",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IHelmOperatorPropertiesInternal)this).ChartValue, global::System.Convert.ToString); + } AfterDeserializePSObject(content); } diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20210301/HelmOperatorProperties.TypeConverter.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/HelmOperatorProperties.TypeConverter.cs similarity index 82% rename from src/KubernetesConfiguration/generated/api/Models/Api20210301/HelmOperatorProperties.TypeConverter.cs rename to src/KubernetesConfiguration/generated/api/Models/Api20220301/HelmOperatorProperties.TypeConverter.cs index b18cd5cc3e22..35613592b15e 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Api20210301/HelmOperatorProperties.TypeConverter.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/HelmOperatorProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; @@ -14,20 +14,20 @@ public partial class HelmOperatorPropertiesTypeConverter : global::System.Manage { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// 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. + /// 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. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +75,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// 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 + /// 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 + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,21 +100,20 @@ public static bool CanConvertFrom(dynamic sourceValue) 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 + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IHelmOperatorProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IHelmOperatorProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IHelmOperatorProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IHelmOperatorProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20210301/HelmOperatorProperties.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/HelmOperatorProperties.cs similarity index 96% rename from src/KubernetesConfiguration/generated/api/Models/Api20210301/HelmOperatorProperties.cs rename to src/KubernetesConfiguration/generated/api/Models/Api20220301/HelmOperatorProperties.cs index 7ca8936f0f10..cc00f54c3464 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Api20210301/HelmOperatorProperties.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/HelmOperatorProperties.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; /// Properties for Helm operator. public partial class HelmOperatorProperties : - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IHelmOperatorProperties, - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IHelmOperatorPropertiesInternal + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IHelmOperatorProperties, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IHelmOperatorPropertiesInternal { /// Backing field for property. diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20210301/HelmOperatorProperties.json.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/HelmOperatorProperties.json.cs similarity index 92% rename from src/KubernetesConfiguration/generated/api/Models/Api20210301/HelmOperatorProperties.json.cs rename to src/KubernetesConfiguration/generated/api/Models/Api20220301/HelmOperatorProperties.json.cs index 3006cea2e314..a2ec3803f3f7 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Api20210301/HelmOperatorProperties.json.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/HelmOperatorProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; @@ -20,7 +20,7 @@ public partial class HelmOperatorProperties partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class HelmOperatorProperties /// /// 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. + /// 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. @@ -42,7 +43,8 @@ public partial class HelmOperatorProperties /// /// 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. + /// 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. @@ -52,13 +54,13 @@ public partial class HelmOperatorProperties partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IHelmOperatorProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IHelmOperatorProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IHelmOperatorProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IHelmOperatorProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IHelmOperatorProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IHelmOperatorProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json ? new HelmOperatorProperties(json) : null; } diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20220301/HelmReleasePropertiesDefinition.PowerShell.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/HelmReleasePropertiesDefinition.PowerShell.cs new file mode 100644 index 000000000000..c0cce340a56c --- /dev/null +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/HelmReleasePropertiesDefinition.PowerShell.cs @@ -0,0 +1,214 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; + + /// Properties for HelmRelease objects + [System.ComponentModel.TypeConverter(typeof(HelmReleasePropertiesDefinitionTypeConverter))] + public partial class HelmReleasePropertiesDefinition + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IHelmReleasePropertiesDefinition DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new HelmReleasePropertiesDefinition(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.KubernetesConfiguration.Models.Api20220301.IHelmReleasePropertiesDefinition DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new HelmReleasePropertiesDefinition(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.KubernetesConfiguration.Models.Api20220301.IHelmReleasePropertiesDefinition FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal HelmReleasePropertiesDefinition(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("HelmChartRef")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IHelmReleasePropertiesDefinitionInternal)this).HelmChartRef = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectReferenceDefinition) content.GetValueForProperty("HelmChartRef",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IHelmReleasePropertiesDefinitionInternal)this).HelmChartRef, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ObjectReferenceDefinitionTypeConverter.ConvertFrom); + } + if (content.Contains("LastRevisionApplied")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IHelmReleasePropertiesDefinitionInternal)this).LastRevisionApplied = (long?) content.GetValueForProperty("LastRevisionApplied",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IHelmReleasePropertiesDefinitionInternal)this).LastRevisionApplied, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("FailureCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IHelmReleasePropertiesDefinitionInternal)this).FailureCount = (long?) content.GetValueForProperty("FailureCount",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IHelmReleasePropertiesDefinitionInternal)this).FailureCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("InstallFailureCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IHelmReleasePropertiesDefinitionInternal)this).InstallFailureCount = (long?) content.GetValueForProperty("InstallFailureCount",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IHelmReleasePropertiesDefinitionInternal)this).InstallFailureCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("UpgradeFailureCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IHelmReleasePropertiesDefinitionInternal)this).UpgradeFailureCount = (long?) content.GetValueForProperty("UpgradeFailureCount",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IHelmReleasePropertiesDefinitionInternal)this).UpgradeFailureCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("HelmChartRefName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IHelmReleasePropertiesDefinitionInternal)this).HelmChartRefName = (string) content.GetValueForProperty("HelmChartRefName",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IHelmReleasePropertiesDefinitionInternal)this).HelmChartRefName, global::System.Convert.ToString); + } + if (content.Contains("HelmChartRefNamespace")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IHelmReleasePropertiesDefinitionInternal)this).HelmChartRefNamespace = (string) content.GetValueForProperty("HelmChartRefNamespace",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IHelmReleasePropertiesDefinitionInternal)this).HelmChartRefNamespace, 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 HelmReleasePropertiesDefinition(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("HelmChartRef")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IHelmReleasePropertiesDefinitionInternal)this).HelmChartRef = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectReferenceDefinition) content.GetValueForProperty("HelmChartRef",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IHelmReleasePropertiesDefinitionInternal)this).HelmChartRef, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ObjectReferenceDefinitionTypeConverter.ConvertFrom); + } + if (content.Contains("LastRevisionApplied")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IHelmReleasePropertiesDefinitionInternal)this).LastRevisionApplied = (long?) content.GetValueForProperty("LastRevisionApplied",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IHelmReleasePropertiesDefinitionInternal)this).LastRevisionApplied, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("FailureCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IHelmReleasePropertiesDefinitionInternal)this).FailureCount = (long?) content.GetValueForProperty("FailureCount",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IHelmReleasePropertiesDefinitionInternal)this).FailureCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("InstallFailureCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IHelmReleasePropertiesDefinitionInternal)this).InstallFailureCount = (long?) content.GetValueForProperty("InstallFailureCount",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IHelmReleasePropertiesDefinitionInternal)this).InstallFailureCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("UpgradeFailureCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IHelmReleasePropertiesDefinitionInternal)this).UpgradeFailureCount = (long?) content.GetValueForProperty("UpgradeFailureCount",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IHelmReleasePropertiesDefinitionInternal)this).UpgradeFailureCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("HelmChartRefName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IHelmReleasePropertiesDefinitionInternal)this).HelmChartRefName = (string) content.GetValueForProperty("HelmChartRefName",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IHelmReleasePropertiesDefinitionInternal)this).HelmChartRefName, global::System.Convert.ToString); + } + if (content.Contains("HelmChartRefNamespace")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IHelmReleasePropertiesDefinitionInternal)this).HelmChartRefNamespace = (string) content.GetValueForProperty("HelmChartRefNamespace",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IHelmReleasePropertiesDefinitionInternal)this).HelmChartRefNamespace, 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.KubernetesConfiguration.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Properties for HelmRelease objects + [System.ComponentModel.TypeConverter(typeof(HelmReleasePropertiesDefinitionTypeConverter))] + public partial interface IHelmReleasePropertiesDefinition + + { + + } +} \ No newline at end of file diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20220301/HelmReleasePropertiesDefinition.TypeConverter.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/HelmReleasePropertiesDefinition.TypeConverter.cs new file mode 100644 index 000000000000..1796a2600821 --- /dev/null +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/HelmReleasePropertiesDefinition.TypeConverter.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class HelmReleasePropertiesDefinitionTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IHelmReleasePropertiesDefinition ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IHelmReleasePropertiesDefinition).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return HelmReleasePropertiesDefinition.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return HelmReleasePropertiesDefinition.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return HelmReleasePropertiesDefinition.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/KubernetesConfiguration/generated/api/Models/Api20220301/HelmReleasePropertiesDefinition.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/HelmReleasePropertiesDefinition.cs new file mode 100644 index 000000000000..07d4d0971b09 --- /dev/null +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/HelmReleasePropertiesDefinition.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.KubernetesConfiguration.Models.Api20220301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; + + /// Properties for HelmRelease objects + public partial class HelmReleasePropertiesDefinition : + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IHelmReleasePropertiesDefinition, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IHelmReleasePropertiesDefinitionInternal + { + + /// Backing field for property. + private long? _failureCount; + + /// Total number of times that the HelmRelease failed to install or upgrade + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] + public long? FailureCount { get => this._failureCount; set => this._failureCount = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectReferenceDefinition _helmChartRef; + + /// The reference to the HelmChart object used as the source to this HelmRelease + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectReferenceDefinition HelmChartRef { get => (this._helmChartRef = this._helmChartRef ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ObjectReferenceDefinition()); set => this._helmChartRef = value; } + + /// Name of the object + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] + public string HelmChartRefName { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectReferenceDefinitionInternal)HelmChartRef).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectReferenceDefinitionInternal)HelmChartRef).Name = value ?? null; } + + /// Namespace of the object + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] + public string HelmChartRefNamespace { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectReferenceDefinitionInternal)HelmChartRef).Namespace; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectReferenceDefinitionInternal)HelmChartRef).Namespace = value ?? null; } + + /// Backing field for property. + private long? _installFailureCount; + + /// Number of times that the HelmRelease failed to install + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] + public long? InstallFailureCount { get => this._installFailureCount; set => this._installFailureCount = value; } + + /// Backing field for property. + private long? _lastRevisionApplied; + + /// The revision number of the last released object change + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] + public long? LastRevisionApplied { get => this._lastRevisionApplied; set => this._lastRevisionApplied = value; } + + /// Internal Acessors for HelmChartRef + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectReferenceDefinition Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IHelmReleasePropertiesDefinitionInternal.HelmChartRef { get => (this._helmChartRef = this._helmChartRef ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ObjectReferenceDefinition()); set { {_helmChartRef = value;} } } + + /// Backing field for property. + private long? _upgradeFailureCount; + + /// Number of times that the HelmRelease failed to upgrade + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] + public long? UpgradeFailureCount { get => this._upgradeFailureCount; set => this._upgradeFailureCount = value; } + + /// Creates an new instance. + public HelmReleasePropertiesDefinition() + { + + } + } + /// Properties for HelmRelease objects + public partial interface IHelmReleasePropertiesDefinition : + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IJsonSerializable + { + /// Total number of times that the HelmRelease failed to install or upgrade + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Total number of times that the HelmRelease failed to install or upgrade", + SerializedName = @"failureCount", + PossibleTypes = new [] { typeof(long) })] + long? FailureCount { get; set; } + /// Name of the object + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Name of the object", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + string HelmChartRefName { get; set; } + /// Namespace of the object + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Namespace of the object", + SerializedName = @"namespace", + PossibleTypes = new [] { typeof(string) })] + string HelmChartRefNamespace { get; set; } + /// Number of times that the HelmRelease failed to install + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Number of times that the HelmRelease failed to install", + SerializedName = @"installFailureCount", + PossibleTypes = new [] { typeof(long) })] + long? InstallFailureCount { get; set; } + /// The revision number of the last released object change + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The revision number of the last released object change", + SerializedName = @"lastRevisionApplied", + PossibleTypes = new [] { typeof(long) })] + long? LastRevisionApplied { get; set; } + /// Number of times that the HelmRelease failed to upgrade + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Number of times that the HelmRelease failed to upgrade", + SerializedName = @"upgradeFailureCount", + PossibleTypes = new [] { typeof(long) })] + long? UpgradeFailureCount { get; set; } + + } + /// Properties for HelmRelease objects + internal partial interface IHelmReleasePropertiesDefinitionInternal + + { + /// Total number of times that the HelmRelease failed to install or upgrade + long? FailureCount { get; set; } + /// The reference to the HelmChart object used as the source to this HelmRelease + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectReferenceDefinition HelmChartRef { get; set; } + /// Name of the object + string HelmChartRefName { get; set; } + /// Namespace of the object + string HelmChartRefNamespace { get; set; } + /// Number of times that the HelmRelease failed to install + long? InstallFailureCount { get; set; } + /// The revision number of the last released object change + long? LastRevisionApplied { get; set; } + /// Number of times that the HelmRelease failed to upgrade + long? UpgradeFailureCount { get; set; } + + } +} \ No newline at end of file diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20220301/HelmReleasePropertiesDefinition.json.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/HelmReleasePropertiesDefinition.json.cs new file mode 100644 index 000000000000..bb6998a77c21 --- /dev/null +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/HelmReleasePropertiesDefinition.json.cs @@ -0,0 +1,116 @@ +// 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.KubernetesConfiguration.Models.Api20220301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; + + /// Properties for HelmRelease objects + public partial class HelmReleasePropertiesDefinition + { + + /// + /// 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.KubernetesConfiguration.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IHelmReleasePropertiesDefinition. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IHelmReleasePropertiesDefinition. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IHelmReleasePropertiesDefinition FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json ? new HelmReleasePropertiesDefinition(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject instance to deserialize from. + internal HelmReleasePropertiesDefinition(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_helmChartRef = If( json?.PropertyT("helmChartRef"), out var __jsonHelmChartRef) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ObjectReferenceDefinition.FromJson(__jsonHelmChartRef) : HelmChartRef;} + {_lastRevisionApplied = If( json?.PropertyT("lastRevisionApplied"), out var __jsonLastRevisionApplied) ? (long?)__jsonLastRevisionApplied : LastRevisionApplied;} + {_failureCount = If( json?.PropertyT("failureCount"), out var __jsonFailureCount) ? (long?)__jsonFailureCount : FailureCount;} + {_installFailureCount = If( json?.PropertyT("installFailureCount"), out var __jsonInstallFailureCount) ? (long?)__jsonInstallFailureCount : InstallFailureCount;} + {_upgradeFailureCount = If( json?.PropertyT("upgradeFailureCount"), out var __jsonUpgradeFailureCount) ? (long?)__jsonUpgradeFailureCount : UpgradeFailureCount;} + 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.KubernetesConfiguration.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._helmChartRef ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) this._helmChartRef.ToJson(null,serializationMode) : null, "helmChartRef" ,container.Add ); + AddIf( null != this._lastRevisionApplied ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNumber((long)this._lastRevisionApplied) : null, "lastRevisionApplied" ,container.Add ); + AddIf( null != this._failureCount ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNumber((long)this._failureCount) : null, "failureCount" ,container.Add ); + AddIf( null != this._installFailureCount ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNumber((long)this._installFailureCount) : null, "installFailureCount" ,container.Add ); + AddIf( null != this._upgradeFailureCount ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNumber((long)this._upgradeFailureCount) : null, "upgradeFailureCount" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20220301/KustomizationDefinition.PowerShell.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/KustomizationDefinition.PowerShell.cs new file mode 100644 index 000000000000..ba7b616d1367 --- /dev/null +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/KustomizationDefinition.PowerShell.cs @@ -0,0 +1,224 @@ +// 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.KubernetesConfiguration.Models.Api20220301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; + + /// + /// The Kustomization defining how to reconcile the artifact pulled by the source type on the cluster. + /// + [System.ComponentModel.TypeConverter(typeof(KustomizationDefinitionTypeConverter))] + public partial class KustomizationDefinition + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IKustomizationDefinition DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new KustomizationDefinition(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.KubernetesConfiguration.Models.Api20220301.IKustomizationDefinition DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new KustomizationDefinition(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.KubernetesConfiguration.Models.Api20220301.IKustomizationDefinition FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal KustomizationDefinition(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IKustomizationDefinitionInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IKustomizationDefinitionInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Path")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IKustomizationDefinitionInternal)this).Path = (string) content.GetValueForProperty("Path",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IKustomizationDefinitionInternal)this).Path, global::System.Convert.ToString); + } + if (content.Contains("DependsOn")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IKustomizationDefinitionInternal)this).DependsOn = (string[]) content.GetValueForProperty("DependsOn",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IKustomizationDefinitionInternal)this).DependsOn, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("TimeoutInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IKustomizationDefinitionInternal)this).TimeoutInSecond = (long?) content.GetValueForProperty("TimeoutInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IKustomizationDefinitionInternal)this).TimeoutInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("SyncIntervalInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IKustomizationDefinitionInternal)this).SyncIntervalInSecond = (long?) content.GetValueForProperty("SyncIntervalInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IKustomizationDefinitionInternal)this).SyncIntervalInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("RetryIntervalInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IKustomizationDefinitionInternal)this).RetryIntervalInSecond = (long?) content.GetValueForProperty("RetryIntervalInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IKustomizationDefinitionInternal)this).RetryIntervalInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("Prune")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IKustomizationDefinitionInternal)this).Prune = (bool?) content.GetValueForProperty("Prune",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IKustomizationDefinitionInternal)this).Prune, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("Force")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IKustomizationDefinitionInternal)this).Force = (bool?) content.GetValueForProperty("Force",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IKustomizationDefinitionInternal)this).Force, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal KustomizationDefinition(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IKustomizationDefinitionInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IKustomizationDefinitionInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Path")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IKustomizationDefinitionInternal)this).Path = (string) content.GetValueForProperty("Path",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IKustomizationDefinitionInternal)this).Path, global::System.Convert.ToString); + } + if (content.Contains("DependsOn")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IKustomizationDefinitionInternal)this).DependsOn = (string[]) content.GetValueForProperty("DependsOn",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IKustomizationDefinitionInternal)this).DependsOn, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("TimeoutInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IKustomizationDefinitionInternal)this).TimeoutInSecond = (long?) content.GetValueForProperty("TimeoutInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IKustomizationDefinitionInternal)this).TimeoutInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("SyncIntervalInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IKustomizationDefinitionInternal)this).SyncIntervalInSecond = (long?) content.GetValueForProperty("SyncIntervalInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IKustomizationDefinitionInternal)this).SyncIntervalInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("RetryIntervalInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IKustomizationDefinitionInternal)this).RetryIntervalInSecond = (long?) content.GetValueForProperty("RetryIntervalInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IKustomizationDefinitionInternal)this).RetryIntervalInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("Prune")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IKustomizationDefinitionInternal)this).Prune = (bool?) content.GetValueForProperty("Prune",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IKustomizationDefinitionInternal)this).Prune, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("Force")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IKustomizationDefinitionInternal)this).Force = (bool?) content.GetValueForProperty("Force",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IKustomizationDefinitionInternal)this).Force, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + 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.KubernetesConfiguration.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The Kustomization defining how to reconcile the artifact pulled by the source type on the cluster. + [System.ComponentModel.TypeConverter(typeof(KustomizationDefinitionTypeConverter))] + public partial interface IKustomizationDefinition + + { + + } +} \ No newline at end of file diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20220301/KustomizationDefinition.TypeConverter.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/KustomizationDefinition.TypeConverter.cs new file mode 100644 index 000000000000..ab714918908f --- /dev/null +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/KustomizationDefinition.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class KustomizationDefinitionTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IKustomizationDefinition ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IKustomizationDefinition).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return KustomizationDefinition.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return KustomizationDefinition.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return KustomizationDefinition.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/KubernetesConfiguration/generated/api/Models/Api20220301/KustomizationDefinition.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/KustomizationDefinition.cs new file mode 100644 index 000000000000..35db89b7e4bf --- /dev/null +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/KustomizationDefinition.cs @@ -0,0 +1,202 @@ +// 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.KubernetesConfiguration.Models.Api20220301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; + + /// + /// The Kustomization defining how to reconcile the artifact pulled by the source type on the cluster. + /// + public partial class KustomizationDefinition : + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IKustomizationDefinition, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IKustomizationDefinitionInternal + { + + /// Backing field for property. + private string[] _dependsOn; + + /// + /// Specifies other Kustomizations that this Kustomization depends on. This Kustomization will not reconcile until all dependencies + /// have completed their reconciliation. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] + public string[] DependsOn { get => this._dependsOn; set => this._dependsOn = value; } + + /// Backing field for property. + private bool? _force; + + /// + /// Enable/disable re-creating Kubernetes resources on the cluster when patching fails due to an immutable field change. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] + public bool? Force { get => this._force; set => this._force = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IKustomizationDefinitionInternal.Name { get => this._name; set { {_name = value;} } } + + /// Backing field for property. + private string _name; + + /// Name of the Kustomization, matching the key in the Kustomizations object map. + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] + public string Name { get => this._name; } + + /// Backing field for property. + private string _path; + + /// The path in the source reference to reconcile on the cluster. + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] + public string Path { get => this._path; set => this._path = value; } + + /// Backing field for property. + private bool? _prune; + + /// + /// Enable/disable garbage collections of Kubernetes objects created by this Kustomization. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] + public bool? Prune { get => this._prune; set => this._prune = value; } + + /// Backing field for property. + private long? _retryIntervalInSecond; + + /// + /// The interval at which to re-reconcile the Kustomization on the cluster in the event of failure on reconciliation. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] + public long? RetryIntervalInSecond { get => this._retryIntervalInSecond; set => this._retryIntervalInSecond = value; } + + /// Backing field for property. + private long? _syncIntervalInSecond; + + /// The interval at which to re-reconcile the Kustomization on the cluster. + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] + public long? SyncIntervalInSecond { get => this._syncIntervalInSecond; set => this._syncIntervalInSecond = value; } + + /// Backing field for property. + private long? _timeoutInSecond; + + /// The maximum time to attempt to reconcile the Kustomization on the cluster. + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] + public long? TimeoutInSecond { get => this._timeoutInSecond; set => this._timeoutInSecond = value; } + + /// Creates an new instance. + public KustomizationDefinition() + { + + } + } + /// The Kustomization defining how to reconcile the artifact pulled by the source type on the cluster. + public partial interface IKustomizationDefinition : + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IJsonSerializable + { + /// + /// Specifies other Kustomizations that this Kustomization depends on. This Kustomization will not reconcile until all dependencies + /// have completed their reconciliation. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Specifies other Kustomizations that this Kustomization depends on. This Kustomization will not reconcile until all dependencies have completed their reconciliation.", + SerializedName = @"dependsOn", + PossibleTypes = new [] { typeof(string) })] + string[] DependsOn { get; set; } + /// + /// Enable/disable re-creating Kubernetes resources on the cluster when patching fails due to an immutable field change. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Enable/disable re-creating Kubernetes resources on the cluster when patching fails due to an immutable field change.", + SerializedName = @"force", + PossibleTypes = new [] { typeof(bool) })] + bool? Force { get; set; } + /// Name of the Kustomization, matching the key in the Kustomizations object map. + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Name of the Kustomization, matching the key in the Kustomizations object map.", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + string Name { get; } + /// The path in the source reference to reconcile on the cluster. + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The path in the source reference to reconcile on the cluster.", + SerializedName = @"path", + PossibleTypes = new [] { typeof(string) })] + string Path { get; set; } + /// + /// Enable/disable garbage collections of Kubernetes objects created by this Kustomization. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Enable/disable garbage collections of Kubernetes objects created by this Kustomization.", + SerializedName = @"prune", + PossibleTypes = new [] { typeof(bool) })] + bool? Prune { get; set; } + /// + /// The interval at which to re-reconcile the Kustomization on the cluster in the event of failure on reconciliation. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The interval at which to re-reconcile the Kustomization on the cluster in the event of failure on reconciliation.", + SerializedName = @"retryIntervalInSeconds", + PossibleTypes = new [] { typeof(long) })] + long? RetryIntervalInSecond { get; set; } + /// The interval at which to re-reconcile the Kustomization on the cluster. + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The interval at which to re-reconcile the Kustomization on the cluster.", + SerializedName = @"syncIntervalInSeconds", + PossibleTypes = new [] { typeof(long) })] + long? SyncIntervalInSecond { get; set; } + /// The maximum time to attempt to reconcile the Kustomization on the cluster. + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The maximum time to attempt to reconcile the Kustomization on the cluster.", + SerializedName = @"timeoutInSeconds", + PossibleTypes = new [] { typeof(long) })] + long? TimeoutInSecond { get; set; } + + } + /// The Kustomization defining how to reconcile the artifact pulled by the source type on the cluster. + internal partial interface IKustomizationDefinitionInternal + + { + /// + /// Specifies other Kustomizations that this Kustomization depends on. This Kustomization will not reconcile until all dependencies + /// have completed their reconciliation. + /// + string[] DependsOn { get; set; } + /// + /// Enable/disable re-creating Kubernetes resources on the cluster when patching fails due to an immutable field change. + /// + bool? Force { get; set; } + /// Name of the Kustomization, matching the key in the Kustomizations object map. + string Name { get; set; } + /// The path in the source reference to reconcile on the cluster. + string Path { get; set; } + /// + /// Enable/disable garbage collections of Kubernetes objects created by this Kustomization. + /// + bool? Prune { get; set; } + /// + /// The interval at which to re-reconcile the Kustomization on the cluster in the event of failure on reconciliation. + /// + long? RetryIntervalInSecond { get; set; } + /// The interval at which to re-reconcile the Kustomization on the cluster. + long? SyncIntervalInSecond { get; set; } + /// The maximum time to attempt to reconcile the Kustomization on the cluster. + long? TimeoutInSecond { get; set; } + + } +} \ No newline at end of file diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20220301/KustomizationDefinition.json.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/KustomizationDefinition.json.cs new file mode 100644 index 000000000000..f520be842bcc --- /dev/null +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/KustomizationDefinition.json.cs @@ -0,0 +1,135 @@ +// 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.KubernetesConfiguration.Models.Api20220301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; + + /// + /// The Kustomization defining how to reconcile the artifact pulled by the source type on the cluster. + /// + public partial class KustomizationDefinition + { + + /// + /// 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.KubernetesConfiguration.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IKustomizationDefinition. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IKustomizationDefinition. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IKustomizationDefinition FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json ? new KustomizationDefinition(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject instance to deserialize from. + internal KustomizationDefinition(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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;} + {_path = If( json?.PropertyT("path"), out var __jsonPath) ? (string)__jsonPath : (string)Path;} + {_dependsOn = If( json?.PropertyT("dependsOn"), out var __jsonDependsOn) ? If( __jsonDependsOn as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(string) (__u is Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : DependsOn;} + {_timeoutInSecond = If( json?.PropertyT("timeoutInSeconds"), out var __jsonTimeoutInSeconds) ? (long?)__jsonTimeoutInSeconds : TimeoutInSecond;} + {_syncIntervalInSecond = If( json?.PropertyT("syncIntervalInSeconds"), out var __jsonSyncIntervalInSeconds) ? (long?)__jsonSyncIntervalInSeconds : SyncIntervalInSecond;} + {_retryIntervalInSecond = If( json?.PropertyT("retryIntervalInSeconds"), out var __jsonRetryIntervalInSeconds) ? (long?)__jsonRetryIntervalInSeconds : RetryIntervalInSecond;} + {_prune = If( json?.PropertyT("prune"), out var __jsonPrune) ? (bool?)__jsonPrune : Prune;} + {_force = If( json?.PropertyT("force"), out var __jsonForce) ? (bool?)__jsonForce : Force;} + 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.KubernetesConfiguration.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); + } + AddIf( null != (((object)this._path)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonString(this._path.ToString()) : null, "path" ,container.Add ); + if (null != this._dependsOn) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.XNodeArray(); + foreach( var __x in this._dependsOn ) + { + AddIf(null != (((object)__x)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonString(__x.ToString()) : null ,__w.Add); + } + container.Add("dependsOn",__w); + } + AddIf( null != this._timeoutInSecond ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNumber((long)this._timeoutInSecond) : null, "timeoutInSeconds" ,container.Add ); + AddIf( null != this._syncIntervalInSecond ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNumber((long)this._syncIntervalInSecond) : null, "syncIntervalInSeconds" ,container.Add ); + AddIf( null != this._retryIntervalInSecond ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNumber((long)this._retryIntervalInSecond) : null, "retryIntervalInSeconds" ,container.Add ); + AddIf( null != this._prune ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonBoolean((bool)this._prune) : null, "prune" ,container.Add ); + AddIf( null != this._force ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonBoolean((bool)this._force) : null, "force" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20220301/KustomizationPatchDefinition.PowerShell.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/KustomizationPatchDefinition.PowerShell.cs new file mode 100644 index 000000000000..2a384bd8ac52 --- /dev/null +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/KustomizationPatchDefinition.PowerShell.cs @@ -0,0 +1,216 @@ +// 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.KubernetesConfiguration.Models.Api20220301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; + + /// + /// The Kustomization defining how to reconcile the artifact pulled by the source type on the cluster. + /// + [System.ComponentModel.TypeConverter(typeof(KustomizationPatchDefinitionTypeConverter))] + public partial class KustomizationPatchDefinition + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IKustomizationPatchDefinition DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new KustomizationPatchDefinition(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.KubernetesConfiguration.Models.Api20220301.IKustomizationPatchDefinition DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new KustomizationPatchDefinition(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.KubernetesConfiguration.Models.Api20220301.IKustomizationPatchDefinition FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal KustomizationPatchDefinition(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Path")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IKustomizationPatchDefinitionInternal)this).Path = (string) content.GetValueForProperty("Path",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IKustomizationPatchDefinitionInternal)this).Path, global::System.Convert.ToString); + } + if (content.Contains("DependsOn")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IKustomizationPatchDefinitionInternal)this).DependsOn = (string[]) content.GetValueForProperty("DependsOn",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IKustomizationPatchDefinitionInternal)this).DependsOn, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("TimeoutInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IKustomizationPatchDefinitionInternal)this).TimeoutInSecond = (long?) content.GetValueForProperty("TimeoutInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IKustomizationPatchDefinitionInternal)this).TimeoutInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("SyncIntervalInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IKustomizationPatchDefinitionInternal)this).SyncIntervalInSecond = (long?) content.GetValueForProperty("SyncIntervalInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IKustomizationPatchDefinitionInternal)this).SyncIntervalInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("RetryIntervalInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IKustomizationPatchDefinitionInternal)this).RetryIntervalInSecond = (long?) content.GetValueForProperty("RetryIntervalInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IKustomizationPatchDefinitionInternal)this).RetryIntervalInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("Prune")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IKustomizationPatchDefinitionInternal)this).Prune = (bool?) content.GetValueForProperty("Prune",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IKustomizationPatchDefinitionInternal)this).Prune, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("Force")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IKustomizationPatchDefinitionInternal)this).Force = (bool?) content.GetValueForProperty("Force",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IKustomizationPatchDefinitionInternal)this).Force, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal KustomizationPatchDefinition(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Path")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IKustomizationPatchDefinitionInternal)this).Path = (string) content.GetValueForProperty("Path",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IKustomizationPatchDefinitionInternal)this).Path, global::System.Convert.ToString); + } + if (content.Contains("DependsOn")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IKustomizationPatchDefinitionInternal)this).DependsOn = (string[]) content.GetValueForProperty("DependsOn",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IKustomizationPatchDefinitionInternal)this).DependsOn, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("TimeoutInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IKustomizationPatchDefinitionInternal)this).TimeoutInSecond = (long?) content.GetValueForProperty("TimeoutInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IKustomizationPatchDefinitionInternal)this).TimeoutInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("SyncIntervalInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IKustomizationPatchDefinitionInternal)this).SyncIntervalInSecond = (long?) content.GetValueForProperty("SyncIntervalInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IKustomizationPatchDefinitionInternal)this).SyncIntervalInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("RetryIntervalInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IKustomizationPatchDefinitionInternal)this).RetryIntervalInSecond = (long?) content.GetValueForProperty("RetryIntervalInSecond",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IKustomizationPatchDefinitionInternal)this).RetryIntervalInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("Prune")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IKustomizationPatchDefinitionInternal)this).Prune = (bool?) content.GetValueForProperty("Prune",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IKustomizationPatchDefinitionInternal)this).Prune, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("Force")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IKustomizationPatchDefinitionInternal)this).Force = (bool?) content.GetValueForProperty("Force",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IKustomizationPatchDefinitionInternal)this).Force, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + 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.KubernetesConfiguration.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The Kustomization defining how to reconcile the artifact pulled by the source type on the cluster. + [System.ComponentModel.TypeConverter(typeof(KustomizationPatchDefinitionTypeConverter))] + public partial interface IKustomizationPatchDefinition + + { + + } +} \ No newline at end of file diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20220301/KustomizationPatchDefinition.TypeConverter.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/KustomizationPatchDefinition.TypeConverter.cs new file mode 100644 index 000000000000..653b0352ea94 --- /dev/null +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/KustomizationPatchDefinition.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class KustomizationPatchDefinitionTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IKustomizationPatchDefinition ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IKustomizationPatchDefinition).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return KustomizationPatchDefinition.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return KustomizationPatchDefinition.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return KustomizationPatchDefinition.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/KubernetesConfiguration/generated/api/Models/Api20220301/KustomizationPatchDefinition.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/KustomizationPatchDefinition.cs new file mode 100644 index 000000000000..a34403f10e5a --- /dev/null +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/KustomizationPatchDefinition.cs @@ -0,0 +1,182 @@ +// 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.KubernetesConfiguration.Models.Api20220301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; + + /// + /// The Kustomization defining how to reconcile the artifact pulled by the source type on the cluster. + /// + public partial class KustomizationPatchDefinition : + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IKustomizationPatchDefinition, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IKustomizationPatchDefinitionInternal + { + + /// Backing field for property. + private string[] _dependsOn; + + /// + /// Specifies other Kustomizations that this Kustomization depends on. This Kustomization will not reconcile until all dependencies + /// have completed their reconciliation. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] + public string[] DependsOn { get => this._dependsOn; set => this._dependsOn = value; } + + /// Backing field for property. + private bool? _force; + + /// + /// Enable/disable re-creating Kubernetes resources on the cluster when patching fails due to an immutable field change. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] + public bool? Force { get => this._force; set => this._force = value; } + + /// Backing field for property. + private string _path; + + /// The path in the source reference to reconcile on the cluster. + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] + public string Path { get => this._path; set => this._path = value; } + + /// Backing field for property. + private bool? _prune; + + /// + /// Enable/disable garbage collections of Kubernetes objects created by this Kustomization. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] + public bool? Prune { get => this._prune; set => this._prune = value; } + + /// Backing field for property. + private long? _retryIntervalInSecond; + + /// + /// The interval at which to re-reconcile the Kustomization on the cluster in the event of failure on reconciliation. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] + public long? RetryIntervalInSecond { get => this._retryIntervalInSecond; set => this._retryIntervalInSecond = value; } + + /// Backing field for property. + private long? _syncIntervalInSecond; + + /// The interval at which to re-reconcile the Kustomization on the cluster. + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] + public long? SyncIntervalInSecond { get => this._syncIntervalInSecond; set => this._syncIntervalInSecond = value; } + + /// Backing field for property. + private long? _timeoutInSecond; + + /// The maximum time to attempt to reconcile the Kustomization on the cluster. + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] + public long? TimeoutInSecond { get => this._timeoutInSecond; set => this._timeoutInSecond = value; } + + /// Creates an new instance. + public KustomizationPatchDefinition() + { + + } + } + /// The Kustomization defining how to reconcile the artifact pulled by the source type on the cluster. + public partial interface IKustomizationPatchDefinition : + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IJsonSerializable + { + /// + /// Specifies other Kustomizations that this Kustomization depends on. This Kustomization will not reconcile until all dependencies + /// have completed their reconciliation. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Specifies other Kustomizations that this Kustomization depends on. This Kustomization will not reconcile until all dependencies have completed their reconciliation.", + SerializedName = @"dependsOn", + PossibleTypes = new [] { typeof(string) })] + string[] DependsOn { get; set; } + /// + /// Enable/disable re-creating Kubernetes resources on the cluster when patching fails due to an immutable field change. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Enable/disable re-creating Kubernetes resources on the cluster when patching fails due to an immutable field change.", + SerializedName = @"force", + PossibleTypes = new [] { typeof(bool) })] + bool? Force { get; set; } + /// The path in the source reference to reconcile on the cluster. + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The path in the source reference to reconcile on the cluster.", + SerializedName = @"path", + PossibleTypes = new [] { typeof(string) })] + string Path { get; set; } + /// + /// Enable/disable garbage collections of Kubernetes objects created by this Kustomization. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Enable/disable garbage collections of Kubernetes objects created by this Kustomization.", + SerializedName = @"prune", + PossibleTypes = new [] { typeof(bool) })] + bool? Prune { get; set; } + /// + /// The interval at which to re-reconcile the Kustomization on the cluster in the event of failure on reconciliation. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The interval at which to re-reconcile the Kustomization on the cluster in the event of failure on reconciliation.", + SerializedName = @"retryIntervalInSeconds", + PossibleTypes = new [] { typeof(long) })] + long? RetryIntervalInSecond { get; set; } + /// The interval at which to re-reconcile the Kustomization on the cluster. + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The interval at which to re-reconcile the Kustomization on the cluster.", + SerializedName = @"syncIntervalInSeconds", + PossibleTypes = new [] { typeof(long) })] + long? SyncIntervalInSecond { get; set; } + /// The maximum time to attempt to reconcile the Kustomization on the cluster. + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The maximum time to attempt to reconcile the Kustomization on the cluster.", + SerializedName = @"timeoutInSeconds", + PossibleTypes = new [] { typeof(long) })] + long? TimeoutInSecond { get; set; } + + } + /// The Kustomization defining how to reconcile the artifact pulled by the source type on the cluster. + internal partial interface IKustomizationPatchDefinitionInternal + + { + /// + /// Specifies other Kustomizations that this Kustomization depends on. This Kustomization will not reconcile until all dependencies + /// have completed their reconciliation. + /// + string[] DependsOn { get; set; } + /// + /// Enable/disable re-creating Kubernetes resources on the cluster when patching fails due to an immutable field change. + /// + bool? Force { get; set; } + /// The path in the source reference to reconcile on the cluster. + string Path { get; set; } + /// + /// Enable/disable garbage collections of Kubernetes objects created by this Kustomization. + /// + bool? Prune { get; set; } + /// + /// The interval at which to re-reconcile the Kustomization on the cluster in the event of failure on reconciliation. + /// + long? RetryIntervalInSecond { get; set; } + /// The interval at which to re-reconcile the Kustomization on the cluster. + long? SyncIntervalInSecond { get; set; } + /// The maximum time to attempt to reconcile the Kustomization on the cluster. + long? TimeoutInSecond { get; set; } + + } +} \ No newline at end of file diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20220301/KustomizationPatchDefinition.json.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/KustomizationPatchDefinition.json.cs new file mode 100644 index 000000000000..72ce82ca1628 --- /dev/null +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/KustomizationPatchDefinition.json.cs @@ -0,0 +1,130 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; + + /// + /// The Kustomization defining how to reconcile the artifact pulled by the source type on the cluster. + /// + public partial class KustomizationPatchDefinition + { + + /// + /// 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.KubernetesConfiguration.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IKustomizationPatchDefinition. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IKustomizationPatchDefinition. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IKustomizationPatchDefinition FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json ? new KustomizationPatchDefinition(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject instance to deserialize from. + internal KustomizationPatchDefinition(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_path = If( json?.PropertyT("path"), out var __jsonPath) ? (string)__jsonPath : (string)Path;} + {_dependsOn = If( json?.PropertyT("dependsOn"), out var __jsonDependsOn) ? If( __jsonDependsOn as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(string) (__u is Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : DependsOn;} + {_timeoutInSecond = If( json?.PropertyT("timeoutInSeconds"), out var __jsonTimeoutInSeconds) ? (long?)__jsonTimeoutInSeconds : TimeoutInSecond;} + {_syncIntervalInSecond = If( json?.PropertyT("syncIntervalInSeconds"), out var __jsonSyncIntervalInSeconds) ? (long?)__jsonSyncIntervalInSeconds : SyncIntervalInSecond;} + {_retryIntervalInSecond = If( json?.PropertyT("retryIntervalInSeconds"), out var __jsonRetryIntervalInSeconds) ? (long?)__jsonRetryIntervalInSeconds : RetryIntervalInSecond;} + {_prune = If( json?.PropertyT("prune"), out var __jsonPrune) ? (bool?)__jsonPrune : Prune;} + {_force = If( json?.PropertyT("force"), out var __jsonForce) ? (bool?)__jsonForce : Force;} + 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.KubernetesConfiguration.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._path)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonString(this._path.ToString()) : null, "path" ,container.Add ); + if (null != this._dependsOn) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.XNodeArray(); + foreach( var __x in this._dependsOn ) + { + AddIf(null != (((object)__x)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonString(__x.ToString()) : null ,__w.Add); + } + container.Add("dependsOn",__w); + } + AddIf( null != this._timeoutInSecond ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNumber((long)this._timeoutInSecond) : null, "timeoutInSeconds" ,container.Add ); + AddIf( null != this._syncIntervalInSecond ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNumber((long)this._syncIntervalInSecond) : null, "syncIntervalInSeconds" ,container.Add ); + AddIf( null != this._retryIntervalInSecond ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNumber((long)this._retryIntervalInSecond) : null, "retryIntervalInSeconds" ,container.Add ); + AddIf( null != this._prune ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonBoolean((bool)this._prune) : null, "prune" ,container.Add ); + AddIf( null != this._force ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonBoolean((bool)this._force) : null, "force" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20220301/ObjectReferenceDefinition.PowerShell.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/ObjectReferenceDefinition.PowerShell.cs new file mode 100644 index 000000000000..e322e71eb3a8 --- /dev/null +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/ObjectReferenceDefinition.PowerShell.cs @@ -0,0 +1,174 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; + + /// Object reference to a Kubernetes object on a cluster + [System.ComponentModel.TypeConverter(typeof(ObjectReferenceDefinitionTypeConverter))] + public partial class ObjectReferenceDefinition + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectReferenceDefinition DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ObjectReferenceDefinition(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.KubernetesConfiguration.Models.Api20220301.IObjectReferenceDefinition DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ObjectReferenceDefinition(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.KubernetesConfiguration.Models.Api20220301.IObjectReferenceDefinition FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ObjectReferenceDefinition(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectReferenceDefinitionInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectReferenceDefinitionInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Namespace")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectReferenceDefinitionInternal)this).Namespace = (string) content.GetValueForProperty("Namespace",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectReferenceDefinitionInternal)this).Namespace, 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 ObjectReferenceDefinition(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectReferenceDefinitionInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectReferenceDefinitionInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Namespace")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectReferenceDefinitionInternal)this).Namespace = (string) content.GetValueForProperty("Namespace",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectReferenceDefinitionInternal)this).Namespace, 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.KubernetesConfiguration.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Object reference to a Kubernetes object on a cluster + [System.ComponentModel.TypeConverter(typeof(ObjectReferenceDefinitionTypeConverter))] + public partial interface IObjectReferenceDefinition + + { + + } +} \ No newline at end of file diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20220301/ObjectReferenceDefinition.TypeConverter.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/ObjectReferenceDefinition.TypeConverter.cs new file mode 100644 index 000000000000..92d72a84c8ce --- /dev/null +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/ObjectReferenceDefinition.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ObjectReferenceDefinitionTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectReferenceDefinition ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectReferenceDefinition).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ObjectReferenceDefinition.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ObjectReferenceDefinition.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ObjectReferenceDefinition.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/KubernetesConfiguration/generated/api/Models/Api20220301/ObjectReferenceDefinition.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/ObjectReferenceDefinition.cs new file mode 100644 index 000000000000..dc2a1685484e --- /dev/null +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/ObjectReferenceDefinition.cs @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; + + /// Object reference to a Kubernetes object on a cluster + public partial class ObjectReferenceDefinition : + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectReferenceDefinition, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectReferenceDefinitionInternal + { + + /// Backing field for property. + private string _name; + + /// Name of the object + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] + public string Name { get => this._name; set => this._name = value; } + + /// Backing field for property. + private string _namespace; + + /// Namespace of the object + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] + public string Namespace { get => this._namespace; set => this._namespace = value; } + + /// Creates an new instance. + public ObjectReferenceDefinition() + { + + } + } + /// Object reference to a Kubernetes object on a cluster + public partial interface IObjectReferenceDefinition : + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IJsonSerializable + { + /// Name of the object + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Name of the object", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + string Name { get; set; } + /// Namespace of the object + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Namespace of the object", + SerializedName = @"namespace", + PossibleTypes = new [] { typeof(string) })] + string Namespace { get; set; } + + } + /// Object reference to a Kubernetes object on a cluster + internal partial interface IObjectReferenceDefinitionInternal + + { + /// Name of the object + string Name { get; set; } + /// Namespace of the object + string Namespace { get; set; } + + } +} \ No newline at end of file diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20210301/ErrorDefinition.json.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/ObjectReferenceDefinition.json.cs similarity index 70% rename from src/KubernetesConfiguration/generated/api/Models/Api20210301/ErrorDefinition.json.cs rename to src/KubernetesConfiguration/generated/api/Models/Api20220301/ObjectReferenceDefinition.json.cs index f629eb58aaf7..497d2fe41993 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Api20210301/ErrorDefinition.json.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/ObjectReferenceDefinition.json.cs @@ -3,12 +3,12 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; - /// Error definition. - public partial class ErrorDefinition + /// Object reference to a Kubernetes object on a cluster + public partial class ObjectReferenceDefinition { /// @@ -20,7 +20,7 @@ public partial class ErrorDefinition partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class ErrorDefinition /// /// 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. + /// 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. @@ -42,7 +43,8 @@ public partial class ErrorDefinition /// /// 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. + /// 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. @@ -52,10 +54,22 @@ public partial class ErrorDefinition partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject into a new instance of . + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectReferenceDefinition. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectReferenceDefinition. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectReferenceDefinition FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json ? new ObjectReferenceDefinition(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject into a new instance of . /// /// A Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject instance to deserialize from. - internal ErrorDefinition(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json) + internal ObjectReferenceDefinition(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); @@ -63,31 +77,19 @@ internal ErrorDefinition(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfigurat { 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;} + {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} + {_namespace = If( json?.PropertyT("namespace"), out var __jsonNamespace) ? (string)__jsonNamespace : (string)Namespace;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IErrorDefinition. - /// - /// a to deserialize from. - /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IErrorDefinition. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IErrorDefinition FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) - { - return node is Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json ? new ErrorDefinition(json) : null; - } - - /// - /// Serializes this instance of into a . + /// Serializes this instance of into a . /// /// The container to serialize this object into. If the caller /// passes in null, a new instance will be created and returned to the caller. /// Allows the caller to choose the depth of the serialization. See . /// - /// a serialized instance of as a . + /// a serialized instance of as a . /// public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode serializationMode) { @@ -99,8 +101,8 @@ public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.J { return container; } - AddIf( null != (((object)this._code)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonString(this._code.ToString()) : null, "code" ,container.Add ); - AddIf( null != (((object)this._message)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonString(this._message.ToString()) : null, "message" ,container.Add ); + AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); + AddIf( null != (((object)this._namespace)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonString(this._namespace.ToString()) : null, "namespace" ,container.Add ); AfterToJson(ref container); return container; } diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20220301/ObjectStatusConditionDefinition.PowerShell.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/ObjectStatusConditionDefinition.PowerShell.cs new file mode 100644 index 000000000000..452594d069bc --- /dev/null +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/ObjectStatusConditionDefinition.PowerShell.cs @@ -0,0 +1,198 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; + + /// Status condition of Kubernetes object + [System.ComponentModel.TypeConverter(typeof(ObjectStatusConditionDefinitionTypeConverter))] + public partial class ObjectStatusConditionDefinition + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectStatusConditionDefinition DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ObjectStatusConditionDefinition(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.KubernetesConfiguration.Models.Api20220301.IObjectStatusConditionDefinition DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ObjectStatusConditionDefinition(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.KubernetesConfiguration.Models.Api20220301.IObjectStatusConditionDefinition FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ObjectStatusConditionDefinition(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("LastTransitionTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectStatusConditionDefinitionInternal)this).LastTransitionTime = (global::System.DateTime?) content.GetValueForProperty("LastTransitionTime",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectStatusConditionDefinitionInternal)this).LastTransitionTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("Message")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectStatusConditionDefinitionInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectStatusConditionDefinitionInternal)this).Message, global::System.Convert.ToString); + } + if (content.Contains("Reason")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectStatusConditionDefinitionInternal)this).Reason = (string) content.GetValueForProperty("Reason",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectStatusConditionDefinitionInternal)this).Reason, global::System.Convert.ToString); + } + if (content.Contains("Status")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectStatusConditionDefinitionInternal)this).Status = (string) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectStatusConditionDefinitionInternal)this).Status, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectStatusConditionDefinitionInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectStatusConditionDefinitionInternal)this).Type, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ObjectStatusConditionDefinition(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("LastTransitionTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectStatusConditionDefinitionInternal)this).LastTransitionTime = (global::System.DateTime?) content.GetValueForProperty("LastTransitionTime",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectStatusConditionDefinitionInternal)this).LastTransitionTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("Message")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectStatusConditionDefinitionInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectStatusConditionDefinitionInternal)this).Message, global::System.Convert.ToString); + } + if (content.Contains("Reason")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectStatusConditionDefinitionInternal)this).Reason = (string) content.GetValueForProperty("Reason",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectStatusConditionDefinitionInternal)this).Reason, global::System.Convert.ToString); + } + if (content.Contains("Status")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectStatusConditionDefinitionInternal)this).Status = (string) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectStatusConditionDefinitionInternal)this).Status, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectStatusConditionDefinitionInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectStatusConditionDefinitionInternal)this).Type, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Status condition of Kubernetes object + [System.ComponentModel.TypeConverter(typeof(ObjectStatusConditionDefinitionTypeConverter))] + public partial interface IObjectStatusConditionDefinition + + { + + } +} \ No newline at end of file diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20220301/ObjectStatusConditionDefinition.TypeConverter.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/ObjectStatusConditionDefinition.TypeConverter.cs new file mode 100644 index 000000000000..dbbdd2abe054 --- /dev/null +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/ObjectStatusConditionDefinition.TypeConverter.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ObjectStatusConditionDefinitionTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectStatusConditionDefinition ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectStatusConditionDefinition).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ObjectStatusConditionDefinition.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ObjectStatusConditionDefinition.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ObjectStatusConditionDefinition.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/KubernetesConfiguration/generated/api/Models/Api20220301/ObjectStatusConditionDefinition.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/ObjectStatusConditionDefinition.cs new file mode 100644 index 000000000000..b1414a832b25 --- /dev/null +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/ObjectStatusConditionDefinition.cs @@ -0,0 +1,119 @@ +// 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.KubernetesConfiguration.Models.Api20220301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; + + /// Status condition of Kubernetes object + public partial class ObjectStatusConditionDefinition : + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectStatusConditionDefinition, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectStatusConditionDefinitionInternal + { + + /// Backing field for property. + private global::System.DateTime? _lastTransitionTime; + + /// Last time this status condition has changed + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] + public global::System.DateTime? LastTransitionTime { get => this._lastTransitionTime; set => this._lastTransitionTime = value; } + + /// Backing field for property. + private string _message; + + /// A more verbose description of the object status condition + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] + public string Message { get => this._message; set => this._message = value; } + + /// Backing field for property. + private string _reason; + + /// Reason for the specified status condition type status + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] + public string Reason { get => this._reason; set => this._reason = value; } + + /// Backing field for property. + private string _status; + + /// Status of the Kubernetes object condition type + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] + public string Status { get => this._status; set => this._status = value; } + + /// Backing field for property. + private string _type; + + /// Object status condition type for this object + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] + public string Type { get => this._type; set => this._type = value; } + + /// Creates an new instance. + public ObjectStatusConditionDefinition() + { + + } + } + /// Status condition of Kubernetes object + public partial interface IObjectStatusConditionDefinition : + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IJsonSerializable + { + /// Last time this status condition has changed + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Last time this status condition has changed", + SerializedName = @"lastTransitionTime", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? LastTransitionTime { get; set; } + /// A more verbose description of the object status condition + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A more verbose description of the object status condition", + SerializedName = @"message", + PossibleTypes = new [] { typeof(string) })] + string Message { get; set; } + /// Reason for the specified status condition type status + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Reason for the specified status condition type status", + SerializedName = @"reason", + PossibleTypes = new [] { typeof(string) })] + string Reason { get; set; } + /// Status of the Kubernetes object condition type + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Status of the Kubernetes object condition type", + SerializedName = @"status", + PossibleTypes = new [] { typeof(string) })] + string Status { get; set; } + /// Object status condition type for this object + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Object status condition type for this object", + SerializedName = @"type", + PossibleTypes = new [] { typeof(string) })] + string Type { get; set; } + + } + /// Status condition of Kubernetes object + internal partial interface IObjectStatusConditionDefinitionInternal + + { + /// Last time this status condition has changed + global::System.DateTime? LastTransitionTime { get; set; } + /// A more verbose description of the object status condition + string Message { get; set; } + /// Reason for the specified status condition type status + string Reason { get; set; } + /// Status of the Kubernetes object condition type + string Status { get; set; } + /// Object status condition type for this object + string Type { get; set; } + + } +} \ No newline at end of file diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20210901/ResourceProviderOperationAutoGenerated.json.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/ObjectStatusConditionDefinition.json.cs similarity index 57% rename from src/KubernetesConfiguration/generated/api/Models/Api20210901/ResourceProviderOperationAutoGenerated.json.cs rename to src/KubernetesConfiguration/generated/api/Models/Api20220301/ObjectStatusConditionDefinition.json.cs index 078923c34fc5..7f185dc9a717 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Api20210901/ResourceProviderOperationAutoGenerated.json.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/ObjectStatusConditionDefinition.json.cs @@ -3,12 +3,12 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; - /// Supported operation of this resource provider. - public partial class ResourceProviderOperationAutoGenerated + /// Status condition of Kubernetes object + public partial class ObjectStatusConditionDefinition { /// @@ -20,7 +20,7 @@ public partial class ResourceProviderOperationAutoGenerated partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class ResourceProviderOperationAutoGenerated /// /// 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. + /// 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. @@ -42,7 +43,8 @@ public partial class ResourceProviderOperationAutoGenerated /// /// 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. + /// 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. @@ -52,22 +54,22 @@ public partial class ResourceProviderOperationAutoGenerated partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IResourceProviderOperationAutoGenerated. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectStatusConditionDefinition. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IResourceProviderOperationAutoGenerated. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectStatusConditionDefinition. /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IResourceProviderOperationAutoGenerated FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectStatusConditionDefinition FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) { - return node is Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json ? new ResourceProviderOperationAutoGenerated(json) : null; + return node is Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json ? new ObjectStatusConditionDefinition(json) : null; } /// - /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject into a new instance of . + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject into a new instance of . /// /// A Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject instance to deserialize from. - internal ResourceProviderOperationAutoGenerated(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json) + internal ObjectStatusConditionDefinition(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); @@ -75,22 +77,22 @@ internal ResourceProviderOperationAutoGenerated(Microsoft.Azure.PowerShell.Cmdle { return; } - {_display = If( json?.PropertyT("display"), out var __jsonDisplay) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ResourceProviderOperationDisplay.FromJson(__jsonDisplay) : Display;} - {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} - {_isDataAction = If( json?.PropertyT("isDataAction"), out var __jsonIsDataAction) ? (bool?)__jsonIsDataAction : IsDataAction;} - {_origin = If( json?.PropertyT("origin"), out var __jsonOrigin) ? (string)__jsonOrigin : (string)Origin;} + {_lastTransitionTime = If( json?.PropertyT("lastTransitionTime"), out var __jsonLastTransitionTime) ? global::System.DateTime.TryParse((string)__jsonLastTransitionTime, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonLastTransitionTimeValue) ? __jsonLastTransitionTimeValue : LastTransitionTime : LastTransitionTime;} + {_message = If( json?.PropertyT("message"), out var __jsonMessage) ? (string)__jsonMessage : (string)Message;} + {_reason = If( json?.PropertyT("reason"), out var __jsonReason) ? (string)__jsonReason : (string)Reason;} + {_status = If( json?.PropertyT("status"), out var __jsonStatus) ? (string)__jsonStatus : (string)Status;} + {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)Type;} AfterFromJson(json); } /// - /// Serializes this instance of into a . + /// Serializes this instance of into a . /// /// The container to serialize this object into. If the caller /// passes in null, a new instance will be created and returned to the caller. /// Allows the caller to choose the depth of the serialization. See . /// - /// a serialized instance of as a . + /// a serialized instance of as a . /// public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode serializationMode) { @@ -102,16 +104,11 @@ public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.J { return container; } - AddIf( null != this._display ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) this._display.ToJson(null,serializationMode) : null, "display" ,container.Add ); - AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeReadOnly)) - { - AddIf( null != this._isDataAction ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonBoolean((bool)this._isDataAction) : null, "isDataAction" ,container.Add ); - } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeReadOnly)) - { - AddIf( null != (((object)this._origin)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonString(this._origin.ToString()) : null, "origin" ,container.Add ); - } + AddIf( null != this._lastTransitionTime ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonString(this._lastTransitionTime?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "lastTransitionTime" ,container.Add ); + AddIf( null != (((object)this._message)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonString(this._message.ToString()) : null, "message" ,container.Add ); + AddIf( null != (((object)this._reason)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonString(this._reason.ToString()) : null, "reason" ,container.Add ); + AddIf( null != (((object)this._status)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonString(this._status.ToString()) : null, "status" ,container.Add ); + AddIf( null != (((object)this._type)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonString(this._type.ToString()) : null, "type" ,container.Add ); AfterToJson(ref container); return container; } diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20220301/ObjectStatusDefinition.PowerShell.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/ObjectStatusDefinition.PowerShell.cs new file mode 100644 index 000000000000..53d848868712 --- /dev/null +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/ObjectStatusDefinition.PowerShell.cs @@ -0,0 +1,288 @@ +// 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.KubernetesConfiguration.Models.Api20220301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; + + /// + /// Statuses of objects deployed by the user-specified kustomizations from the git repository. + /// + [System.ComponentModel.TypeConverter(typeof(ObjectStatusDefinitionTypeConverter))] + public partial class ObjectStatusDefinition + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectStatusDefinition DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ObjectStatusDefinition(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.KubernetesConfiguration.Models.Api20220301.IObjectStatusDefinition DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ObjectStatusDefinition(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.KubernetesConfiguration.Models.Api20220301.IObjectStatusDefinition FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ObjectStatusDefinition(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("AppliedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectStatusDefinitionInternal)this).AppliedBy = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectReferenceDefinition) content.GetValueForProperty("AppliedBy",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectStatusDefinitionInternal)this).AppliedBy, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ObjectReferenceDefinitionTypeConverter.ConvertFrom); + } + if (content.Contains("HelmReleaseProperty")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectStatusDefinitionInternal)this).HelmReleaseProperty = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IHelmReleasePropertiesDefinition) content.GetValueForProperty("HelmReleaseProperty",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectStatusDefinitionInternal)this).HelmReleaseProperty, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.HelmReleasePropertiesDefinitionTypeConverter.ConvertFrom); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectStatusDefinitionInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectStatusDefinitionInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Namespace")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectStatusDefinitionInternal)this).Namespace = (string) content.GetValueForProperty("Namespace",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectStatusDefinitionInternal)this).Namespace, global::System.Convert.ToString); + } + if (content.Contains("Kind")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectStatusDefinitionInternal)this).Kind = (string) content.GetValueForProperty("Kind",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectStatusDefinitionInternal)this).Kind, global::System.Convert.ToString); + } + if (content.Contains("ComplianceState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectStatusDefinitionInternal)this).ComplianceState = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.FluxComplianceState?) content.GetValueForProperty("ComplianceState",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectStatusDefinitionInternal)this).ComplianceState, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.FluxComplianceState.CreateFrom); + } + if (content.Contains("StatusCondition")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectStatusDefinitionInternal)this).StatusCondition = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectStatusConditionDefinition[]) content.GetValueForProperty("StatusCondition",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectStatusDefinitionInternal)this).StatusCondition, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ObjectStatusConditionDefinitionTypeConverter.ConvertFrom)); + } + if (content.Contains("AppliedByName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectStatusDefinitionInternal)this).AppliedByName = (string) content.GetValueForProperty("AppliedByName",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectStatusDefinitionInternal)this).AppliedByName, global::System.Convert.ToString); + } + if (content.Contains("AppliedByNamespace")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectStatusDefinitionInternal)this).AppliedByNamespace = (string) content.GetValueForProperty("AppliedByNamespace",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectStatusDefinitionInternal)this).AppliedByNamespace, global::System.Convert.ToString); + } + if (content.Contains("HelmReleasePropertyHelmChartRef")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectStatusDefinitionInternal)this).HelmReleasePropertyHelmChartRef = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectReferenceDefinition) content.GetValueForProperty("HelmReleasePropertyHelmChartRef",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectStatusDefinitionInternal)this).HelmReleasePropertyHelmChartRef, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ObjectReferenceDefinitionTypeConverter.ConvertFrom); + } + if (content.Contains("HelmReleasePropertyLastRevisionApplied")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectStatusDefinitionInternal)this).HelmReleasePropertyLastRevisionApplied = (long?) content.GetValueForProperty("HelmReleasePropertyLastRevisionApplied",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectStatusDefinitionInternal)this).HelmReleasePropertyLastRevisionApplied, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("HelmReleasePropertyFailureCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectStatusDefinitionInternal)this).HelmReleasePropertyFailureCount = (long?) content.GetValueForProperty("HelmReleasePropertyFailureCount",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectStatusDefinitionInternal)this).HelmReleasePropertyFailureCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("HelmReleasePropertyInstallFailureCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectStatusDefinitionInternal)this).HelmReleasePropertyInstallFailureCount = (long?) content.GetValueForProperty("HelmReleasePropertyInstallFailureCount",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectStatusDefinitionInternal)this).HelmReleasePropertyInstallFailureCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("HelmReleasePropertyUpgradeFailureCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectStatusDefinitionInternal)this).HelmReleasePropertyUpgradeFailureCount = (long?) content.GetValueForProperty("HelmReleasePropertyUpgradeFailureCount",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectStatusDefinitionInternal)this).HelmReleasePropertyUpgradeFailureCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("HelmChartRefName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectStatusDefinitionInternal)this).HelmChartRefName = (string) content.GetValueForProperty("HelmChartRefName",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectStatusDefinitionInternal)this).HelmChartRefName, global::System.Convert.ToString); + } + if (content.Contains("HelmChartRefNamespace")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectStatusDefinitionInternal)this).HelmChartRefNamespace = (string) content.GetValueForProperty("HelmChartRefNamespace",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectStatusDefinitionInternal)this).HelmChartRefNamespace, 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 ObjectStatusDefinition(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("AppliedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectStatusDefinitionInternal)this).AppliedBy = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectReferenceDefinition) content.GetValueForProperty("AppliedBy",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectStatusDefinitionInternal)this).AppliedBy, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ObjectReferenceDefinitionTypeConverter.ConvertFrom); + } + if (content.Contains("HelmReleaseProperty")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectStatusDefinitionInternal)this).HelmReleaseProperty = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IHelmReleasePropertiesDefinition) content.GetValueForProperty("HelmReleaseProperty",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectStatusDefinitionInternal)this).HelmReleaseProperty, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.HelmReleasePropertiesDefinitionTypeConverter.ConvertFrom); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectStatusDefinitionInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectStatusDefinitionInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Namespace")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectStatusDefinitionInternal)this).Namespace = (string) content.GetValueForProperty("Namespace",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectStatusDefinitionInternal)this).Namespace, global::System.Convert.ToString); + } + if (content.Contains("Kind")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectStatusDefinitionInternal)this).Kind = (string) content.GetValueForProperty("Kind",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectStatusDefinitionInternal)this).Kind, global::System.Convert.ToString); + } + if (content.Contains("ComplianceState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectStatusDefinitionInternal)this).ComplianceState = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.FluxComplianceState?) content.GetValueForProperty("ComplianceState",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectStatusDefinitionInternal)this).ComplianceState, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.FluxComplianceState.CreateFrom); + } + if (content.Contains("StatusCondition")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectStatusDefinitionInternal)this).StatusCondition = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectStatusConditionDefinition[]) content.GetValueForProperty("StatusCondition",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectStatusDefinitionInternal)this).StatusCondition, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ObjectStatusConditionDefinitionTypeConverter.ConvertFrom)); + } + if (content.Contains("AppliedByName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectStatusDefinitionInternal)this).AppliedByName = (string) content.GetValueForProperty("AppliedByName",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectStatusDefinitionInternal)this).AppliedByName, global::System.Convert.ToString); + } + if (content.Contains("AppliedByNamespace")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectStatusDefinitionInternal)this).AppliedByNamespace = (string) content.GetValueForProperty("AppliedByNamespace",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectStatusDefinitionInternal)this).AppliedByNamespace, global::System.Convert.ToString); + } + if (content.Contains("HelmReleasePropertyHelmChartRef")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectStatusDefinitionInternal)this).HelmReleasePropertyHelmChartRef = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectReferenceDefinition) content.GetValueForProperty("HelmReleasePropertyHelmChartRef",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectStatusDefinitionInternal)this).HelmReleasePropertyHelmChartRef, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ObjectReferenceDefinitionTypeConverter.ConvertFrom); + } + if (content.Contains("HelmReleasePropertyLastRevisionApplied")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectStatusDefinitionInternal)this).HelmReleasePropertyLastRevisionApplied = (long?) content.GetValueForProperty("HelmReleasePropertyLastRevisionApplied",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectStatusDefinitionInternal)this).HelmReleasePropertyLastRevisionApplied, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("HelmReleasePropertyFailureCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectStatusDefinitionInternal)this).HelmReleasePropertyFailureCount = (long?) content.GetValueForProperty("HelmReleasePropertyFailureCount",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectStatusDefinitionInternal)this).HelmReleasePropertyFailureCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("HelmReleasePropertyInstallFailureCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectStatusDefinitionInternal)this).HelmReleasePropertyInstallFailureCount = (long?) content.GetValueForProperty("HelmReleasePropertyInstallFailureCount",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectStatusDefinitionInternal)this).HelmReleasePropertyInstallFailureCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("HelmReleasePropertyUpgradeFailureCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectStatusDefinitionInternal)this).HelmReleasePropertyUpgradeFailureCount = (long?) content.GetValueForProperty("HelmReleasePropertyUpgradeFailureCount",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectStatusDefinitionInternal)this).HelmReleasePropertyUpgradeFailureCount, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("HelmChartRefName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectStatusDefinitionInternal)this).HelmChartRefName = (string) content.GetValueForProperty("HelmChartRefName",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectStatusDefinitionInternal)this).HelmChartRefName, global::System.Convert.ToString); + } + if (content.Contains("HelmChartRefNamespace")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectStatusDefinitionInternal)this).HelmChartRefNamespace = (string) content.GetValueForProperty("HelmChartRefNamespace",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectStatusDefinitionInternal)this).HelmChartRefNamespace, 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.KubernetesConfiguration.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Statuses of objects deployed by the user-specified kustomizations from the git repository. + [System.ComponentModel.TypeConverter(typeof(ObjectStatusDefinitionTypeConverter))] + public partial interface IObjectStatusDefinition + + { + + } +} \ No newline at end of file diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20220301/ObjectStatusDefinition.TypeConverter.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/ObjectStatusDefinition.TypeConverter.cs new file mode 100644 index 000000000000..4059d55d42f6 --- /dev/null +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/ObjectStatusDefinition.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ObjectStatusDefinitionTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectStatusDefinition ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectStatusDefinition).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ObjectStatusDefinition.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ObjectStatusDefinition.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ObjectStatusDefinition.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/KubernetesConfiguration/generated/api/Models/Api20220301/ObjectStatusDefinition.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/ObjectStatusDefinition.cs new file mode 100644 index 000000000000..b3f6079aded7 --- /dev/null +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/ObjectStatusDefinition.cs @@ -0,0 +1,268 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; + + /// + /// Statuses of objects deployed by the user-specified kustomizations from the git repository. + /// + public partial class ObjectStatusDefinition : + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectStatusDefinition, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectStatusDefinitionInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectReferenceDefinition _appliedBy; + + /// Object reference to the Kustomization that applied this object + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectReferenceDefinition AppliedBy { get => (this._appliedBy = this._appliedBy ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ObjectReferenceDefinition()); set => this._appliedBy = value; } + + /// Name of the object + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] + public string AppliedByName { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectReferenceDefinitionInternal)AppliedBy).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectReferenceDefinitionInternal)AppliedBy).Name = value ?? null; } + + /// Namespace of the object + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] + public string AppliedByNamespace { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectReferenceDefinitionInternal)AppliedBy).Namespace; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectReferenceDefinitionInternal)AppliedBy).Namespace = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.FluxComplianceState? _complianceState; + + /// + /// Compliance state of the applied object showing whether the applied object has come into a ready state on the cluster. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.FluxComplianceState? ComplianceState { get => this._complianceState; set => this._complianceState = value; } + + /// Name of the object + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] + public string HelmChartRefName { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IHelmReleasePropertiesDefinitionInternal)HelmReleaseProperty).HelmChartRefName; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IHelmReleasePropertiesDefinitionInternal)HelmReleaseProperty).HelmChartRefName = value ?? null; } + + /// Namespace of the object + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] + public string HelmChartRefNamespace { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IHelmReleasePropertiesDefinitionInternal)HelmReleaseProperty).HelmChartRefNamespace; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IHelmReleasePropertiesDefinitionInternal)HelmReleaseProperty).HelmChartRefNamespace = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IHelmReleasePropertiesDefinition _helmReleaseProperty; + + /// Additional properties that are provided from objects of the HelmRelease kind + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IHelmReleasePropertiesDefinition HelmReleaseProperty { get => (this._helmReleaseProperty = this._helmReleaseProperty ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.HelmReleasePropertiesDefinition()); set => this._helmReleaseProperty = value; } + + /// Total number of times that the HelmRelease failed to install or upgrade + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] + public long? HelmReleasePropertyFailureCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IHelmReleasePropertiesDefinitionInternal)HelmReleaseProperty).FailureCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IHelmReleasePropertiesDefinitionInternal)HelmReleaseProperty).FailureCount = value ?? default(long); } + + /// Number of times that the HelmRelease failed to install + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] + public long? HelmReleasePropertyInstallFailureCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IHelmReleasePropertiesDefinitionInternal)HelmReleaseProperty).InstallFailureCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IHelmReleasePropertiesDefinitionInternal)HelmReleaseProperty).InstallFailureCount = value ?? default(long); } + + /// The revision number of the last released object change + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] + public long? HelmReleasePropertyLastRevisionApplied { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IHelmReleasePropertiesDefinitionInternal)HelmReleaseProperty).LastRevisionApplied; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IHelmReleasePropertiesDefinitionInternal)HelmReleaseProperty).LastRevisionApplied = value ?? default(long); } + + /// Number of times that the HelmRelease failed to upgrade + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] + public long? HelmReleasePropertyUpgradeFailureCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IHelmReleasePropertiesDefinitionInternal)HelmReleaseProperty).UpgradeFailureCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IHelmReleasePropertiesDefinitionInternal)HelmReleaseProperty).UpgradeFailureCount = value ?? default(long); } + + /// Backing field for property. + private string _kind; + + /// Kind of the applied object + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] + public string Kind { get => this._kind; set => this._kind = value; } + + /// Internal Acessors for AppliedBy + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectReferenceDefinition Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectStatusDefinitionInternal.AppliedBy { get => (this._appliedBy = this._appliedBy ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ObjectReferenceDefinition()); set { {_appliedBy = value;} } } + + /// Internal Acessors for HelmReleaseProperty + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IHelmReleasePropertiesDefinition Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectStatusDefinitionInternal.HelmReleaseProperty { get => (this._helmReleaseProperty = this._helmReleaseProperty ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.HelmReleasePropertiesDefinition()); set { {_helmReleaseProperty = value;} } } + + /// Internal Acessors for HelmReleasePropertyHelmChartRef + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectReferenceDefinition Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectStatusDefinitionInternal.HelmReleasePropertyHelmChartRef { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IHelmReleasePropertiesDefinitionInternal)HelmReleaseProperty).HelmChartRef; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IHelmReleasePropertiesDefinitionInternal)HelmReleaseProperty).HelmChartRef = value; } + + /// Backing field for property. + private string _name; + + /// Name of the applied object + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] + public string Name { get => this._name; set => this._name = value; } + + /// Backing field for property. + private string _namespace; + + /// Namespace of the applied object + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] + public string Namespace { get => this._namespace; set => this._namespace = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectStatusConditionDefinition[] _statusCondition; + + /// List of Kubernetes object status conditions present on the cluster + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectStatusConditionDefinition[] StatusCondition { get => this._statusCondition; set => this._statusCondition = value; } + + /// Creates an new instance. + public ObjectStatusDefinition() + { + + } + } + /// Statuses of objects deployed by the user-specified kustomizations from the git repository. + public partial interface IObjectStatusDefinition : + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IJsonSerializable + { + /// Name of the object + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Name of the object", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + string AppliedByName { get; set; } + /// Namespace of the object + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Namespace of the object", + SerializedName = @"namespace", + PossibleTypes = new [] { typeof(string) })] + string AppliedByNamespace { get; set; } + /// + /// Compliance state of the applied object showing whether the applied object has come into a ready state on the cluster. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Compliance state of the applied object showing whether the applied object has come into a ready state on the cluster.", + SerializedName = @"complianceState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.FluxComplianceState) })] + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.FluxComplianceState? ComplianceState { get; set; } + /// Name of the object + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Name of the object", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + string HelmChartRefName { get; set; } + /// Namespace of the object + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Namespace of the object", + SerializedName = @"namespace", + PossibleTypes = new [] { typeof(string) })] + string HelmChartRefNamespace { get; set; } + /// Total number of times that the HelmRelease failed to install or upgrade + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Total number of times that the HelmRelease failed to install or upgrade", + SerializedName = @"failureCount", + PossibleTypes = new [] { typeof(long) })] + long? HelmReleasePropertyFailureCount { get; set; } + /// Number of times that the HelmRelease failed to install + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Number of times that the HelmRelease failed to install", + SerializedName = @"installFailureCount", + PossibleTypes = new [] { typeof(long) })] + long? HelmReleasePropertyInstallFailureCount { get; set; } + /// The revision number of the last released object change + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The revision number of the last released object change", + SerializedName = @"lastRevisionApplied", + PossibleTypes = new [] { typeof(long) })] + long? HelmReleasePropertyLastRevisionApplied { get; set; } + /// Number of times that the HelmRelease failed to upgrade + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Number of times that the HelmRelease failed to upgrade", + SerializedName = @"upgradeFailureCount", + PossibleTypes = new [] { typeof(long) })] + long? HelmReleasePropertyUpgradeFailureCount { get; set; } + /// Kind of the applied object + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Kind of the applied object", + SerializedName = @"kind", + PossibleTypes = new [] { typeof(string) })] + string Kind { get; set; } + /// Name of the applied object + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Name of the applied object", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + string Name { get; set; } + /// Namespace of the applied object + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Namespace of the applied object", + SerializedName = @"namespace", + PossibleTypes = new [] { typeof(string) })] + string Namespace { get; set; } + /// List of Kubernetes object status conditions present on the cluster + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of Kubernetes object status conditions present on the cluster", + SerializedName = @"statusConditions", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectStatusConditionDefinition) })] + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectStatusConditionDefinition[] StatusCondition { get; set; } + + } + /// Statuses of objects deployed by the user-specified kustomizations from the git repository. + internal partial interface IObjectStatusDefinitionInternal + + { + /// Object reference to the Kustomization that applied this object + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectReferenceDefinition AppliedBy { get; set; } + /// Name of the object + string AppliedByName { get; set; } + /// Namespace of the object + string AppliedByNamespace { get; set; } + /// + /// Compliance state of the applied object showing whether the applied object has come into a ready state on the cluster. + /// + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.FluxComplianceState? ComplianceState { get; set; } + /// Name of the object + string HelmChartRefName { get; set; } + /// Namespace of the object + string HelmChartRefNamespace { get; set; } + /// Additional properties that are provided from objects of the HelmRelease kind + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IHelmReleasePropertiesDefinition HelmReleaseProperty { get; set; } + /// Total number of times that the HelmRelease failed to install or upgrade + long? HelmReleasePropertyFailureCount { get; set; } + /// The reference to the HelmChart object used as the source to this HelmRelease + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectReferenceDefinition HelmReleasePropertyHelmChartRef { get; set; } + /// Number of times that the HelmRelease failed to install + long? HelmReleasePropertyInstallFailureCount { get; set; } + /// The revision number of the last released object change + long? HelmReleasePropertyLastRevisionApplied { get; set; } + /// Number of times that the HelmRelease failed to upgrade + long? HelmReleasePropertyUpgradeFailureCount { get; set; } + /// Kind of the applied object + string Kind { get; set; } + /// Name of the applied object + string Name { get; set; } + /// Namespace of the applied object + string Namespace { get; set; } + /// List of Kubernetes object status conditions present on the cluster + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectStatusConditionDefinition[] StatusCondition { get; set; } + + } +} \ No newline at end of file diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20220301/ObjectStatusDefinition.json.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/ObjectStatusDefinition.json.cs new file mode 100644 index 000000000000..0fcb61fea2be --- /dev/null +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/ObjectStatusDefinition.json.cs @@ -0,0 +1,130 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; + + /// + /// Statuses of objects deployed by the user-specified kustomizations from the git repository. + /// + public partial class ObjectStatusDefinition + { + + /// + /// 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.KubernetesConfiguration.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectStatusDefinition. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectStatusDefinition. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IObjectStatusDefinition FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json ? new ObjectStatusDefinition(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject instance to deserialize from. + internal ObjectStatusDefinition(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_appliedBy = If( json?.PropertyT("appliedBy"), out var __jsonAppliedBy) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ObjectReferenceDefinition.FromJson(__jsonAppliedBy) : AppliedBy;} + {_helmReleaseProperty = If( json?.PropertyT("helmReleaseProperties"), out var __jsonHelmReleaseProperties) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.HelmReleasePropertiesDefinition.FromJson(__jsonHelmReleaseProperties) : HelmReleaseProperty;} + {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} + {_namespace = If( json?.PropertyT("namespace"), out var __jsonNamespace) ? (string)__jsonNamespace : (string)Namespace;} + {_kind = If( json?.PropertyT("kind"), out var __jsonKind) ? (string)__jsonKind : (string)Kind;} + {_complianceState = If( json?.PropertyT("complianceState"), out var __jsonComplianceState) ? (string)__jsonComplianceState : (string)ComplianceState;} + {_statusCondition = If( json?.PropertyT("statusConditions"), out var __jsonStatusConditions) ? If( __jsonStatusConditions as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20220301.IObjectStatusConditionDefinition) (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ObjectStatusConditionDefinition.FromJson(__u) )) ))() : null : StatusCondition;} + 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.KubernetesConfiguration.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._appliedBy ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) this._appliedBy.ToJson(null,serializationMode) : null, "appliedBy" ,container.Add ); + AddIf( null != this._helmReleaseProperty ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) this._helmReleaseProperty.ToJson(null,serializationMode) : null, "helmReleaseProperties" ,container.Add ); + AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); + AddIf( null != (((object)this._namespace)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonString(this._namespace.ToString()) : null, "namespace" ,container.Add ); + AddIf( null != (((object)this._kind)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonString(this._kind.ToString()) : null, "kind" ,container.Add ); + AddIf( null != (((object)this._complianceState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonString(this._complianceState.ToString()) : null, "complianceState" ,container.Add ); + if (null != this._statusCondition) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.XNodeArray(); + foreach( var __x in this._statusCondition ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("statusConditions",__w); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20210901/OperationStatusList.PowerShell.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/OperationStatusList.PowerShell.cs similarity index 70% rename from src/KubernetesConfiguration/generated/api/Models/Api20210901/OperationStatusList.PowerShell.cs rename to src/KubernetesConfiguration/generated/api/Models/Api20220301/OperationStatusList.PowerShell.cs index 374743a70aaa..8451bda84e7e 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Api20210901/OperationStatusList.PowerShell.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/OperationStatusList.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; @@ -31,7 +31,8 @@ public partial class OperationStatusList /// /// 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. + /// 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. @@ -43,7 +44,8 @@ public partial class OperationStatusList /// /// 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. + /// 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. @@ -61,29 +63,29 @@ public partial class OperationStatusList partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IOperationStatusList DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusList DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new OperationStatusList(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IOperationStatusList DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusList DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new OperationStatusList(content); } @@ -92,11 +94,11 @@ public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models. /// 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.KubernetesConfiguration.Models.Api20210901.IOperationStatusList FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusList FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -109,13 +111,19 @@ internal OperationStatusList(global::System.Collections.IDictionary content) return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IOperationStatusListInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IOperationStatusResult[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IOperationStatusListInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.OperationStatusResultTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IOperationStatusListInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IOperationStatusListInternal)this).NextLink, global::System.Convert.ToString); + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusListInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResult[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusListInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.OperationStatusResultTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusListInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusListInternal)this).NextLink, global::System.Convert.ToString); + } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -128,8 +136,14 @@ internal OperationStatusList(global::System.Management.Automation.PSObject conte return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IOperationStatusListInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IOperationStatusResult[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IOperationStatusListInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.OperationStatusResultTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IOperationStatusListInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IOperationStatusListInternal)this).NextLink, global::System.Convert.ToString); + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusListInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResult[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusListInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.OperationStatusResultTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusListInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusListInternal)this).NextLink, global::System.Convert.ToString); + } AfterDeserializePSObject(content); } diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20210901/OperationStatusList.TypeConverter.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/OperationStatusList.TypeConverter.cs similarity index 82% rename from src/KubernetesConfiguration/generated/api/Models/Api20210901/OperationStatusList.TypeConverter.cs rename to src/KubernetesConfiguration/generated/api/Models/Api20220301/OperationStatusList.TypeConverter.cs index 35e8d508b642..1070f1ffa9a5 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Api20210901/OperationStatusList.TypeConverter.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/OperationStatusList.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; @@ -14,20 +14,20 @@ public partial class OperationStatusListTypeConverter : global::System.Managemen { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// 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. + /// 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. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +75,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// 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 + /// 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 + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,21 +100,20 @@ public static bool CanConvertFrom(dynamic sourceValue) 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 + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IOperationStatusList ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusList ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IOperationStatusList).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusList).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20210901/OperationStatusList.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/OperationStatusList.cs similarity index 85% rename from src/KubernetesConfiguration/generated/api/Models/Api20210901/OperationStatusList.cs rename to src/KubernetesConfiguration/generated/api/Models/Api20220301/OperationStatusList.cs index d9f05ea03463..f7adaa197608 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Api20210901/OperationStatusList.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/OperationStatusList.cs @@ -3,21 +3,21 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; /// The async operations in progress, in the cluster. public partial class OperationStatusList : - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IOperationStatusList, - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IOperationStatusListInternal + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusList, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusListInternal { /// Internal Acessors for NextLink - string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IOperationStatusListInternal.NextLink { get => this._nextLink; set { {_nextLink = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusListInternal.NextLink { get => this._nextLink; set { {_nextLink = value;} } } /// Internal Acessors for Value - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IOperationStatusResult[] Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IOperationStatusListInternal.Value { get => this._value; set { {_value = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResult[] Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusListInternal.Value { get => this._value; set { {_value = value;} } } /// Backing field for property. private string _nextLink; @@ -27,11 +27,11 @@ public partial class OperationStatusList : public string NextLink { get => this._nextLink; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IOperationStatusResult[] _value; + private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResult[] _value; /// List of async operations in progress, in the cluster. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IOperationStatusResult[] Value { get => this._value; } + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResult[] Value { get => this._value; } /// Creates an new instance. public OperationStatusList() @@ -57,8 +57,8 @@ public partial interface IOperationStatusList : ReadOnly = true, Description = @"List of async operations in progress, in the cluster.", SerializedName = @"value", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IOperationStatusResult) })] - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IOperationStatusResult[] Value { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResult) })] + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResult[] Value { get; } } /// The async operations in progress, in the cluster. @@ -68,7 +68,7 @@ internal partial interface IOperationStatusListInternal /// URL to get the next set of Operation Result objects, if any. string NextLink { get; set; } /// List of async operations in progress, in the cluster. - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IOperationStatusResult[] Value { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResult[] Value { get; set; } } } \ No newline at end of file diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20210901/OperationStatusList.json.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/OperationStatusList.json.cs similarity index 91% rename from src/KubernetesConfiguration/generated/api/Models/Api20210901/OperationStatusList.json.cs rename to src/KubernetesConfiguration/generated/api/Models/Api20220301/OperationStatusList.json.cs index 6095f10083ed..0d7948710328 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Api20210901/OperationStatusList.json.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/OperationStatusList.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; @@ -20,7 +20,7 @@ public partial class OperationStatusList partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class OperationStatusList /// /// 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. + /// 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. @@ -42,7 +43,8 @@ public partial class OperationStatusList /// /// 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. + /// 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. @@ -52,13 +54,13 @@ public partial class OperationStatusList partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IOperationStatusList. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusList. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IOperationStatusList. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusList. /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IOperationStatusList FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusList FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json ? new OperationStatusList(json) : null; } @@ -75,7 +77,7 @@ internal OperationStatusList(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfig { return; } - {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20210901.IOperationStatusResult) (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.OperationStatusResult.FromJson(__u) )) ))() : null : Value;} + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20220301.IOperationStatusResult) (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.OperationStatusResult.FromJson(__u) )) ))() : null : Value;} {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} AfterFromJson(json); } diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20220301/OperationStatusResult.PowerShell.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/OperationStatusResult.PowerShell.cs new file mode 100644 index 000000000000..4df551a06253 --- /dev/null +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/OperationStatusResult.PowerShell.cs @@ -0,0 +1,238 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; + + /// The current status of an async operation. + [System.ComponentModel.TypeConverter(typeof(OperationStatusResultTypeConverter))] + public partial class OperationStatusResult + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new OperationStatusResult(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.KubernetesConfiguration.Models.Api20220301.IOperationStatusResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new OperationStatusResult(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.KubernetesConfiguration.Models.Api20220301.IOperationStatusResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal OperationStatusResult(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Error")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResultInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetail) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResultInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorDetailTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResultInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResultInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResultInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResultInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Status")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResultInternal)this).Status = (string) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResultInternal)this).Status, global::System.Convert.ToString); + } + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResultInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResultProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResultInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.OperationStatusResultPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Code")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResultInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResultInternal)this).Code, global::System.Convert.ToString); + } + if (content.Contains("Message")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResultInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResultInternal)this).Message, global::System.Convert.ToString); + } + if (content.Contains("Target")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResultInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResultInternal)this).Target, global::System.Convert.ToString); + } + if (content.Contains("Detail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResultInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetail[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResultInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorDetailTypeConverter.ConvertFrom)); + } + if (content.Contains("AdditionalInfo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResultInternal)this).AdditionalInfo = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorAdditionalInfo[]) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResultInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorAdditionalInfoTypeConverter.ConvertFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal OperationStatusResult(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Error")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResultInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetail) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResultInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorDetailTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResultInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResultInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResultInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResultInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Status")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResultInternal)this).Status = (string) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResultInternal)this).Status, global::System.Convert.ToString); + } + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResultInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResultProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResultInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.OperationStatusResultPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Code")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResultInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResultInternal)this).Code, global::System.Convert.ToString); + } + if (content.Contains("Message")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResultInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResultInternal)this).Message, global::System.Convert.ToString); + } + if (content.Contains("Target")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResultInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResultInternal)this).Target, global::System.Convert.ToString); + } + if (content.Contains("Detail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResultInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetail[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResultInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorDetailTypeConverter.ConvertFrom)); + } + if (content.Contains("AdditionalInfo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResultInternal)this).AdditionalInfo = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorAdditionalInfo[]) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResultInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorAdditionalInfoTypeConverter.ConvertFrom)); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The current status of an async operation. + [System.ComponentModel.TypeConverter(typeof(OperationStatusResultTypeConverter))] + public partial interface IOperationStatusResult + + { + + } +} \ No newline at end of file diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20210901/OperationStatusResult.TypeConverter.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/OperationStatusResult.TypeConverter.cs similarity index 82% rename from src/KubernetesConfiguration/generated/api/Models/Api20210901/OperationStatusResult.TypeConverter.cs rename to src/KubernetesConfiguration/generated/api/Models/Api20220301/OperationStatusResult.TypeConverter.cs index 8e1357a6e676..aa81be86ec0d 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Api20210901/OperationStatusResult.TypeConverter.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/OperationStatusResult.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; @@ -14,20 +14,20 @@ public partial class OperationStatusResultTypeConverter : global::System.Managem { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// 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. + /// 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. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +75,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// 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 + /// 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 + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,21 +100,20 @@ public static bool CanConvertFrom(dynamic sourceValue) 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 + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IOperationStatusResult ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResult ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IOperationStatusResult).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResult).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20210901/OperationStatusResult.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/OperationStatusResult.cs similarity index 90% rename from src/KubernetesConfiguration/generated/api/Models/Api20210901/OperationStatusResult.cs rename to src/KubernetesConfiguration/generated/api/Models/Api20220301/OperationStatusResult.cs index cf45f849f63f..e63d8f02f85a 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Api20210901/OperationStatusResult.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/OperationStatusResult.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; /// The current status of an async operation. public partial class OperationStatusResult : - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IOperationStatusResult, - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IOperationStatusResultInternal + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResult, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResultInternal { /// The error additional info. @@ -28,9 +28,9 @@ public partial class OperationStatusResult : /// Backing field for property. private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetail _error; - /// The error detail. + /// If present, details of the operation error. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetail Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorDetail()); set => this._error = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetail Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorDetail()); } /// Backing field for property. private string _id; @@ -44,22 +44,22 @@ public partial class OperationStatusResult : public string Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)Error).Message; } /// Internal Acessors for AdditionalInfo - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorAdditionalInfo[] Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IOperationStatusResultInternal.AdditionalInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)Error).AdditionalInfo; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)Error).AdditionalInfo = value; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorAdditionalInfo[] Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResultInternal.AdditionalInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)Error).AdditionalInfo; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)Error).AdditionalInfo = value; } /// Internal Acessors for Code - string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IOperationStatusResultInternal.Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)Error).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)Error).Code = value; } + string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResultInternal.Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)Error).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)Error).Code = value; } /// Internal Acessors for Detail - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetail[] Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IOperationStatusResultInternal.Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)Error).Detail; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)Error).Detail = value; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetail[] Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResultInternal.Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)Error).Detail; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)Error).Detail = value; } /// Internal Acessors for Error - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetail Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IOperationStatusResultInternal.Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorDetail()); set { {_error = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetail Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResultInternal.Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ErrorDetail()); set { {_error = value;} } } /// Internal Acessors for Message - string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IOperationStatusResultInternal.Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)Error).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)Error).Message = value; } + string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResultInternal.Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)Error).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)Error).Message = value; } /// Internal Acessors for Target - string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IOperationStatusResultInternal.Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)Error).Target; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)Error).Target = value; } + string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResultInternal.Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)Error).Target; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetailInternal)Error).Target = value; } /// Backing field for property. private string _name; @@ -69,15 +69,15 @@ public partial class OperationStatusResult : public string Name { get => this._name; set => this._name = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IOperationStatusResultProperties _property; + private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResultProperties _property; /// Additional information, if available. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IOperationStatusResultProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.OperationStatusResultProperties()); set => this._property = value; } + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResultProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.OperationStatusResultProperties()); set => this._property = value; } /// Gets the resource group name [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] - public string ResourceGroupName { get => (new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/").Match(this.Id).Success ? new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/").Match(this.Id).Groups["resourceGroupName"].Value : null); } + public string ResourceGroupName { get => (new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Success ? new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Groups["resourceGroupName"].Value : null); } /// Backing field for property. private string _status; @@ -154,8 +154,8 @@ public partial interface IOperationStatusResult : ReadOnly = false, Description = @"Additional information, if available.", SerializedName = @"properties", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IOperationStatusResultProperties) })] - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IOperationStatusResultProperties Property { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResultProperties) })] + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResultProperties Property { get; set; } /// Operation status. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = true, @@ -184,7 +184,7 @@ internal partial interface IOperationStatusResultInternal string Code { get; set; } /// The error details. Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetail[] Detail { get; set; } - /// The error detail. + /// If present, details of the operation error. Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorDetail Error { get; set; } /// Fully qualified ID for the async operation. string Id { get; set; } @@ -193,7 +193,7 @@ internal partial interface IOperationStatusResultInternal /// Name of the async operation. string Name { get; set; } /// Additional information, if available. - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IOperationStatusResultProperties Property { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResultProperties Property { get; set; } /// Operation status. string Status { get; set; } /// The error target. diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20210901/OperationStatusResult.json.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/OperationStatusResult.json.cs similarity index 88% rename from src/KubernetesConfiguration/generated/api/Models/Api20210901/OperationStatusResult.json.cs rename to src/KubernetesConfiguration/generated/api/Models/Api20220301/OperationStatusResult.json.cs index d1dbc7306c5f..b67c0b320527 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Api20210901/OperationStatusResult.json.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/OperationStatusResult.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; @@ -20,7 +20,7 @@ public partial class OperationStatusResult partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class OperationStatusResult /// /// 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. + /// 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. @@ -42,7 +43,8 @@ public partial class OperationStatusResult /// /// 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. + /// 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. @@ -52,13 +54,13 @@ public partial class OperationStatusResult partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IOperationStatusResult. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResult. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IOperationStatusResult. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResult. /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IOperationStatusResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json ? new OperationStatusResult(json) : null; } @@ -79,7 +81,7 @@ internal OperationStatusResult(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConf {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)Id;} {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} {_status = If( json?.PropertyT("status"), out var __jsonStatus) ? (string)__jsonStatus : (string)Status;} - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.OperationStatusResultProperties.FromJson(__jsonProperties) : Property;} + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.OperationStatusResultProperties.FromJson(__jsonProperties) : Property;} AfterFromJson(json); } @@ -102,7 +104,10 @@ public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.J { return container; } - AddIf( null != this._error ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) this._error.ToJson(null,serializationMode) : null, "error" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._error ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) this._error.ToJson(null,serializationMode) : null, "error" ,container.Add ); + } AddIf( null != (((object)this._id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonString(this._id.ToString()) : null, "id" ,container.Add ); AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); AddIf( null != (((object)this._status)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonString(this._status.ToString()) : null, "status" ,container.Add ); diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20210901/OperationStatusResultProperties.PowerShell.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/OperationStatusResultProperties.PowerShell.cs similarity index 90% rename from src/KubernetesConfiguration/generated/api/Models/Api20210901/OperationStatusResultProperties.PowerShell.cs rename to src/KubernetesConfiguration/generated/api/Models/Api20220301/OperationStatusResultProperties.PowerShell.cs index b1deb9153903..aa6e6a79ca18 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Api20210901/OperationStatusResultProperties.PowerShell.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/OperationStatusResultProperties.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; @@ -31,7 +31,8 @@ public partial class OperationStatusResultProperties /// /// 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. + /// 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. @@ -43,7 +44,8 @@ public partial class OperationStatusResultProperties /// /// 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. + /// 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. @@ -61,29 +63,29 @@ public partial class OperationStatusResultProperties partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IOperationStatusResultProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResultProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new OperationStatusResultProperties(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IOperationStatusResultProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResultProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new OperationStatusResultProperties(content); } @@ -92,11 +94,11 @@ public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models. /// 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.KubernetesConfiguration.Models.Api20210901.IOperationStatusResultProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResultProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -115,7 +117,7 @@ internal OperationStatusResultProperties(global::System.Collections.IDictionary } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20210901/OperationStatusResultProperties.TypeConverter.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/OperationStatusResultProperties.TypeConverter.cs similarity index 82% rename from src/KubernetesConfiguration/generated/api/Models/Api20210901/OperationStatusResultProperties.TypeConverter.cs rename to src/KubernetesConfiguration/generated/api/Models/Api20220301/OperationStatusResultProperties.TypeConverter.cs index 1421b92fd1f1..6072b112330a 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Api20210901/OperationStatusResultProperties.TypeConverter.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/OperationStatusResultProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; @@ -14,20 +14,20 @@ public partial class OperationStatusResultPropertiesTypeConverter : global::Syst { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// 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. + /// 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. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +75,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// 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 + /// 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 + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,21 +100,21 @@ public static bool CanConvertFrom(dynamic sourceValue) 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 + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IOperationStatusResultProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResultProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IOperationStatusResultProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResultProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20210901/OperationStatusResultProperties.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/OperationStatusResultProperties.cs similarity index 90% rename from src/KubernetesConfiguration/generated/api/Models/Api20210901/OperationStatusResultProperties.cs rename to src/KubernetesConfiguration/generated/api/Models/Api20220301/OperationStatusResultProperties.cs index da3dd2059535..d9d86b4b7de0 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Api20210901/OperationStatusResultProperties.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/OperationStatusResultProperties.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; /// Additional information, if available. public partial class OperationStatusResultProperties : - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IOperationStatusResultProperties, - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IOperationStatusResultPropertiesInternal + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResultProperties, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResultPropertiesInternal { /// Creates an new instance. diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20210901/OperationStatusResultProperties.dictionary.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/OperationStatusResultProperties.dictionary.cs similarity index 98% rename from src/KubernetesConfiguration/generated/api/Models/Api20210901/OperationStatusResultProperties.dictionary.cs rename to src/KubernetesConfiguration/generated/api/Models/Api20220301/OperationStatusResultProperties.dictionary.cs index 01fca6683654..35f331c5fc6f 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Api20210901/OperationStatusResultProperties.dictionary.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/OperationStatusResultProperties.dictionary.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; @@ -70,6 +70,6 @@ public void CopyFrom(global::System.Management.Automation.PSObject source) /// - public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.OperationStatusResultProperties source) => source.__additionalProperties; + public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.OperationStatusResultProperties source) => source.__additionalProperties; } } \ No newline at end of file diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20210901/OperationStatusResultProperties.json.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/OperationStatusResultProperties.json.cs similarity index 91% rename from src/KubernetesConfiguration/generated/api/Models/Api20210901/OperationStatusResultProperties.json.cs rename to src/KubernetesConfiguration/generated/api/Models/Api20220301/OperationStatusResultProperties.json.cs index 422950bbb6d5..3742f4c84722 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Api20210901/OperationStatusResultProperties.json.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/OperationStatusResultProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; @@ -20,7 +20,7 @@ public partial class OperationStatusResultProperties partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class OperationStatusResultProperties /// /// 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. + /// 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. @@ -42,7 +43,8 @@ public partial class OperationStatusResultProperties /// /// 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. + /// 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. @@ -52,13 +54,13 @@ public partial class OperationStatusResultProperties partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IOperationStatusResultProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResultProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IOperationStatusResultProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResultProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IOperationStatusResultProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResultProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json ? new OperationStatusResultProperties(json) : null; } diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20210901/PatchExtension.PowerShell.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/PatchExtension.PowerShell.cs similarity index 50% rename from src/KubernetesConfiguration/generated/api/Models/Api20210901/PatchExtension.PowerShell.cs rename to src/KubernetesConfiguration/generated/api/Models/Api20220301/PatchExtension.PowerShell.cs index 10d15a5f66b7..afc6d4132b85 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Api20210901/PatchExtension.PowerShell.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/PatchExtension.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; @@ -31,7 +31,8 @@ public partial class PatchExtension /// /// 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. + /// 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. @@ -43,7 +44,8 @@ public partial class PatchExtension /// /// 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. + /// 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. @@ -61,29 +63,29 @@ public partial class PatchExtension partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtension DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtension DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new PatchExtension(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtension DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtension DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new PatchExtension(content); } @@ -92,11 +94,11 @@ public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models. /// 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.KubernetesConfiguration.Models.Api20210901.IPatchExtension FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtension FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -109,17 +111,35 @@ internal PatchExtension(global::System.Collections.IDictionary content) return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtensionInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtensionProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtensionInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.PatchExtensionPropertiesTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtensionInternal)this).AutoUpgradeMinorVersion = (bool?) content.GetValueForProperty("AutoUpgradeMinorVersion",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtensionInternal)this).AutoUpgradeMinorVersion, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtensionInternal)this).ReleaseTrain = (string) content.GetValueForProperty("ReleaseTrain",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtensionInternal)this).ReleaseTrain, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtensionInternal)this).Version = (string) content.GetValueForProperty("Version",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtensionInternal)this).Version, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtensionInternal)this).ConfigurationSetting = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtensionPropertiesConfigurationSettings) content.GetValueForProperty("ConfigurationSetting",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtensionInternal)this).ConfigurationSetting, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.PatchExtensionPropertiesConfigurationSettingsTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtensionInternal)this).ConfigurationProtectedSetting = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtensionPropertiesConfigurationProtectedSettings) content.GetValueForProperty("ConfigurationProtectedSetting",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtensionInternal)this).ConfigurationProtectedSetting, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.PatchExtensionPropertiesConfigurationProtectedSettingsTypeConverter.ConvertFrom); + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtensionInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtensionProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtensionInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.PatchExtensionPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("AutoUpgradeMinorVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtensionInternal)this).AutoUpgradeMinorVersion = (bool?) content.GetValueForProperty("AutoUpgradeMinorVersion",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtensionInternal)this).AutoUpgradeMinorVersion, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ReleaseTrain")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtensionInternal)this).ReleaseTrain = (string) content.GetValueForProperty("ReleaseTrain",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtensionInternal)this).ReleaseTrain, global::System.Convert.ToString); + } + if (content.Contains("Version")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtensionInternal)this).Version = (string) content.GetValueForProperty("Version",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtensionInternal)this).Version, global::System.Convert.ToString); + } + if (content.Contains("ConfigurationSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtensionInternal)this).ConfigurationSetting = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtensionPropertiesConfigurationSettings) content.GetValueForProperty("ConfigurationSetting",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtensionInternal)this).ConfigurationSetting, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.PatchExtensionPropertiesConfigurationSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("ConfigurationProtectedSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtensionInternal)this).ConfigurationProtectedSetting = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtensionPropertiesConfigurationProtectedSettings) content.GetValueForProperty("ConfigurationProtectedSetting",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtensionInternal)this).ConfigurationProtectedSetting, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.PatchExtensionPropertiesConfigurationProtectedSettingsTypeConverter.ConvertFrom); + } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -132,12 +152,30 @@ internal PatchExtension(global::System.Management.Automation.PSObject content) return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtensionInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtensionProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtensionInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.PatchExtensionPropertiesTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtensionInternal)this).AutoUpgradeMinorVersion = (bool?) content.GetValueForProperty("AutoUpgradeMinorVersion",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtensionInternal)this).AutoUpgradeMinorVersion, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtensionInternal)this).ReleaseTrain = (string) content.GetValueForProperty("ReleaseTrain",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtensionInternal)this).ReleaseTrain, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtensionInternal)this).Version = (string) content.GetValueForProperty("Version",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtensionInternal)this).Version, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtensionInternal)this).ConfigurationSetting = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtensionPropertiesConfigurationSettings) content.GetValueForProperty("ConfigurationSetting",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtensionInternal)this).ConfigurationSetting, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.PatchExtensionPropertiesConfigurationSettingsTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtensionInternal)this).ConfigurationProtectedSetting = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtensionPropertiesConfigurationProtectedSettings) content.GetValueForProperty("ConfigurationProtectedSetting",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtensionInternal)this).ConfigurationProtectedSetting, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.PatchExtensionPropertiesConfigurationProtectedSettingsTypeConverter.ConvertFrom); + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtensionInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtensionProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtensionInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.PatchExtensionPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("AutoUpgradeMinorVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtensionInternal)this).AutoUpgradeMinorVersion = (bool?) content.GetValueForProperty("AutoUpgradeMinorVersion",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtensionInternal)this).AutoUpgradeMinorVersion, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ReleaseTrain")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtensionInternal)this).ReleaseTrain = (string) content.GetValueForProperty("ReleaseTrain",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtensionInternal)this).ReleaseTrain, global::System.Convert.ToString); + } + if (content.Contains("Version")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtensionInternal)this).Version = (string) content.GetValueForProperty("Version",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtensionInternal)this).Version, global::System.Convert.ToString); + } + if (content.Contains("ConfigurationSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtensionInternal)this).ConfigurationSetting = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtensionPropertiesConfigurationSettings) content.GetValueForProperty("ConfigurationSetting",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtensionInternal)this).ConfigurationSetting, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.PatchExtensionPropertiesConfigurationSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("ConfigurationProtectedSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtensionInternal)this).ConfigurationProtectedSetting = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtensionPropertiesConfigurationProtectedSettings) content.GetValueForProperty("ConfigurationProtectedSetting",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtensionInternal)this).ConfigurationProtectedSetting, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.PatchExtensionPropertiesConfigurationProtectedSettingsTypeConverter.ConvertFrom); + } AfterDeserializePSObject(content); } diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20210901/PatchExtension.TypeConverter.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/PatchExtension.TypeConverter.cs similarity index 82% rename from src/KubernetesConfiguration/generated/api/Models/Api20210901/PatchExtension.TypeConverter.cs rename to src/KubernetesConfiguration/generated/api/Models/Api20220301/PatchExtension.TypeConverter.cs index 0b8a5f855ba9..871a383ab7c2 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Api20210901/PatchExtension.TypeConverter.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/PatchExtension.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; @@ -14,20 +14,20 @@ public partial class PatchExtensionTypeConverter : global::System.Management.Aut { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// 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. + /// 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. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +75,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// 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 + /// 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 + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,21 +100,20 @@ public static bool CanConvertFrom(dynamic sourceValue) 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 + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtension ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtension ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtension).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtension).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20210901/PatchExtension.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/PatchExtension.cs similarity index 84% rename from src/KubernetesConfiguration/generated/api/Models/Api20210901/PatchExtension.cs rename to src/KubernetesConfiguration/generated/api/Models/Api20220301/PatchExtension.cs index 1febb44212c4..dc30e0789fce 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Api20210901/PatchExtension.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/PatchExtension.cs @@ -3,55 +3,55 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; /// The Extension Patch Request object. public partial class PatchExtension : - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtension, - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtensionInternal + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtension, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtensionInternal { /// /// Flag to note if this extension participates in auto upgrade of minor version, or not. /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public bool? AutoUpgradeMinorVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtensionPropertiesInternal)Property).AutoUpgradeMinorVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtensionPropertiesInternal)Property).AutoUpgradeMinorVersion = value ?? default(bool); } + public bool? AutoUpgradeMinorVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtensionPropertiesInternal)Property).AutoUpgradeMinorVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtensionPropertiesInternal)Property).AutoUpgradeMinorVersion = value ?? default(bool); } /// /// Configuration settings that are sensitive, as name-value pairs for configuring this extension. /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtensionPropertiesConfigurationProtectedSettings ConfigurationProtectedSetting { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtensionPropertiesInternal)Property).ConfigurationProtectedSetting; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtensionPropertiesInternal)Property).ConfigurationProtectedSetting = value ?? null /* model class */; } + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtensionPropertiesConfigurationProtectedSettings ConfigurationProtectedSetting { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtensionPropertiesInternal)Property).ConfigurationProtectedSetting; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtensionPropertiesInternal)Property).ConfigurationProtectedSetting = value ?? null /* model class */; } /// Configuration settings, as name-value pairs for configuring this extension. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtensionPropertiesConfigurationSettings ConfigurationSetting { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtensionPropertiesInternal)Property).ConfigurationSetting; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtensionPropertiesInternal)Property).ConfigurationSetting = value ?? null /* model class */; } + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtensionPropertiesConfigurationSettings ConfigurationSetting { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtensionPropertiesInternal)Property).ConfigurationSetting; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtensionPropertiesInternal)Property).ConfigurationSetting = value ?? null /* model class */; } /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtensionProperties Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtensionInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.PatchExtensionProperties()); set { {_property = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtensionProperties Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtensionInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.PatchExtensionProperties()); set { {_property = value;} } } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtensionProperties _property; + private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtensionProperties _property; /// Updatable properties of an Extension Patch Request [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtensionProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.PatchExtensionProperties()); set => this._property = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtensionProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.PatchExtensionProperties()); set => this._property = value; } /// /// ReleaseTrain this extension participates in for auto-upgrade (e.g. Stable, Preview, etc.) - only if autoUpgradeMinorVersion /// is 'true'. /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string ReleaseTrain { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtensionPropertiesInternal)Property).ReleaseTrain; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtensionPropertiesInternal)Property).ReleaseTrain = value ?? null; } + public string ReleaseTrain { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtensionPropertiesInternal)Property).ReleaseTrain; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtensionPropertiesInternal)Property).ReleaseTrain = value ?? null; } /// /// Version of the extension for this extension, if it is 'pinned' to a specific version. autoUpgradeMinorVersion must be /// 'false'. /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string Version { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtensionPropertiesInternal)Property).Version; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtensionPropertiesInternal)Property).Version = value ?? null; } + public string Version { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtensionPropertiesInternal)Property).Version; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtensionPropertiesInternal)Property).Version = value ?? null; } /// Creates an new instance. public PatchExtension() @@ -81,16 +81,16 @@ public partial interface IPatchExtension : ReadOnly = false, Description = @"Configuration settings that are sensitive, as name-value pairs for configuring this extension.", SerializedName = @"configurationProtectedSettings", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtensionPropertiesConfigurationProtectedSettings) })] - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtensionPropertiesConfigurationProtectedSettings ConfigurationProtectedSetting { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtensionPropertiesConfigurationProtectedSettings) })] + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtensionPropertiesConfigurationProtectedSettings ConfigurationProtectedSetting { get; set; } /// Configuration settings, as name-value pairs for configuring this extension. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, Description = @"Configuration settings, as name-value pairs for configuring this extension.", SerializedName = @"configurationSettings", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtensionPropertiesConfigurationSettings) })] - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtensionPropertiesConfigurationSettings ConfigurationSetting { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtensionPropertiesConfigurationSettings) })] + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtensionPropertiesConfigurationSettings ConfigurationSetting { get; set; } /// /// ReleaseTrain this extension participates in for auto-upgrade (e.g. Stable, Preview, etc.) - only if autoUpgradeMinorVersion /// is 'true'. @@ -126,11 +126,11 @@ internal partial interface IPatchExtensionInternal /// /// Configuration settings that are sensitive, as name-value pairs for configuring this extension. /// - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtensionPropertiesConfigurationProtectedSettings ConfigurationProtectedSetting { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtensionPropertiesConfigurationProtectedSettings ConfigurationProtectedSetting { get; set; } /// Configuration settings, as name-value pairs for configuring this extension. - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtensionPropertiesConfigurationSettings ConfigurationSetting { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtensionPropertiesConfigurationSettings ConfigurationSetting { get; set; } /// Updatable properties of an Extension Patch Request - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtensionProperties Property { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtensionProperties Property { get; set; } /// /// ReleaseTrain this extension participates in for auto-upgrade (e.g. Stable, Preview, etc.) - only if autoUpgradeMinorVersion /// is 'true'. diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20210901/PatchExtension.json.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/PatchExtension.json.cs similarity index 91% rename from src/KubernetesConfiguration/generated/api/Models/Api20210901/PatchExtension.json.cs rename to src/KubernetesConfiguration/generated/api/Models/Api20220301/PatchExtension.json.cs index c88c5eaf2170..78119e744ac1 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Api20210901/PatchExtension.json.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/PatchExtension.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; @@ -20,7 +20,7 @@ public partial class PatchExtension partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class PatchExtension /// /// 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. + /// 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. @@ -42,7 +43,8 @@ public partial class PatchExtension /// /// 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. + /// 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. @@ -52,13 +54,13 @@ public partial class PatchExtension partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtension. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtension. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtension. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtension. /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtension FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtension FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json ? new PatchExtension(json) : null; } @@ -75,7 +77,7 @@ internal PatchExtension(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfigurati { return; } - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.PatchExtensionProperties.FromJson(__jsonProperties) : Property;} + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.PatchExtensionProperties.FromJson(__jsonProperties) : Property;} AfterFromJson(json); } diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20210901/PatchExtensionProperties.PowerShell.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/PatchExtensionProperties.PowerShell.cs similarity index 54% rename from src/KubernetesConfiguration/generated/api/Models/Api20210901/PatchExtensionProperties.PowerShell.cs rename to src/KubernetesConfiguration/generated/api/Models/Api20220301/PatchExtensionProperties.PowerShell.cs index b64a426bee92..f0a0f3c570c6 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Api20210901/PatchExtensionProperties.PowerShell.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/PatchExtensionProperties.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; @@ -31,7 +31,8 @@ public partial class PatchExtensionProperties /// /// 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. + /// 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. @@ -43,7 +44,8 @@ public partial class PatchExtensionProperties /// /// 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. + /// 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. @@ -61,29 +63,29 @@ public partial class PatchExtensionProperties partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtensionProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtensionProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new PatchExtensionProperties(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtensionProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtensionProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new PatchExtensionProperties(content); } @@ -92,11 +94,11 @@ public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models. /// 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.KubernetesConfiguration.Models.Api20210901.IPatchExtensionProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtensionProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -109,16 +111,31 @@ internal PatchExtensionProperties(global::System.Collections.IDictionary content return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtensionPropertiesInternal)this).AutoUpgradeMinorVersion = (bool?) content.GetValueForProperty("AutoUpgradeMinorVersion",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtensionPropertiesInternal)this).AutoUpgradeMinorVersion, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtensionPropertiesInternal)this).ReleaseTrain = (string) content.GetValueForProperty("ReleaseTrain",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtensionPropertiesInternal)this).ReleaseTrain, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtensionPropertiesInternal)this).Version = (string) content.GetValueForProperty("Version",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtensionPropertiesInternal)this).Version, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtensionPropertiesInternal)this).ConfigurationSetting = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtensionPropertiesConfigurationSettings) content.GetValueForProperty("ConfigurationSetting",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtensionPropertiesInternal)this).ConfigurationSetting, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.PatchExtensionPropertiesConfigurationSettingsTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtensionPropertiesInternal)this).ConfigurationProtectedSetting = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtensionPropertiesConfigurationProtectedSettings) content.GetValueForProperty("ConfigurationProtectedSetting",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtensionPropertiesInternal)this).ConfigurationProtectedSetting, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.PatchExtensionPropertiesConfigurationProtectedSettingsTypeConverter.ConvertFrom); + if (content.Contains("AutoUpgradeMinorVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtensionPropertiesInternal)this).AutoUpgradeMinorVersion = (bool?) content.GetValueForProperty("AutoUpgradeMinorVersion",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtensionPropertiesInternal)this).AutoUpgradeMinorVersion, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ReleaseTrain")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtensionPropertiesInternal)this).ReleaseTrain = (string) content.GetValueForProperty("ReleaseTrain",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtensionPropertiesInternal)this).ReleaseTrain, global::System.Convert.ToString); + } + if (content.Contains("Version")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtensionPropertiesInternal)this).Version = (string) content.GetValueForProperty("Version",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtensionPropertiesInternal)this).Version, global::System.Convert.ToString); + } + if (content.Contains("ConfigurationSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtensionPropertiesInternal)this).ConfigurationSetting = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtensionPropertiesConfigurationSettings) content.GetValueForProperty("ConfigurationSetting",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtensionPropertiesInternal)this).ConfigurationSetting, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.PatchExtensionPropertiesConfigurationSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("ConfigurationProtectedSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtensionPropertiesInternal)this).ConfigurationProtectedSetting = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtensionPropertiesConfigurationProtectedSettings) content.GetValueForProperty("ConfigurationProtectedSetting",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtensionPropertiesInternal)this).ConfigurationProtectedSetting, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.PatchExtensionPropertiesConfigurationProtectedSettingsTypeConverter.ConvertFrom); + } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -131,11 +148,26 @@ internal PatchExtensionProperties(global::System.Management.Automation.PSObject return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtensionPropertiesInternal)this).AutoUpgradeMinorVersion = (bool?) content.GetValueForProperty("AutoUpgradeMinorVersion",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtensionPropertiesInternal)this).AutoUpgradeMinorVersion, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtensionPropertiesInternal)this).ReleaseTrain = (string) content.GetValueForProperty("ReleaseTrain",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtensionPropertiesInternal)this).ReleaseTrain, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtensionPropertiesInternal)this).Version = (string) content.GetValueForProperty("Version",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtensionPropertiesInternal)this).Version, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtensionPropertiesInternal)this).ConfigurationSetting = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtensionPropertiesConfigurationSettings) content.GetValueForProperty("ConfigurationSetting",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtensionPropertiesInternal)this).ConfigurationSetting, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.PatchExtensionPropertiesConfigurationSettingsTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtensionPropertiesInternal)this).ConfigurationProtectedSetting = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtensionPropertiesConfigurationProtectedSettings) content.GetValueForProperty("ConfigurationProtectedSetting",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtensionPropertiesInternal)this).ConfigurationProtectedSetting, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.PatchExtensionPropertiesConfigurationProtectedSettingsTypeConverter.ConvertFrom); + if (content.Contains("AutoUpgradeMinorVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtensionPropertiesInternal)this).AutoUpgradeMinorVersion = (bool?) content.GetValueForProperty("AutoUpgradeMinorVersion",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtensionPropertiesInternal)this).AutoUpgradeMinorVersion, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ReleaseTrain")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtensionPropertiesInternal)this).ReleaseTrain = (string) content.GetValueForProperty("ReleaseTrain",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtensionPropertiesInternal)this).ReleaseTrain, global::System.Convert.ToString); + } + if (content.Contains("Version")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtensionPropertiesInternal)this).Version = (string) content.GetValueForProperty("Version",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtensionPropertiesInternal)this).Version, global::System.Convert.ToString); + } + if (content.Contains("ConfigurationSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtensionPropertiesInternal)this).ConfigurationSetting = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtensionPropertiesConfigurationSettings) content.GetValueForProperty("ConfigurationSetting",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtensionPropertiesInternal)this).ConfigurationSetting, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.PatchExtensionPropertiesConfigurationSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("ConfigurationProtectedSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtensionPropertiesInternal)this).ConfigurationProtectedSetting = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtensionPropertiesConfigurationProtectedSettings) content.GetValueForProperty("ConfigurationProtectedSetting",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtensionPropertiesInternal)this).ConfigurationProtectedSetting, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.PatchExtensionPropertiesConfigurationProtectedSettingsTypeConverter.ConvertFrom); + } AfterDeserializePSObject(content); } diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20210901/PatchExtensionProperties.TypeConverter.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/PatchExtensionProperties.TypeConverter.cs similarity index 82% rename from src/KubernetesConfiguration/generated/api/Models/Api20210901/PatchExtensionProperties.TypeConverter.cs rename to src/KubernetesConfiguration/generated/api/Models/Api20220301/PatchExtensionProperties.TypeConverter.cs index 3c6f52c500eb..c81d58510862 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Api20210901/PatchExtensionProperties.TypeConverter.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/PatchExtensionProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; @@ -14,20 +14,20 @@ public partial class PatchExtensionPropertiesTypeConverter : global::System.Mana { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// 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. + /// 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. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +75,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// 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 + /// 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 + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,21 +100,20 @@ public static bool CanConvertFrom(dynamic sourceValue) 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 + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtensionProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtensionProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtensionProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtensionProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20210901/PatchExtensionProperties.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/PatchExtensionProperties.cs similarity index 90% rename from src/KubernetesConfiguration/generated/api/Models/Api20210901/PatchExtensionProperties.cs rename to src/KubernetesConfiguration/generated/api/Models/Api20220301/PatchExtensionProperties.cs index 68aab7f59805..43751ed31209 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Api20210901/PatchExtensionProperties.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/PatchExtensionProperties.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; /// Updatable properties of an Extension Patch Request public partial class PatchExtensionProperties : - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtensionProperties, - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtensionPropertiesInternal + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtensionProperties, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtensionPropertiesInternal { /// Backing field for property. @@ -23,20 +23,20 @@ public partial class PatchExtensionProperties : public bool? AutoUpgradeMinorVersion { get => this._autoUpgradeMinorVersion; set => this._autoUpgradeMinorVersion = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtensionPropertiesConfigurationProtectedSettings _configurationProtectedSetting; + private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtensionPropertiesConfigurationProtectedSettings _configurationProtectedSetting; /// /// Configuration settings that are sensitive, as name-value pairs for configuring this extension. /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtensionPropertiesConfigurationProtectedSettings ConfigurationProtectedSetting { get => (this._configurationProtectedSetting = this._configurationProtectedSetting ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.PatchExtensionPropertiesConfigurationProtectedSettings()); set => this._configurationProtectedSetting = value; } + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtensionPropertiesConfigurationProtectedSettings ConfigurationProtectedSetting { get => (this._configurationProtectedSetting = this._configurationProtectedSetting ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.PatchExtensionPropertiesConfigurationProtectedSettings()); set => this._configurationProtectedSetting = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtensionPropertiesConfigurationSettings _configurationSetting; + private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtensionPropertiesConfigurationSettings _configurationSetting; /// Configuration settings, as name-value pairs for configuring this extension. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtensionPropertiesConfigurationSettings ConfigurationSetting { get => (this._configurationSetting = this._configurationSetting ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.PatchExtensionPropertiesConfigurationSettings()); set => this._configurationSetting = value; } + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtensionPropertiesConfigurationSettings ConfigurationSetting { get => (this._configurationSetting = this._configurationSetting ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.PatchExtensionPropertiesConfigurationSettings()); set => this._configurationSetting = value; } /// Backing field for property. private string _releaseTrain; @@ -86,16 +86,16 @@ public partial interface IPatchExtensionProperties : ReadOnly = false, Description = @"Configuration settings that are sensitive, as name-value pairs for configuring this extension.", SerializedName = @"configurationProtectedSettings", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtensionPropertiesConfigurationProtectedSettings) })] - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtensionPropertiesConfigurationProtectedSettings ConfigurationProtectedSetting { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtensionPropertiesConfigurationProtectedSettings) })] + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtensionPropertiesConfigurationProtectedSettings ConfigurationProtectedSetting { get; set; } /// Configuration settings, as name-value pairs for configuring this extension. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, Description = @"Configuration settings, as name-value pairs for configuring this extension.", SerializedName = @"configurationSettings", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtensionPropertiesConfigurationSettings) })] - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtensionPropertiesConfigurationSettings ConfigurationSetting { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtensionPropertiesConfigurationSettings) })] + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtensionPropertiesConfigurationSettings ConfigurationSetting { get; set; } /// /// ReleaseTrain this extension participates in for auto-upgrade (e.g. Stable, Preview, etc.) - only if autoUpgradeMinorVersion /// is 'true'. @@ -131,9 +131,9 @@ internal partial interface IPatchExtensionPropertiesInternal /// /// Configuration settings that are sensitive, as name-value pairs for configuring this extension. /// - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtensionPropertiesConfigurationProtectedSettings ConfigurationProtectedSetting { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtensionPropertiesConfigurationProtectedSettings ConfigurationProtectedSetting { get; set; } /// Configuration settings, as name-value pairs for configuring this extension. - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtensionPropertiesConfigurationSettings ConfigurationSetting { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtensionPropertiesConfigurationSettings ConfigurationSetting { get; set; } /// /// ReleaseTrain this extension participates in for auto-upgrade (e.g. Stable, Preview, etc.) - only if autoUpgradeMinorVersion /// is 'true'. diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20210901/PatchExtensionProperties.json.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/PatchExtensionProperties.json.cs similarity index 92% rename from src/KubernetesConfiguration/generated/api/Models/Api20210901/PatchExtensionProperties.json.cs rename to src/KubernetesConfiguration/generated/api/Models/Api20220301/PatchExtensionProperties.json.cs index 59ae9cd8b365..996305c254b0 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Api20210901/PatchExtensionProperties.json.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/PatchExtensionProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; @@ -20,7 +20,7 @@ public partial class PatchExtensionProperties partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class PatchExtensionProperties /// /// 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. + /// 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. @@ -42,7 +43,8 @@ public partial class PatchExtensionProperties /// /// 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. + /// 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. @@ -52,13 +54,13 @@ public partial class PatchExtensionProperties partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtensionProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtensionProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtensionProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtensionProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtensionProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtensionProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json ? new PatchExtensionProperties(json) : null; } @@ -78,8 +80,8 @@ internal PatchExtensionProperties(Microsoft.Azure.PowerShell.Cmdlets.KubernetesC {_autoUpgradeMinorVersion = If( json?.PropertyT("autoUpgradeMinorVersion"), out var __jsonAutoUpgradeMinorVersion) ? (bool?)__jsonAutoUpgradeMinorVersion : AutoUpgradeMinorVersion;} {_releaseTrain = If( json?.PropertyT("releaseTrain"), out var __jsonReleaseTrain) ? (string)__jsonReleaseTrain : (string)ReleaseTrain;} {_version = If( json?.PropertyT("version"), out var __jsonVersion) ? (string)__jsonVersion : (string)Version;} - {_configurationSetting = If( json?.PropertyT("configurationSettings"), out var __jsonConfigurationSettings) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.PatchExtensionPropertiesConfigurationSettings.FromJson(__jsonConfigurationSettings) : ConfigurationSetting;} - {_configurationProtectedSetting = If( json?.PropertyT("configurationProtectedSettings"), out var __jsonConfigurationProtectedSettings) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.PatchExtensionPropertiesConfigurationProtectedSettings.FromJson(__jsonConfigurationProtectedSettings) : ConfigurationProtectedSetting;} + {_configurationSetting = If( json?.PropertyT("configurationSettings"), out var __jsonConfigurationSettings) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.PatchExtensionPropertiesConfigurationSettings.FromJson(__jsonConfigurationSettings) : ConfigurationSetting;} + {_configurationProtectedSetting = If( json?.PropertyT("configurationProtectedSettings"), out var __jsonConfigurationProtectedSettings) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.PatchExtensionPropertiesConfigurationProtectedSettings.FromJson(__jsonConfigurationProtectedSettings) : ConfigurationProtectedSetting;} AfterFromJson(json); } diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20210901/PatchExtensionPropertiesConfigurationProtectedSettings.PowerShell.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/PatchExtensionPropertiesConfigurationProtectedSettings.PowerShell.cs similarity index 89% rename from src/KubernetesConfiguration/generated/api/Models/Api20210901/PatchExtensionPropertiesConfigurationProtectedSettings.PowerShell.cs rename to src/KubernetesConfiguration/generated/api/Models/Api20220301/PatchExtensionPropertiesConfigurationProtectedSettings.PowerShell.cs index c1d406226fe4..4bcd55bb5d11 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Api20210901/PatchExtensionPropertiesConfigurationProtectedSettings.PowerShell.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/PatchExtensionPropertiesConfigurationProtectedSettings.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; @@ -33,7 +33,8 @@ public partial class PatchExtensionPropertiesConfigurationProtectedSettings /// /// 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. + /// 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. @@ -45,7 +46,8 @@ public partial class PatchExtensionPropertiesConfigurationProtectedSettings /// /// 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. + /// 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. @@ -63,29 +65,29 @@ public partial class PatchExtensionPropertiesConfigurationProtectedSettings partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtensionPropertiesConfigurationProtectedSettings DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtensionPropertiesConfigurationProtectedSettings DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new PatchExtensionPropertiesConfigurationProtectedSettings(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtensionPropertiesConfigurationProtectedSettings DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtensionPropertiesConfigurationProtectedSettings DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new PatchExtensionPropertiesConfigurationProtectedSettings(content); } @@ -95,11 +97,13 @@ public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models. /// 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.KubernetesConfiguration.Models.Api20210901.IPatchExtensionPropertiesConfigurationProtectedSettings FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtensionPropertiesConfigurationProtectedSettings FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -118,7 +122,7 @@ internal PatchExtensionPropertiesConfigurationProtectedSettings(global::System.C } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20210901/PatchExtensionPropertiesConfigurationProtectedSettings.TypeConverter.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/PatchExtensionPropertiesConfigurationProtectedSettings.TypeConverter.cs similarity index 82% rename from src/KubernetesConfiguration/generated/api/Models/Api20210901/PatchExtensionPropertiesConfigurationProtectedSettings.TypeConverter.cs rename to src/KubernetesConfiguration/generated/api/Models/Api20220301/PatchExtensionPropertiesConfigurationProtectedSettings.TypeConverter.cs index 18b4ea2d8b81..da833df572e4 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Api20210901/PatchExtensionPropertiesConfigurationProtectedSettings.TypeConverter.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/PatchExtensionPropertiesConfigurationProtectedSettings.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; @@ -15,20 +15,20 @@ public partial class PatchExtensionPropertiesConfigurationProtectedSettingsTypeC { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// 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. + /// 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. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -77,19 +77,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// 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 + /// 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 + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -102,8 +103,8 @@ public static bool CanConvertFrom(dynamic sourceValue) 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 + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . @@ -111,14 +112,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// an instance of , or null if there is no suitable /// conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtensionPropertiesConfigurationProtectedSettings ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtensionPropertiesConfigurationProtectedSettings ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtensionPropertiesConfigurationProtectedSettings).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtensionPropertiesConfigurationProtectedSettings).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20210901/PatchExtensionPropertiesConfigurationProtectedSettings.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/PatchExtensionPropertiesConfigurationProtectedSettings.cs similarity index 91% rename from src/KubernetesConfiguration/generated/api/Models/Api20210901/PatchExtensionPropertiesConfigurationProtectedSettings.cs rename to src/KubernetesConfiguration/generated/api/Models/Api20220301/PatchExtensionPropertiesConfigurationProtectedSettings.cs index 6ea716ccfa06..958f52fc9ec6 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Api20210901/PatchExtensionPropertiesConfigurationProtectedSettings.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/PatchExtensionPropertiesConfigurationProtectedSettings.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; @@ -11,8 +11,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api2 /// Configuration settings that are sensitive, as name-value pairs for configuring this extension. /// public partial class PatchExtensionPropertiesConfigurationProtectedSettings : - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtensionPropertiesConfigurationProtectedSettings, - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtensionPropertiesConfigurationProtectedSettingsInternal + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtensionPropertiesConfigurationProtectedSettings, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtensionPropertiesConfigurationProtectedSettingsInternal { /// diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20210901/PatchExtensionPropertiesConfigurationProtectedSettings.dictionary.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/PatchExtensionPropertiesConfigurationProtectedSettings.dictionary.cs similarity index 98% rename from src/KubernetesConfiguration/generated/api/Models/Api20210901/PatchExtensionPropertiesConfigurationProtectedSettings.dictionary.cs rename to src/KubernetesConfiguration/generated/api/Models/Api20220301/PatchExtensionPropertiesConfigurationProtectedSettings.dictionary.cs index 2909cbbc7208..a9d0997fd5be 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Api20210901/PatchExtensionPropertiesConfigurationProtectedSettings.dictionary.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/PatchExtensionPropertiesConfigurationProtectedSettings.dictionary.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; @@ -70,6 +70,6 @@ public void CopyFrom(global::System.Management.Automation.PSObject source) /// - public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.PatchExtensionPropertiesConfigurationProtectedSettings source) => source.__additionalProperties; + public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.PatchExtensionPropertiesConfigurationProtectedSettings source) => source.__additionalProperties; } } \ No newline at end of file diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20210901/PatchExtensionPropertiesConfigurationProtectedSettings.json.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/PatchExtensionPropertiesConfigurationProtectedSettings.json.cs similarity index 92% rename from src/KubernetesConfiguration/generated/api/Models/Api20210901/PatchExtensionPropertiesConfigurationProtectedSettings.json.cs rename to src/KubernetesConfiguration/generated/api/Models/Api20220301/PatchExtensionPropertiesConfigurationProtectedSettings.json.cs index 0cdc607b11db..2ebf504ae7e7 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Api20210901/PatchExtensionPropertiesConfigurationProtectedSettings.json.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/PatchExtensionPropertiesConfigurationProtectedSettings.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; @@ -22,7 +22,7 @@ public partial class PatchExtensionPropertiesConfigurationProtectedSettings partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -32,7 +32,8 @@ public partial class PatchExtensionPropertiesConfigurationProtectedSettings /// /// 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. + /// 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. @@ -44,7 +45,8 @@ public partial class PatchExtensionPropertiesConfigurationProtectedSettings /// /// 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. + /// 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. @@ -54,13 +56,13 @@ public partial class PatchExtensionPropertiesConfigurationProtectedSettings partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtensionPropertiesConfigurationProtectedSettings. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtensionPropertiesConfigurationProtectedSettings. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtensionPropertiesConfigurationProtectedSettings. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtensionPropertiesConfigurationProtectedSettings. /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtensionPropertiesConfigurationProtectedSettings FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtensionPropertiesConfigurationProtectedSettings FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json ? new PatchExtensionPropertiesConfigurationProtectedSettings(json) : null; } diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20210901/PatchExtensionPropertiesConfigurationSettings.PowerShell.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/PatchExtensionPropertiesConfigurationSettings.PowerShell.cs similarity index 89% rename from src/KubernetesConfiguration/generated/api/Models/Api20210901/PatchExtensionPropertiesConfigurationSettings.PowerShell.cs rename to src/KubernetesConfiguration/generated/api/Models/Api20220301/PatchExtensionPropertiesConfigurationSettings.PowerShell.cs index b87c6531bb9c..eb41d0717cff 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Api20210901/PatchExtensionPropertiesConfigurationSettings.PowerShell.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/PatchExtensionPropertiesConfigurationSettings.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; @@ -31,7 +31,8 @@ public partial class PatchExtensionPropertiesConfigurationSettings /// /// 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. + /// 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. @@ -43,7 +44,8 @@ public partial class PatchExtensionPropertiesConfigurationSettings /// /// 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. + /// 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. @@ -61,29 +63,29 @@ public partial class PatchExtensionPropertiesConfigurationSettings partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtensionPropertiesConfigurationSettings DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtensionPropertiesConfigurationSettings DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new PatchExtensionPropertiesConfigurationSettings(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtensionPropertiesConfigurationSettings DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtensionPropertiesConfigurationSettings DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new PatchExtensionPropertiesConfigurationSettings(content); } @@ -93,11 +95,13 @@ public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models. /// 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.KubernetesConfiguration.Models.Api20210901.IPatchExtensionPropertiesConfigurationSettings FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtensionPropertiesConfigurationSettings FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -116,7 +120,7 @@ internal PatchExtensionPropertiesConfigurationSettings(global::System.Collection } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20210901/PatchExtensionPropertiesConfigurationSettings.TypeConverter.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/PatchExtensionPropertiesConfigurationSettings.TypeConverter.cs similarity index 82% rename from src/KubernetesConfiguration/generated/api/Models/Api20210901/PatchExtensionPropertiesConfigurationSettings.TypeConverter.cs rename to src/KubernetesConfiguration/generated/api/Models/Api20220301/PatchExtensionPropertiesConfigurationSettings.TypeConverter.cs index a13c5c48b19e..f7e71725e8db 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Api20210901/PatchExtensionPropertiesConfigurationSettings.TypeConverter.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/PatchExtensionPropertiesConfigurationSettings.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; @@ -15,20 +15,20 @@ public partial class PatchExtensionPropertiesConfigurationSettingsTypeConverter { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// 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. + /// 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. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -77,19 +77,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// 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 + /// 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 + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -101,22 +102,22 @@ public static bool CanConvertFrom(dynamic sourceValue) 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 + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtensionPropertiesConfigurationSettings ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtensionPropertiesConfigurationSettings ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtensionPropertiesConfigurationSettings).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtensionPropertiesConfigurationSettings).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20210901/PatchExtensionPropertiesConfigurationSettings.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/PatchExtensionPropertiesConfigurationSettings.cs similarity index 91% rename from src/KubernetesConfiguration/generated/api/Models/Api20210901/PatchExtensionPropertiesConfigurationSettings.cs rename to src/KubernetesConfiguration/generated/api/Models/Api20220301/PatchExtensionPropertiesConfigurationSettings.cs index c97ba925bd28..ed8ca3da6c39 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Api20210901/PatchExtensionPropertiesConfigurationSettings.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/PatchExtensionPropertiesConfigurationSettings.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; /// Configuration settings, as name-value pairs for configuring this extension. public partial class PatchExtensionPropertiesConfigurationSettings : - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtensionPropertiesConfigurationSettings, - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtensionPropertiesConfigurationSettingsInternal + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtensionPropertiesConfigurationSettings, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtensionPropertiesConfigurationSettingsInternal { /// diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20210901/PatchExtensionPropertiesConfigurationSettings.dictionary.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/PatchExtensionPropertiesConfigurationSettings.dictionary.cs similarity index 98% rename from src/KubernetesConfiguration/generated/api/Models/Api20210901/PatchExtensionPropertiesConfigurationSettings.dictionary.cs rename to src/KubernetesConfiguration/generated/api/Models/Api20220301/PatchExtensionPropertiesConfigurationSettings.dictionary.cs index 7262329910e9..0b462c90fa45 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Api20210901/PatchExtensionPropertiesConfigurationSettings.dictionary.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/PatchExtensionPropertiesConfigurationSettings.dictionary.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; @@ -70,6 +70,6 @@ public void CopyFrom(global::System.Management.Automation.PSObject source) /// - public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.PatchExtensionPropertiesConfigurationSettings source) => source.__additionalProperties; + public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.PatchExtensionPropertiesConfigurationSettings source) => source.__additionalProperties; } } \ No newline at end of file diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20210901/PatchExtensionPropertiesConfigurationSettings.json.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/PatchExtensionPropertiesConfigurationSettings.json.cs similarity index 92% rename from src/KubernetesConfiguration/generated/api/Models/Api20210901/PatchExtensionPropertiesConfigurationSettings.json.cs rename to src/KubernetesConfiguration/generated/api/Models/Api20220301/PatchExtensionPropertiesConfigurationSettings.json.cs index 9dd695869dba..17f703d6d022 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Api20210901/PatchExtensionPropertiesConfigurationSettings.json.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/PatchExtensionPropertiesConfigurationSettings.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; @@ -20,7 +20,7 @@ public partial class PatchExtensionPropertiesConfigurationSettings partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class PatchExtensionPropertiesConfigurationSettings /// /// 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. + /// 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. @@ -42,7 +43,8 @@ public partial class PatchExtensionPropertiesConfigurationSettings /// /// 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. + /// 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. @@ -52,13 +54,13 @@ public partial class PatchExtensionPropertiesConfigurationSettings partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtensionPropertiesConfigurationSettings. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtensionPropertiesConfigurationSettings. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtensionPropertiesConfigurationSettings. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtensionPropertiesConfigurationSettings. /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtensionPropertiesConfigurationSettings FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtensionPropertiesConfigurationSettings FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json ? new PatchExtensionPropertiesConfigurationSettings(json) : null; } diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20210901/ResourceProviderOperationListAutoGenerated.PowerShell.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/RepositoryRefDefinition.PowerShell.cs similarity index 56% rename from src/KubernetesConfiguration/generated/api/Models/Api20210901/ResourceProviderOperationListAutoGenerated.PowerShell.cs rename to src/KubernetesConfiguration/generated/api/Models/Api20220301/RepositoryRefDefinition.PowerShell.cs index a0c4988b681a..4f360dd73d12 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Api20210901/ResourceProviderOperationListAutoGenerated.PowerShell.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/RepositoryRefDefinition.PowerShell.cs @@ -3,13 +3,13 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; - /// Result of the request to list operations. - [System.ComponentModel.TypeConverter(typeof(ResourceProviderOperationListAutoGeneratedTypeConverter))] - public partial class ResourceProviderOperationListAutoGenerated + /// The source reference for the GitRepository object. + [System.ComponentModel.TypeConverter(typeof(RepositoryRefDefinitionTypeConverter))] + public partial class RepositoryRefDefinition { /// @@ -31,7 +31,8 @@ public partial class ResourceProviderOperationListAutoGenerated /// /// 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. + /// 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. @@ -43,7 +44,8 @@ public partial class ResourceProviderOperationListAutoGenerated /// /// 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. + /// 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. @@ -61,47 +63,46 @@ public partial class ResourceProviderOperationListAutoGenerated partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IResourceProviderOperationListAutoGenerated DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IRepositoryRefDefinition DeserializeFromDictionary(global::System.Collections.IDictionary content) { - return new ResourceProviderOperationListAutoGenerated(content); + return new RepositoryRefDefinition(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IResourceProviderOperationListAutoGenerated DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IRepositoryRefDefinition DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { - return new ResourceProviderOperationListAutoGenerated(content); + return new RepositoryRefDefinition(content); } /// - /// Creates a new instance of , deserializing the content from a - /// json string. + /// Creates a new instance of , deserializing the content from a json string. /// /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IResourceProviderOperationListAutoGenerated FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IRepositoryRefDefinition FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. - internal ResourceProviderOperationListAutoGenerated(global::System.Collections.IDictionary content) + internal RepositoryRefDefinition(global::System.Collections.IDictionary content) { bool returnNow = false; BeforeDeserializeDictionary(content, ref returnNow); @@ -110,17 +111,31 @@ internal ResourceProviderOperationListAutoGenerated(global::System.Collections.I return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IResourceProviderOperationListAutoGeneratedInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IResourceProviderOperationAutoGenerated[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IResourceProviderOperationListAutoGeneratedInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.ResourceProviderOperationAutoGeneratedTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IResourceProviderOperationListAutoGeneratedInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IResourceProviderOperationListAutoGeneratedInternal)this).NextLink, global::System.Convert.ToString); + if (content.Contains("Branch")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IRepositoryRefDefinitionInternal)this).Branch = (string) content.GetValueForProperty("Branch",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IRepositoryRefDefinitionInternal)this).Branch, global::System.Convert.ToString); + } + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IRepositoryRefDefinitionInternal)this).Tag = (string) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IRepositoryRefDefinitionInternal)this).Tag, global::System.Convert.ToString); + } + if (content.Contains("Semver")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IRepositoryRefDefinitionInternal)this).Semver = (string) content.GetValueForProperty("Semver",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IRepositoryRefDefinitionInternal)this).Semver, global::System.Convert.ToString); + } + if (content.Contains("Commit")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IRepositoryRefDefinitionInternal)this).Commit = (string) content.GetValueForProperty("Commit",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IRepositoryRefDefinitionInternal)this).Commit, global::System.Convert.ToString); + } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. - internal ResourceProviderOperationListAutoGenerated(global::System.Management.Automation.PSObject content) + internal RepositoryRefDefinition(global::System.Management.Automation.PSObject content) { bool returnNow = false; BeforeDeserializePSObject(content, ref returnNow); @@ -129,8 +144,22 @@ internal ResourceProviderOperationListAutoGenerated(global::System.Management.Au return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IResourceProviderOperationListAutoGeneratedInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IResourceProviderOperationAutoGenerated[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IResourceProviderOperationListAutoGeneratedInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.ResourceProviderOperationAutoGeneratedTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IResourceProviderOperationListAutoGeneratedInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IResourceProviderOperationListAutoGeneratedInternal)this).NextLink, global::System.Convert.ToString); + if (content.Contains("Branch")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IRepositoryRefDefinitionInternal)this).Branch = (string) content.GetValueForProperty("Branch",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IRepositoryRefDefinitionInternal)this).Branch, global::System.Convert.ToString); + } + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IRepositoryRefDefinitionInternal)this).Tag = (string) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IRepositoryRefDefinitionInternal)this).Tag, global::System.Convert.ToString); + } + if (content.Contains("Semver")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IRepositoryRefDefinitionInternal)this).Semver = (string) content.GetValueForProperty("Semver",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IRepositoryRefDefinitionInternal)this).Semver, global::System.Convert.ToString); + } + if (content.Contains("Commit")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IRepositoryRefDefinitionInternal)this).Commit = (string) content.GetValueForProperty("Commit",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IRepositoryRefDefinitionInternal)this).Commit, global::System.Convert.ToString); + } AfterDeserializePSObject(content); } @@ -151,9 +180,9 @@ public override string ToString() return ToJsonString(); } } - /// Result of the request to list operations. - [System.ComponentModel.TypeConverter(typeof(ResourceProviderOperationListAutoGeneratedTypeConverter))] - public partial interface IResourceProviderOperationListAutoGenerated + /// The source reference for the GitRepository object. + [System.ComponentModel.TypeConverter(typeof(RepositoryRefDefinitionTypeConverter))] + public partial interface IRepositoryRefDefinition { diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20220301/RepositoryRefDefinition.TypeConverter.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/RepositoryRefDefinition.TypeConverter.cs new file mode 100644 index 000000000000..bdcf5d980861 --- /dev/null +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/RepositoryRefDefinition.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class RepositoryRefDefinitionTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IRepositoryRefDefinition ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IRepositoryRefDefinition).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return RepositoryRefDefinition.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return RepositoryRefDefinition.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return RepositoryRefDefinition.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/KubernetesConfiguration/generated/api/Models/Api20220301/RepositoryRefDefinition.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/RepositoryRefDefinition.cs new file mode 100644 index 000000000000..8b74397e7b13 --- /dev/null +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/RepositoryRefDefinition.cs @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; + + /// The source reference for the GitRepository object. + public partial class RepositoryRefDefinition : + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IRepositoryRefDefinition, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IRepositoryRefDefinitionInternal + { + + /// Backing field for property. + private string _branch; + + /// The git repository branch name to checkout. + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] + public string Branch { get => this._branch; set => this._branch = value; } + + /// Backing field for property. + private string _commit; + + /// + /// The commit SHA to checkout. This value must be combined with the branch name to be valid. This takes precedence over semver. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] + public string Commit { get => this._commit; set => this._commit = value; } + + /// Backing field for property. + private string _semver; + + /// + /// The semver range used to match against git repository tags. This takes precedence over tag. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] + public string Semver { get => this._semver; set => this._semver = value; } + + /// Backing field for property. + private string _tag; + + /// The git repository tag name to checkout. This takes precedence over branch. + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] + public string Tag { get => this._tag; set => this._tag = value; } + + /// Creates an new instance. + public RepositoryRefDefinition() + { + + } + } + /// The source reference for the GitRepository object. + public partial interface IRepositoryRefDefinition : + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IJsonSerializable + { + /// The git repository branch name to checkout. + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The git repository branch name to checkout.", + SerializedName = @"branch", + PossibleTypes = new [] { typeof(string) })] + string Branch { get; set; } + /// + /// The commit SHA to checkout. This value must be combined with the branch name to be valid. This takes precedence over semver. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The commit SHA to checkout. This value must be combined with the branch name to be valid. This takes precedence over semver.", + SerializedName = @"commit", + PossibleTypes = new [] { typeof(string) })] + string Commit { get; set; } + /// + /// The semver range used to match against git repository tags. This takes precedence over tag. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The semver range used to match against git repository tags. This takes precedence over tag.", + SerializedName = @"semver", + PossibleTypes = new [] { typeof(string) })] + string Semver { get; set; } + /// The git repository tag name to checkout. This takes precedence over branch. + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The git repository tag name to checkout. This takes precedence over branch.", + SerializedName = @"tag", + PossibleTypes = new [] { typeof(string) })] + string Tag { get; set; } + + } + /// The source reference for the GitRepository object. + internal partial interface IRepositoryRefDefinitionInternal + + { + /// The git repository branch name to checkout. + string Branch { get; set; } + /// + /// The commit SHA to checkout. This value must be combined with the branch name to be valid. This takes precedence over semver. + /// + string Commit { get; set; } + /// + /// The semver range used to match against git repository tags. This takes precedence over tag. + /// + string Semver { get; set; } + /// The git repository tag name to checkout. This takes precedence over branch. + string Tag { get; set; } + + } +} \ No newline at end of file diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20220301/RepositoryRefDefinition.json.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/RepositoryRefDefinition.json.cs new file mode 100644 index 000000000000..5e435ee323d2 --- /dev/null +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/RepositoryRefDefinition.json.cs @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; + + /// The source reference for the GitRepository object. + public partial class RepositoryRefDefinition + { + + /// + /// 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.KubernetesConfiguration.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IRepositoryRefDefinition. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IRepositoryRefDefinition. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IRepositoryRefDefinition FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json ? new RepositoryRefDefinition(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject instance to deserialize from. + internal RepositoryRefDefinition(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_branch = If( json?.PropertyT("branch"), out var __jsonBranch) ? (string)__jsonBranch : (string)Branch;} + {_tag = If( json?.PropertyT("tag"), out var __jsonTag) ? (string)__jsonTag : (string)Tag;} + {_semver = If( json?.PropertyT("semver"), out var __jsonSemver) ? (string)__jsonSemver : (string)Semver;} + {_commit = If( json?.PropertyT("commit"), out var __jsonCommit) ? (string)__jsonCommit : (string)Commit;} + 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.KubernetesConfiguration.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._branch)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonString(this._branch.ToString()) : null, "branch" ,container.Add ); + AddIf( null != (((object)this._tag)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonString(this._tag.ToString()) : null, "tag" ,container.Add ); + AddIf( null != (((object)this._semver)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonString(this._semver.ToString()) : null, "semver" ,container.Add ); + AddIf( null != (((object)this._commit)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonString(this._commit.ToString()) : null, "commit" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20220301/ResourceProviderOperation.PowerShell.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/ResourceProviderOperation.PowerShell.cs new file mode 100644 index 000000000000..ea1258a2822c --- /dev/null +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/ResourceProviderOperation.PowerShell.cs @@ -0,0 +1,222 @@ +// 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.KubernetesConfiguration.Models.Api20220301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; + + /// Supported operation of this resource provider. + [System.ComponentModel.TypeConverter(typeof(ResourceProviderOperationTypeConverter))] + public partial class ResourceProviderOperation + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperation DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ResourceProviderOperation(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.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperation DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ResourceProviderOperation(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.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperation FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ResourceProviderOperation(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Display")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationInternal)this).Display = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationDisplay) content.GetValueForProperty("Display",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationInternal)this).Display, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ResourceProviderOperationDisplayTypeConverter.ConvertFrom); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("IsDataAction")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationInternal)this).IsDataAction = (bool?) content.GetValueForProperty("IsDataAction",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationInternal)this).IsDataAction, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("Origin")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationInternal)this).Origin = (string) content.GetValueForProperty("Origin",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationInternal)this).Origin, global::System.Convert.ToString); + } + if (content.Contains("DisplayProvider")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationInternal)this).DisplayProvider = (string) content.GetValueForProperty("DisplayProvider",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationInternal)this).DisplayProvider, global::System.Convert.ToString); + } + if (content.Contains("DisplayResource")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationInternal)this).DisplayResource = (string) content.GetValueForProperty("DisplayResource",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationInternal)this).DisplayResource, global::System.Convert.ToString); + } + if (content.Contains("DisplayOperation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationInternal)this).DisplayOperation = (string) content.GetValueForProperty("DisplayOperation",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationInternal)this).DisplayOperation, global::System.Convert.ToString); + } + if (content.Contains("DisplayDescription")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationInternal)this).DisplayDescription = (string) content.GetValueForProperty("DisplayDescription",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationInternal)this).DisplayDescription, 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 ResourceProviderOperation(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Display")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationInternal)this).Display = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationDisplay) content.GetValueForProperty("Display",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationInternal)this).Display, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ResourceProviderOperationDisplayTypeConverter.ConvertFrom); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("IsDataAction")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationInternal)this).IsDataAction = (bool?) content.GetValueForProperty("IsDataAction",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationInternal)this).IsDataAction, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("Origin")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationInternal)this).Origin = (string) content.GetValueForProperty("Origin",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationInternal)this).Origin, global::System.Convert.ToString); + } + if (content.Contains("DisplayProvider")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationInternal)this).DisplayProvider = (string) content.GetValueForProperty("DisplayProvider",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationInternal)this).DisplayProvider, global::System.Convert.ToString); + } + if (content.Contains("DisplayResource")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationInternal)this).DisplayResource = (string) content.GetValueForProperty("DisplayResource",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationInternal)this).DisplayResource, global::System.Convert.ToString); + } + if (content.Contains("DisplayOperation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationInternal)this).DisplayOperation = (string) content.GetValueForProperty("DisplayOperation",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationInternal)this).DisplayOperation, global::System.Convert.ToString); + } + if (content.Contains("DisplayDescription")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationInternal)this).DisplayDescription = (string) content.GetValueForProperty("DisplayDescription",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationInternal)this).DisplayDescription, 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.KubernetesConfiguration.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Supported operation of this resource provider. + [System.ComponentModel.TypeConverter(typeof(ResourceProviderOperationTypeConverter))] + public partial interface IResourceProviderOperation + + { + + } +} \ No newline at end of file diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20210301/ResourceProviderOperation.TypeConverter.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/ResourceProviderOperation.TypeConverter.cs similarity index 82% rename from src/KubernetesConfiguration/generated/api/Models/Api20210301/ResourceProviderOperation.TypeConverter.cs rename to src/KubernetesConfiguration/generated/api/Models/Api20220301/ResourceProviderOperation.TypeConverter.cs index 3fc89fc28846..6cdc6874867a 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Api20210301/ResourceProviderOperation.TypeConverter.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/ResourceProviderOperation.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; @@ -14,20 +14,20 @@ public partial class ResourceProviderOperationTypeConverter : global::System.Man { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// 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. + /// 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. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +75,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// 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 + /// 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 + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,21 +100,20 @@ public static bool CanConvertFrom(dynamic sourceValue) 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 + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IResourceProviderOperation ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperation ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IResourceProviderOperation).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperation).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20210301/ResourceProviderOperation.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/ResourceProviderOperation.cs similarity index 79% rename from src/KubernetesConfiguration/generated/api/Models/Api20210301/ResourceProviderOperation.cs rename to src/KubernetesConfiguration/generated/api/Models/Api20220301/ResourceProviderOperation.cs index f031fd34f5e2..e4c960ca06dc 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Api20210301/ResourceProviderOperation.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/ResourceProviderOperation.cs @@ -3,38 +3,38 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; /// Supported operation of this resource provider. public partial class ResourceProviderOperation : - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IResourceProviderOperation, - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IResourceProviderOperationInternal + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperation, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationInternal { /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IResourceProviderOperationDisplay _display; + private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationDisplay _display; /// Display metadata associated with the operation. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IResourceProviderOperationDisplay Display { get => (this._display = this._display ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ResourceProviderOperationDisplay()); set => this._display = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationDisplay Display { get => (this._display = this._display ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ResourceProviderOperationDisplay()); set => this._display = value; } /// Description of this operation. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string DisplayDescription { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IResourceProviderOperationDisplayInternal)Display).Description; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IResourceProviderOperationDisplayInternal)Display).Description = value ?? null; } + public string DisplayDescription { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationDisplayInternal)Display).Description; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationDisplayInternal)Display).Description = value ?? null; } /// Type of operation: get, read, delete, etc. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string DisplayOperation { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IResourceProviderOperationDisplayInternal)Display).Operation; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IResourceProviderOperationDisplayInternal)Display).Operation = value ?? null; } + public string DisplayOperation { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationDisplayInternal)Display).Operation; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationDisplayInternal)Display).Operation = value ?? null; } /// Resource provider: Microsoft KubernetesConfiguration. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string DisplayProvider { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IResourceProviderOperationDisplayInternal)Display).Provider; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IResourceProviderOperationDisplayInternal)Display).Provider = value ?? null; } + public string DisplayProvider { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationDisplayInternal)Display).Provider; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationDisplayInternal)Display).Provider = value ?? null; } /// Resource on which the operation is performed. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string DisplayResource { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IResourceProviderOperationDisplayInternal)Display).Resource; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IResourceProviderOperationDisplayInternal)Display).Resource = value ?? null; } + public string DisplayResource { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationDisplayInternal)Display).Resource; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationDisplayInternal)Display).Resource = value ?? null; } /// Backing field for property. private bool? _isDataAction; @@ -44,10 +44,13 @@ public partial class ResourceProviderOperation : public bool? IsDataAction { get => this._isDataAction; } /// Internal Acessors for Display - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IResourceProviderOperationDisplay Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IResourceProviderOperationInternal.Display { get => (this._display = this._display ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ResourceProviderOperationDisplay()); set { {_display = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationDisplay Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationInternal.Display { get => (this._display = this._display ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ResourceProviderOperationDisplay()); set { {_display = value;} } } /// Internal Acessors for IsDataAction - bool? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IResourceProviderOperationInternal.IsDataAction { get => this._isDataAction; set { {_isDataAction = value;} } } + bool? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationInternal.IsDataAction { get => this._isDataAction; set { {_isDataAction = value;} } } + + /// Internal Acessors for Origin + string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationInternal.Origin { get => this._origin; set { {_origin = value;} } } /// Backing field for property. private string _name; @@ -56,6 +59,13 @@ public partial class ResourceProviderOperation : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] public string Name { get => this._name; set => this._name = value; } + /// Backing field for property. + private string _origin; + + /// Origin of the operation + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] + public string Origin { get => this._origin; } + /// Creates an new instance. public ResourceProviderOperation() { @@ -114,6 +124,14 @@ public partial interface IResourceProviderOperation : SerializedName = @"name", PossibleTypes = new [] { typeof(string) })] string Name { get; set; } + /// Origin of the operation + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Origin of the operation", + SerializedName = @"origin", + PossibleTypes = new [] { typeof(string) })] + string Origin { get; } } /// Supported operation of this resource provider. @@ -121,7 +139,7 @@ internal partial interface IResourceProviderOperationInternal { /// Display metadata associated with the operation. - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IResourceProviderOperationDisplay Display { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationDisplay Display { get; set; } /// Description of this operation. string DisplayDescription { get; set; } /// Type of operation: get, read, delete, etc. @@ -134,6 +152,8 @@ internal partial interface IResourceProviderOperationInternal bool? IsDataAction { get; set; } /// Operation name, in format of {provider}/{resource}/{operation} string Name { get; set; } + /// Origin of the operation + string Origin { get; set; } } } \ No newline at end of file diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20210301/ResourceProviderOperation.json.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/ResourceProviderOperation.json.cs similarity index 85% rename from src/KubernetesConfiguration/generated/api/Models/Api20210301/ResourceProviderOperation.json.cs rename to src/KubernetesConfiguration/generated/api/Models/Api20220301/ResourceProviderOperation.json.cs index f34da3610f2e..e9601d54e061 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Api20210301/ResourceProviderOperation.json.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/ResourceProviderOperation.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; @@ -20,7 +20,7 @@ public partial class ResourceProviderOperation partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class ResourceProviderOperation /// /// 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. + /// 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. @@ -42,7 +43,8 @@ public partial class ResourceProviderOperation /// /// 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. + /// 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. @@ -52,13 +54,13 @@ public partial class ResourceProviderOperation partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IResourceProviderOperation. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperation. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IResourceProviderOperation. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperation. /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IResourceProviderOperation FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperation FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json ? new ResourceProviderOperation(json) : null; } @@ -75,9 +77,10 @@ internal ResourceProviderOperation(Microsoft.Azure.PowerShell.Cmdlets.Kubernetes { return; } - {_display = If( json?.PropertyT("display"), out var __jsonDisplay) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ResourceProviderOperationDisplay.FromJson(__jsonDisplay) : Display;} + {_display = If( json?.PropertyT("display"), out var __jsonDisplay) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ResourceProviderOperationDisplay.FromJson(__jsonDisplay) : Display;} {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} {_isDataAction = If( json?.PropertyT("isDataAction"), out var __jsonIsDataAction) ? (bool?)__jsonIsDataAction : IsDataAction;} + {_origin = If( json?.PropertyT("origin"), out var __jsonOrigin) ? (string)__jsonOrigin : (string)Origin;} AfterFromJson(json); } @@ -106,6 +109,10 @@ public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.J { AddIf( null != this._isDataAction ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonBoolean((bool)this._isDataAction) : null, "isDataAction" ,container.Add ); } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._origin)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonString(this._origin.ToString()) : null, "origin" ,container.Add ); + } AfterToJson(ref container); return container; } diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20210301/ResourceProviderOperationDisplay.PowerShell.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/ResourceProviderOperationDisplay.PowerShell.cs similarity index 64% rename from src/KubernetesConfiguration/generated/api/Models/Api20210301/ResourceProviderOperationDisplay.PowerShell.cs rename to src/KubernetesConfiguration/generated/api/Models/Api20220301/ResourceProviderOperationDisplay.PowerShell.cs index 3c35c73a5e77..25c296de65f8 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Api20210301/ResourceProviderOperationDisplay.PowerShell.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/ResourceProviderOperationDisplay.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; @@ -31,7 +31,8 @@ public partial class ResourceProviderOperationDisplay /// /// 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. + /// 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. @@ -43,7 +44,8 @@ public partial class ResourceProviderOperationDisplay /// /// 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. + /// 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. @@ -61,29 +63,29 @@ public partial class ResourceProviderOperationDisplay partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IResourceProviderOperationDisplay DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationDisplay DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ResourceProviderOperationDisplay(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IResourceProviderOperationDisplay DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationDisplay DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ResourceProviderOperationDisplay(content); } @@ -92,11 +94,11 @@ public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models. /// 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.KubernetesConfiguration.Models.Api20210301.IResourceProviderOperationDisplay FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationDisplay FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -109,15 +111,27 @@ internal ResourceProviderOperationDisplay(global::System.Collections.IDictionary return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IResourceProviderOperationDisplayInternal)this).Provider = (string) content.GetValueForProperty("Provider",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IResourceProviderOperationDisplayInternal)this).Provider, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IResourceProviderOperationDisplayInternal)this).Resource = (string) content.GetValueForProperty("Resource",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IResourceProviderOperationDisplayInternal)this).Resource, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IResourceProviderOperationDisplayInternal)this).Operation = (string) content.GetValueForProperty("Operation",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IResourceProviderOperationDisplayInternal)this).Operation, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IResourceProviderOperationDisplayInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IResourceProviderOperationDisplayInternal)this).Description, global::System.Convert.ToString); + if (content.Contains("Provider")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationDisplayInternal)this).Provider = (string) content.GetValueForProperty("Provider",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationDisplayInternal)this).Provider, global::System.Convert.ToString); + } + if (content.Contains("Resource")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationDisplayInternal)this).Resource = (string) content.GetValueForProperty("Resource",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationDisplayInternal)this).Resource, global::System.Convert.ToString); + } + if (content.Contains("Operation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationDisplayInternal)this).Operation = (string) content.GetValueForProperty("Operation",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationDisplayInternal)this).Operation, global::System.Convert.ToString); + } + if (content.Contains("Description")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationDisplayInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationDisplayInternal)this).Description, global::System.Convert.ToString); + } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -130,10 +144,22 @@ internal ResourceProviderOperationDisplay(global::System.Management.Automation.P return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IResourceProviderOperationDisplayInternal)this).Provider = (string) content.GetValueForProperty("Provider",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IResourceProviderOperationDisplayInternal)this).Provider, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IResourceProviderOperationDisplayInternal)this).Resource = (string) content.GetValueForProperty("Resource",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IResourceProviderOperationDisplayInternal)this).Resource, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IResourceProviderOperationDisplayInternal)this).Operation = (string) content.GetValueForProperty("Operation",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IResourceProviderOperationDisplayInternal)this).Operation, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IResourceProviderOperationDisplayInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IResourceProviderOperationDisplayInternal)this).Description, global::System.Convert.ToString); + if (content.Contains("Provider")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationDisplayInternal)this).Provider = (string) content.GetValueForProperty("Provider",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationDisplayInternal)this).Provider, global::System.Convert.ToString); + } + if (content.Contains("Resource")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationDisplayInternal)this).Resource = (string) content.GetValueForProperty("Resource",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationDisplayInternal)this).Resource, global::System.Convert.ToString); + } + if (content.Contains("Operation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationDisplayInternal)this).Operation = (string) content.GetValueForProperty("Operation",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationDisplayInternal)this).Operation, global::System.Convert.ToString); + } + if (content.Contains("Description")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationDisplayInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationDisplayInternal)this).Description, global::System.Convert.ToString); + } AfterDeserializePSObject(content); } diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20210301/ResourceProviderOperationDisplay.TypeConverter.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/ResourceProviderOperationDisplay.TypeConverter.cs similarity index 82% rename from src/KubernetesConfiguration/generated/api/Models/Api20210301/ResourceProviderOperationDisplay.TypeConverter.cs rename to src/KubernetesConfiguration/generated/api/Models/Api20220301/ResourceProviderOperationDisplay.TypeConverter.cs index 9c5811c6184c..c017b54a14e3 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Api20210301/ResourceProviderOperationDisplay.TypeConverter.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/ResourceProviderOperationDisplay.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; @@ -14,20 +14,20 @@ public partial class ResourceProviderOperationDisplayTypeConverter : global::Sys { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// 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. + /// 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. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +75,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// 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 + /// 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 + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,21 +100,21 @@ public static bool CanConvertFrom(dynamic sourceValue) 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 + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IResourceProviderOperationDisplay ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationDisplay ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IResourceProviderOperationDisplay).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationDisplay).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20210301/ResourceProviderOperationDisplay.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/ResourceProviderOperationDisplay.cs similarity index 97% rename from src/KubernetesConfiguration/generated/api/Models/Api20210301/ResourceProviderOperationDisplay.cs rename to src/KubernetesConfiguration/generated/api/Models/Api20220301/ResourceProviderOperationDisplay.cs index 09f871c720ee..b14febd37c85 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Api20210301/ResourceProviderOperationDisplay.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/ResourceProviderOperationDisplay.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; /// Display metadata associated with the operation. public partial class ResourceProviderOperationDisplay : - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IResourceProviderOperationDisplay, - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IResourceProviderOperationDisplayInternal + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationDisplay, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationDisplayInternal { /// Backing field for property. diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20210301/ResourceProviderOperationDisplay.json.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/ResourceProviderOperationDisplay.json.cs similarity index 93% rename from src/KubernetesConfiguration/generated/api/Models/Api20210301/ResourceProviderOperationDisplay.json.cs rename to src/KubernetesConfiguration/generated/api/Models/Api20220301/ResourceProviderOperationDisplay.json.cs index 7bd62aa623a7..073ff0c1c3a5 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Api20210301/ResourceProviderOperationDisplay.json.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/ResourceProviderOperationDisplay.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; @@ -20,7 +20,7 @@ public partial class ResourceProviderOperationDisplay partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class ResourceProviderOperationDisplay /// /// 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. + /// 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. @@ -42,7 +43,8 @@ public partial class ResourceProviderOperationDisplay /// /// 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. + /// 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. @@ -52,13 +54,13 @@ public partial class ResourceProviderOperationDisplay partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IResourceProviderOperationDisplay. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationDisplay. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IResourceProviderOperationDisplay. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationDisplay. /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IResourceProviderOperationDisplay FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationDisplay FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json ? new ResourceProviderOperationDisplay(json) : null; } diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20210301/ResourceProviderOperationList.PowerShell.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/ResourceProviderOperationList.PowerShell.cs similarity index 70% rename from src/KubernetesConfiguration/generated/api/Models/Api20210301/ResourceProviderOperationList.PowerShell.cs rename to src/KubernetesConfiguration/generated/api/Models/Api20220301/ResourceProviderOperationList.PowerShell.cs index 553922504833..8894840a40ee 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Api20210301/ResourceProviderOperationList.PowerShell.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/ResourceProviderOperationList.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; @@ -31,7 +31,8 @@ public partial class ResourceProviderOperationList /// /// 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. + /// 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. @@ -43,7 +44,8 @@ public partial class ResourceProviderOperationList /// /// 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. + /// 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. @@ -61,29 +63,29 @@ public partial class ResourceProviderOperationList partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IResourceProviderOperationList DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationList DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ResourceProviderOperationList(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IResourceProviderOperationList DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationList DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ResourceProviderOperationList(content); } @@ -92,11 +94,11 @@ public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models. /// 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.KubernetesConfiguration.Models.Api20210301.IResourceProviderOperationList FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationList FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -109,13 +111,19 @@ internal ResourceProviderOperationList(global::System.Collections.IDictionary co return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IResourceProviderOperationListInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IResourceProviderOperation[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IResourceProviderOperationListInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ResourceProviderOperationTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IResourceProviderOperationListInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IResourceProviderOperationListInternal)this).NextLink, global::System.Convert.ToString); + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationListInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperation[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationListInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ResourceProviderOperationTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationListInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationListInternal)this).NextLink, global::System.Convert.ToString); + } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -128,8 +136,14 @@ internal ResourceProviderOperationList(global::System.Management.Automation.PSOb return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IResourceProviderOperationListInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IResourceProviderOperation[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IResourceProviderOperationListInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ResourceProviderOperationTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IResourceProviderOperationListInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IResourceProviderOperationListInternal)this).NextLink, global::System.Convert.ToString); + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationListInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperation[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationListInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ResourceProviderOperationTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationListInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationListInternal)this).NextLink, global::System.Convert.ToString); + } AfterDeserializePSObject(content); } diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20210301/ResourceProviderOperationList.TypeConverter.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/ResourceProviderOperationList.TypeConverter.cs similarity index 82% rename from src/KubernetesConfiguration/generated/api/Models/Api20210301/ResourceProviderOperationList.TypeConverter.cs rename to src/KubernetesConfiguration/generated/api/Models/Api20220301/ResourceProviderOperationList.TypeConverter.cs index 845592e57d0c..c5ad4b737529 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Api20210301/ResourceProviderOperationList.TypeConverter.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/ResourceProviderOperationList.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; @@ -14,20 +14,20 @@ public partial class ResourceProviderOperationListTypeConverter : global::System { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// 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. + /// 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. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +75,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// 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 + /// 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 + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,21 +100,20 @@ public static bool CanConvertFrom(dynamic sourceValue) 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 + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IResourceProviderOperationList ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationList ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IResourceProviderOperationList).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationList).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20210301/ResourceProviderOperationList.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/ResourceProviderOperationList.cs similarity index 87% rename from src/KubernetesConfiguration/generated/api/Models/Api20210301/ResourceProviderOperationList.cs rename to src/KubernetesConfiguration/generated/api/Models/Api20220301/ResourceProviderOperationList.cs index dcbca18e64e6..1012ca43729b 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Api20210301/ResourceProviderOperationList.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/ResourceProviderOperationList.cs @@ -3,18 +3,18 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; /// Result of the request to list operations. public partial class ResourceProviderOperationList : - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IResourceProviderOperationList, - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IResourceProviderOperationListInternal + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationList, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationListInternal { /// Internal Acessors for NextLink - string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IResourceProviderOperationListInternal.NextLink { get => this._nextLink; set { {_nextLink = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationListInternal.NextLink { get => this._nextLink; set { {_nextLink = value;} } } /// Backing field for property. private string _nextLink; @@ -24,11 +24,11 @@ public partial class ResourceProviderOperationList : public string NextLink { get => this._nextLink; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IResourceProviderOperation[] _value; + private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperation[] _value; /// List of operations supported by this resource provider. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IResourceProviderOperation[] Value { get => this._value; set => this._value = value; } + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperation[] Value { get => this._value; set => this._value = value; } /// Creates an new instance. public ResourceProviderOperationList() @@ -54,8 +54,8 @@ public partial interface IResourceProviderOperationList : ReadOnly = false, Description = @"List of operations supported by this resource provider.", SerializedName = @"value", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IResourceProviderOperation) })] - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IResourceProviderOperation[] Value { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperation) })] + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperation[] Value { get; set; } } /// Result of the request to list operations. @@ -65,7 +65,7 @@ internal partial interface IResourceProviderOperationListInternal /// URL to the next set of results, if any. string NextLink { get; set; } /// List of operations supported by this resource provider. - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IResourceProviderOperation[] Value { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperation[] Value { get; set; } } } \ No newline at end of file diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20210301/ResourceProviderOperationList.json.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/ResourceProviderOperationList.json.cs similarity index 90% rename from src/KubernetesConfiguration/generated/api/Models/Api20210301/ResourceProviderOperationList.json.cs rename to src/KubernetesConfiguration/generated/api/Models/Api20220301/ResourceProviderOperationList.json.cs index 68a8bf571efb..e99a1309b102 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Api20210301/ResourceProviderOperationList.json.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/ResourceProviderOperationList.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; @@ -20,7 +20,7 @@ public partial class ResourceProviderOperationList partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class ResourceProviderOperationList /// /// 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. + /// 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. @@ -42,7 +43,8 @@ public partial class ResourceProviderOperationList /// /// 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. + /// 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. @@ -52,13 +54,13 @@ public partial class ResourceProviderOperationList partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IResourceProviderOperationList. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationList. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IResourceProviderOperationList. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationList. /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IResourceProviderOperationList FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationList FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json ? new ResourceProviderOperationList(json) : null; } @@ -75,7 +77,7 @@ internal ResourceProviderOperationList(Microsoft.Azure.PowerShell.Cmdlets.Kubern { return; } - {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20210301.IResourceProviderOperation) (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ResourceProviderOperation.FromJson(__u) )) ))() : null : Value;} + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperation) (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ResourceProviderOperation.FromJson(__u) )) ))() : null : Value;} {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} AfterFromJson(json); } diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20210901/Scope.PowerShell.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/Scope.PowerShell.cs similarity index 60% rename from src/KubernetesConfiguration/generated/api/Models/Api20210901/Scope.PowerShell.cs rename to src/KubernetesConfiguration/generated/api/Models/Api20220301/Scope.PowerShell.cs index 194e4be92d9f..f1a05dd33eaf 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Api20210901/Scope.PowerShell.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/Scope.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; @@ -31,7 +31,8 @@ public partial class Scope /// /// 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. + /// 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. @@ -43,7 +44,8 @@ public partial class Scope /// /// 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. + /// 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. @@ -61,27 +63,27 @@ public partial class Scope partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IScope DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IScope DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new Scope(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IScope DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IScope DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new Scope(content); } @@ -90,11 +92,11 @@ public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models. /// 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.KubernetesConfiguration.Models.Api20210901.IScope FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IScope FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -107,15 +109,27 @@ internal Scope(global::System.Collections.IDictionary content) return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IScopeInternal)this).Cluster = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IScopeCluster) content.GetValueForProperty("Cluster",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IScopeInternal)this).Cluster, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.ScopeClusterTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IScopeInternal)this).Namespace = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IScopeNamespace) content.GetValueForProperty("Namespace",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IScopeInternal)this).Namespace, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.ScopeNamespaceTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IScopeInternal)this).ClusterReleaseNamespace = (string) content.GetValueForProperty("ClusterReleaseNamespace",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IScopeInternal)this).ClusterReleaseNamespace, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IScopeInternal)this).NamespaceTargetNamespace = (string) content.GetValueForProperty("NamespaceTargetNamespace",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IScopeInternal)this).NamespaceTargetNamespace, global::System.Convert.ToString); + if (content.Contains("Cluster")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IScopeInternal)this).Cluster = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IScopeCluster) content.GetValueForProperty("Cluster",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IScopeInternal)this).Cluster, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ScopeClusterTypeConverter.ConvertFrom); + } + if (content.Contains("Namespace")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IScopeInternal)this).Namespace = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IScopeNamespace) content.GetValueForProperty("Namespace",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IScopeInternal)this).Namespace, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ScopeNamespaceTypeConverter.ConvertFrom); + } + if (content.Contains("ClusterReleaseNamespace")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IScopeInternal)this).ClusterReleaseNamespace = (string) content.GetValueForProperty("ClusterReleaseNamespace",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IScopeInternal)this).ClusterReleaseNamespace, global::System.Convert.ToString); + } + if (content.Contains("NamespaceTargetNamespace")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IScopeInternal)this).NamespaceTargetNamespace = (string) content.GetValueForProperty("NamespaceTargetNamespace",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IScopeInternal)this).NamespaceTargetNamespace, global::System.Convert.ToString); + } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -128,10 +142,22 @@ internal Scope(global::System.Management.Automation.PSObject content) return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IScopeInternal)this).Cluster = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IScopeCluster) content.GetValueForProperty("Cluster",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IScopeInternal)this).Cluster, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.ScopeClusterTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IScopeInternal)this).Namespace = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IScopeNamespace) content.GetValueForProperty("Namespace",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IScopeInternal)this).Namespace, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.ScopeNamespaceTypeConverter.ConvertFrom); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IScopeInternal)this).ClusterReleaseNamespace = (string) content.GetValueForProperty("ClusterReleaseNamespace",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IScopeInternal)this).ClusterReleaseNamespace, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IScopeInternal)this).NamespaceTargetNamespace = (string) content.GetValueForProperty("NamespaceTargetNamespace",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IScopeInternal)this).NamespaceTargetNamespace, global::System.Convert.ToString); + if (content.Contains("Cluster")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IScopeInternal)this).Cluster = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IScopeCluster) content.GetValueForProperty("Cluster",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IScopeInternal)this).Cluster, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ScopeClusterTypeConverter.ConvertFrom); + } + if (content.Contains("Namespace")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IScopeInternal)this).Namespace = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IScopeNamespace) content.GetValueForProperty("Namespace",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IScopeInternal)this).Namespace, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ScopeNamespaceTypeConverter.ConvertFrom); + } + if (content.Contains("ClusterReleaseNamespace")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IScopeInternal)this).ClusterReleaseNamespace = (string) content.GetValueForProperty("ClusterReleaseNamespace",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IScopeInternal)this).ClusterReleaseNamespace, global::System.Convert.ToString); + } + if (content.Contains("NamespaceTargetNamespace")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IScopeInternal)this).NamespaceTargetNamespace = (string) content.GetValueForProperty("NamespaceTargetNamespace",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IScopeInternal)this).NamespaceTargetNamespace, global::System.Convert.ToString); + } AfterDeserializePSObject(content); } diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20210901/Scope.TypeConverter.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/Scope.TypeConverter.cs similarity index 82% rename from src/KubernetesConfiguration/generated/api/Models/Api20210901/Scope.TypeConverter.cs rename to src/KubernetesConfiguration/generated/api/Models/Api20220301/Scope.TypeConverter.cs index 5468416ece75..499b49453485 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Api20210901/Scope.TypeConverter.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/Scope.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; @@ -14,20 +14,19 @@ public partial class ScopeTypeConverter : global::System.Management.Automation.P { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// 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. + /// 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. + /// Determines if the converter can convert the parameter to the type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +74,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// 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 + /// 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 + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,21 +99,20 @@ public static bool CanConvertFrom(dynamic sourceValue) 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 + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IScope ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IScope ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IScope).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IScope).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20210901/Scope.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/Scope.cs similarity index 83% rename from src/KubernetesConfiguration/generated/api/Models/Api20210901/Scope.cs rename to src/KubernetesConfiguration/generated/api/Models/Api20220301/Scope.cs index ac28642d56f4..e3ecd5b277ed 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Api20210901/Scope.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/Scope.cs @@ -3,49 +3,49 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; /// Scope of the extension. It can be either Cluster or Namespace; but not both. public partial class Scope : - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IScope, - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IScopeInternal + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IScope, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IScopeInternal { /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IScopeCluster _cluster; + private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IScopeCluster _cluster; /// Specifies that the scope of the extension is Cluster [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IScopeCluster Cluster { get => (this._cluster = this._cluster ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.ScopeCluster()); set => this._cluster = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IScopeCluster Cluster { get => (this._cluster = this._cluster ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ScopeCluster()); set => this._cluster = value; } /// /// Namespace where the extension Release must be placed, for a Cluster scoped extension. If this namespace does not exist, /// it will be created /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string ClusterReleaseNamespace { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IScopeClusterInternal)Cluster).ReleaseNamespace; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IScopeClusterInternal)Cluster).ReleaseNamespace = value ?? null; } + public string ClusterReleaseNamespace { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IScopeClusterInternal)Cluster).ReleaseNamespace; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IScopeClusterInternal)Cluster).ReleaseNamespace = value ?? null; } /// Internal Acessors for Cluster - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IScopeCluster Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IScopeInternal.Cluster { get => (this._cluster = this._cluster ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.ScopeCluster()); set { {_cluster = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IScopeCluster Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IScopeInternal.Cluster { get => (this._cluster = this._cluster ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ScopeCluster()); set { {_cluster = value;} } } /// Internal Acessors for Namespace - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IScopeNamespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IScopeInternal.Namespace { get => (this._namespace = this._namespace ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.ScopeNamespace()); set { {_namespace = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IScopeNamespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IScopeInternal.Namespace { get => (this._namespace = this._namespace ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ScopeNamespace()); set { {_namespace = value;} } } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IScopeNamespace _namespace; + private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IScopeNamespace _namespace; /// Specifies that the scope of the extension is Namespace [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IScopeNamespace Namespace { get => (this._namespace = this._namespace ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.ScopeNamespace()); set => this._namespace = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IScopeNamespace Namespace { get => (this._namespace = this._namespace ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ScopeNamespace()); set => this._namespace = value; } /// /// Namespace where the extension will be created for an Namespace scoped extension. If this namespace does not exist, it /// will be created /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string NamespaceTargetNamespace { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IScopeNamespaceInternal)Namespace).TargetNamespace; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IScopeNamespaceInternal)Namespace).TargetNamespace = value ?? null; } + public string NamespaceTargetNamespace { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IScopeNamespaceInternal)Namespace).TargetNamespace; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IScopeNamespaceInternal)Namespace).TargetNamespace = value ?? null; } /// Creates an new instance. public Scope() @@ -86,14 +86,14 @@ internal partial interface IScopeInternal { /// Specifies that the scope of the extension is Cluster - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IScopeCluster Cluster { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IScopeCluster Cluster { get; set; } /// /// Namespace where the extension Release must be placed, for a Cluster scoped extension. If this namespace does not exist, /// it will be created /// string ClusterReleaseNamespace { get; set; } /// Specifies that the scope of the extension is Namespace - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IScopeNamespace Namespace { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IScopeNamespace Namespace { get; set; } /// /// Namespace where the extension will be created for an Namespace scoped extension. If this namespace does not exist, it /// will be created diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20210901/Scope.json.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/Scope.json.cs similarity index 90% rename from src/KubernetesConfiguration/generated/api/Models/Api20210901/Scope.json.cs rename to src/KubernetesConfiguration/generated/api/Models/Api20220301/Scope.json.cs index 0dfe139ea89b..9c7c1172b3fe 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Api20210901/Scope.json.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/Scope.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; @@ -20,7 +20,7 @@ public partial class Scope partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class Scope /// /// 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. + /// 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. @@ -42,7 +43,8 @@ public partial class Scope /// /// 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. + /// 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. @@ -52,13 +54,13 @@ public partial class Scope partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IScope. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IScope. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IScope. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IScope. /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IScope FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IScope FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json ? new Scope(json) : null; } @@ -75,8 +77,8 @@ internal Scope(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtim { return; } - {_cluster = If( json?.PropertyT("cluster"), out var __jsonCluster) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.ScopeCluster.FromJson(__jsonCluster) : Cluster;} - {_namespace = If( json?.PropertyT("namespace"), out var __jsonNamespace) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.ScopeNamespace.FromJson(__jsonNamespace) : Namespace;} + {_cluster = If( json?.PropertyT("cluster"), out var __jsonCluster) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ScopeCluster.FromJson(__jsonCluster) : Cluster;} + {_namespace = If( json?.PropertyT("namespace"), out var __jsonNamespace) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ScopeNamespace.FromJson(__jsonNamespace) : Namespace;} AfterFromJson(json); } diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20210901/ScopeCluster.PowerShell.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/ScopeCluster.PowerShell.cs similarity index 81% rename from src/KubernetesConfiguration/generated/api/Models/Api20210901/ScopeCluster.PowerShell.cs rename to src/KubernetesConfiguration/generated/api/Models/Api20220301/ScopeCluster.PowerShell.cs index b787c814e270..0a25bda07d4d 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Api20210901/ScopeCluster.PowerShell.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/ScopeCluster.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; @@ -31,7 +31,8 @@ public partial class ScopeCluster /// /// 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. + /// 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. @@ -43,7 +44,8 @@ public partial class ScopeCluster /// /// 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. + /// 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. @@ -61,29 +63,29 @@ public partial class ScopeCluster partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IScopeCluster DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IScopeCluster DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ScopeCluster(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IScopeCluster DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IScopeCluster DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ScopeCluster(content); } @@ -92,11 +94,11 @@ public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models. /// 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.KubernetesConfiguration.Models.Api20210901.IScopeCluster FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IScopeCluster FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -109,12 +111,15 @@ internal ScopeCluster(global::System.Collections.IDictionary content) return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IScopeClusterInternal)this).ReleaseNamespace = (string) content.GetValueForProperty("ReleaseNamespace",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IScopeClusterInternal)this).ReleaseNamespace, global::System.Convert.ToString); + if (content.Contains("ReleaseNamespace")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IScopeClusterInternal)this).ReleaseNamespace = (string) content.GetValueForProperty("ReleaseNamespace",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IScopeClusterInternal)this).ReleaseNamespace, global::System.Convert.ToString); + } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -127,7 +132,10 @@ internal ScopeCluster(global::System.Management.Automation.PSObject content) return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IScopeClusterInternal)this).ReleaseNamespace = (string) content.GetValueForProperty("ReleaseNamespace",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IScopeClusterInternal)this).ReleaseNamespace, global::System.Convert.ToString); + if (content.Contains("ReleaseNamespace")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IScopeClusterInternal)this).ReleaseNamespace = (string) content.GetValueForProperty("ReleaseNamespace",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IScopeClusterInternal)this).ReleaseNamespace, global::System.Convert.ToString); + } AfterDeserializePSObject(content); } diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20210901/ScopeCluster.TypeConverter.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/ScopeCluster.TypeConverter.cs similarity index 82% rename from src/KubernetesConfiguration/generated/api/Models/Api20210901/ScopeCluster.TypeConverter.cs rename to src/KubernetesConfiguration/generated/api/Models/Api20220301/ScopeCluster.TypeConverter.cs index 882aa1917387..bd75407c0c69 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Api20210901/ScopeCluster.TypeConverter.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/ScopeCluster.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; @@ -14,20 +14,20 @@ public partial class ScopeClusterTypeConverter : global::System.Management.Autom { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// 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. + /// 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. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +75,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// 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 + /// 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 + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,21 +100,20 @@ public static bool CanConvertFrom(dynamic sourceValue) 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 + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IScopeCluster ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IScopeCluster ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IScopeCluster).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IScopeCluster).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20210901/ScopeCluster.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/ScopeCluster.cs similarity index 96% rename from src/KubernetesConfiguration/generated/api/Models/Api20210901/ScopeCluster.cs rename to src/KubernetesConfiguration/generated/api/Models/Api20220301/ScopeCluster.cs index c8008b9bdace..4ac526c65040 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Api20210901/ScopeCluster.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/ScopeCluster.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; /// Specifies that the scope of the extension is Cluster public partial class ScopeCluster : - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IScopeCluster, - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IScopeClusterInternal + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IScopeCluster, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IScopeClusterInternal { /// Backing field for property. diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20210901/ScopeCluster.json.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/ScopeCluster.json.cs similarity index 92% rename from src/KubernetesConfiguration/generated/api/Models/Api20210901/ScopeCluster.json.cs rename to src/KubernetesConfiguration/generated/api/Models/Api20220301/ScopeCluster.json.cs index acefb9cc25e4..ea52ed1ec54d 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Api20210901/ScopeCluster.json.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/ScopeCluster.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; @@ -20,7 +20,7 @@ public partial class ScopeCluster partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class ScopeCluster /// /// 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. + /// 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. @@ -42,7 +43,8 @@ public partial class ScopeCluster /// /// 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. + /// 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. @@ -52,13 +54,13 @@ public partial class ScopeCluster partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IScopeCluster. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IScopeCluster. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IScopeCluster. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IScopeCluster. /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IScopeCluster FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IScopeCluster FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json ? new ScopeCluster(json) : null; } diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20210901/ScopeNamespace.PowerShell.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/ScopeNamespace.PowerShell.cs similarity index 81% rename from src/KubernetesConfiguration/generated/api/Models/Api20210901/ScopeNamespace.PowerShell.cs rename to src/KubernetesConfiguration/generated/api/Models/Api20220301/ScopeNamespace.PowerShell.cs index 4f7cf9509fa2..559d38c959f9 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Api20210901/ScopeNamespace.PowerShell.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/ScopeNamespace.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; @@ -31,7 +31,8 @@ public partial class ScopeNamespace /// /// 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. + /// 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. @@ -43,7 +44,8 @@ public partial class ScopeNamespace /// /// 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. + /// 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. @@ -61,29 +63,29 @@ public partial class ScopeNamespace partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IScopeNamespace DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IScopeNamespace DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ScopeNamespace(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IScopeNamespace DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IScopeNamespace DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ScopeNamespace(content); } @@ -92,11 +94,11 @@ public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models. /// 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.KubernetesConfiguration.Models.Api20210901.IScopeNamespace FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IScopeNamespace FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -109,12 +111,15 @@ internal ScopeNamespace(global::System.Collections.IDictionary content) return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IScopeNamespaceInternal)this).TargetNamespace = (string) content.GetValueForProperty("TargetNamespace",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IScopeNamespaceInternal)this).TargetNamespace, global::System.Convert.ToString); + if (content.Contains("TargetNamespace")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IScopeNamespaceInternal)this).TargetNamespace = (string) content.GetValueForProperty("TargetNamespace",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IScopeNamespaceInternal)this).TargetNamespace, global::System.Convert.ToString); + } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -127,7 +132,10 @@ internal ScopeNamespace(global::System.Management.Automation.PSObject content) return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IScopeNamespaceInternal)this).TargetNamespace = (string) content.GetValueForProperty("TargetNamespace",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IScopeNamespaceInternal)this).TargetNamespace, global::System.Convert.ToString); + if (content.Contains("TargetNamespace")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IScopeNamespaceInternal)this).TargetNamespace = (string) content.GetValueForProperty("TargetNamespace",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IScopeNamespaceInternal)this).TargetNamespace, global::System.Convert.ToString); + } AfterDeserializePSObject(content); } diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20210901/ScopeNamespace.TypeConverter.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/ScopeNamespace.TypeConverter.cs similarity index 82% rename from src/KubernetesConfiguration/generated/api/Models/Api20210901/ScopeNamespace.TypeConverter.cs rename to src/KubernetesConfiguration/generated/api/Models/Api20220301/ScopeNamespace.TypeConverter.cs index 1784a83974b2..c59b71353dcf 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Api20210901/ScopeNamespace.TypeConverter.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/ScopeNamespace.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; @@ -14,20 +14,20 @@ public partial class ScopeNamespaceTypeConverter : global::System.Management.Aut { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// 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. + /// 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. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +75,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// 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 + /// 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 + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,21 +100,20 @@ public static bool CanConvertFrom(dynamic sourceValue) 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 + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IScopeNamespace ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IScopeNamespace ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IScopeNamespace).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IScopeNamespace).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20210901/ScopeNamespace.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/ScopeNamespace.cs similarity index 96% rename from src/KubernetesConfiguration/generated/api/Models/Api20210901/ScopeNamespace.cs rename to src/KubernetesConfiguration/generated/api/Models/Api20220301/ScopeNamespace.cs index 808a062576f1..b44a2e4e52b5 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Api20210901/ScopeNamespace.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/ScopeNamespace.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; /// Specifies that the scope of the extension is Namespace public partial class ScopeNamespace : - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IScopeNamespace, - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IScopeNamespaceInternal + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IScopeNamespace, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IScopeNamespaceInternal { /// Backing field for property. diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20210901/ScopeNamespace.json.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/ScopeNamespace.json.cs similarity index 91% rename from src/KubernetesConfiguration/generated/api/Models/Api20210901/ScopeNamespace.json.cs rename to src/KubernetesConfiguration/generated/api/Models/Api20220301/ScopeNamespace.json.cs index 72e1b937d4e8..ccca76c36319 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Api20210901/ScopeNamespace.json.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/ScopeNamespace.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; @@ -20,7 +20,7 @@ public partial class ScopeNamespace partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class ScopeNamespace /// /// 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. + /// 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. @@ -42,7 +43,8 @@ public partial class ScopeNamespace /// /// 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. + /// 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. @@ -52,13 +54,13 @@ public partial class ScopeNamespace partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IScopeNamespace. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IScopeNamespace. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IScopeNamespace. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IScopeNamespace. /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IScopeNamespace FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IScopeNamespace FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json ? new ScopeNamespace(json) : null; } diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20220301/SourceControlConfiguration.PowerShell.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/SourceControlConfiguration.PowerShell.cs new file mode 100644 index 000000000000..d7f3a0963626 --- /dev/null +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/SourceControlConfiguration.PowerShell.cs @@ -0,0 +1,398 @@ +// 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.KubernetesConfiguration.Models.Api20220301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; + + /// The SourceControl Configuration object returned in Get & Put response. + [System.ComponentModel.TypeConverter(typeof(SourceControlConfigurationTypeConverter))] + public partial class SourceControlConfiguration + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfiguration DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new SourceControlConfiguration(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.KubernetesConfiguration.Models.Api20220301.ISourceControlConfiguration DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new SourceControlConfiguration(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.KubernetesConfiguration.Models.Api20220301.ISourceControlConfiguration FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal SourceControlConfiguration(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.SourceControlConfigurationPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("ComplianceStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationInternal)this).ComplianceStatus = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IComplianceStatus) content.GetValueForProperty("ComplianceStatus",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationInternal)this).ComplianceStatus, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ComplianceStatusTypeConverter.ConvertFrom); + } + if (content.Contains("OperatorType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationInternal)this).OperatorType = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.OperatorType?) content.GetValueForProperty("OperatorType",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationInternal)this).OperatorType, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.OperatorType.CreateFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("HelmOperatorProperty")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationInternal)this).HelmOperatorProperty = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IHelmOperatorProperties) content.GetValueForProperty("HelmOperatorProperty",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationInternal)this).HelmOperatorProperty, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.HelmOperatorPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("RepositoryUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationInternal)this).RepositoryUrl = (string) content.GetValueForProperty("RepositoryUrl",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationInternal)this).RepositoryUrl, global::System.Convert.ToString); + } + if (content.Contains("OperatorNamespace")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationInternal)this).OperatorNamespace = (string) content.GetValueForProperty("OperatorNamespace",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationInternal)this).OperatorNamespace, global::System.Convert.ToString); + } + if (content.Contains("OperatorInstanceName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationInternal)this).OperatorInstanceName = (string) content.GetValueForProperty("OperatorInstanceName",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationInternal)this).OperatorInstanceName, global::System.Convert.ToString); + } + if (content.Contains("OperatorParam")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationInternal)this).OperatorParam = (string) content.GetValueForProperty("OperatorParam",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationInternal)this).OperatorParam, global::System.Convert.ToString); + } + if (content.Contains("ConfigurationProtectedSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationInternal)this).ConfigurationProtectedSetting = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IConfigurationProtectedSettings) content.GetValueForProperty("ConfigurationProtectedSetting",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationInternal)this).ConfigurationProtectedSetting, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ConfigurationProtectedSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("OperatorScope")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationInternal)this).OperatorScope = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.OperatorScopeType?) content.GetValueForProperty("OperatorScope",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationInternal)this).OperatorScope, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.OperatorScopeType.CreateFrom); + } + if (content.Contains("RepositoryPublicKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationInternal)this).RepositoryPublicKey = (string) content.GetValueForProperty("RepositoryPublicKey",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationInternal)this).RepositoryPublicKey, global::System.Convert.ToString); + } + if (content.Contains("SshKnownHostsContent")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationInternal)this).SshKnownHostsContent = (string) content.GetValueForProperty("SshKnownHostsContent",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationInternal)this).SshKnownHostsContent, global::System.Convert.ToString); + } + if (content.Contains("EnableHelmOperator")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationInternal)this).EnableHelmOperator = (bool?) content.GetValueForProperty("EnableHelmOperator",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationInternal)this).EnableHelmOperator, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningStateType?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningStateType.CreateFrom); + } + if (content.Contains("HelmOperatorPropertyChartVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationInternal)this).HelmOperatorPropertyChartVersion = (string) content.GetValueForProperty("HelmOperatorPropertyChartVersion",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationInternal)this).HelmOperatorPropertyChartVersion, global::System.Convert.ToString); + } + if (content.Contains("HelmOperatorPropertyChartValue")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationInternal)this).HelmOperatorPropertyChartValue = (string) content.GetValueForProperty("HelmOperatorPropertyChartValue",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationInternal)this).HelmOperatorPropertyChartValue, global::System.Convert.ToString); + } + if (content.Contains("ComplianceStatusMessage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationInternal)this).ComplianceStatusMessage = (string) content.GetValueForProperty("ComplianceStatusMessage",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationInternal)this).ComplianceStatusMessage, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("ComplianceStatusComplianceState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationInternal)this).ComplianceStatusComplianceState = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ComplianceStateType?) content.GetValueForProperty("ComplianceStatusComplianceState",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationInternal)this).ComplianceStatusComplianceState, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ComplianceStateType.CreateFrom); + } + if (content.Contains("ComplianceStatusLastConfigApplied")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationInternal)this).ComplianceStatusLastConfigApplied = (global::System.DateTime?) content.GetValueForProperty("ComplianceStatusLastConfigApplied",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationInternal)this).ComplianceStatusLastConfigApplied, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("ComplianceStatusMessageLevel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationInternal)this).ComplianceStatusMessageLevel = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.MessageLevelType?) content.GetValueForProperty("ComplianceStatusMessageLevel",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationInternal)this).ComplianceStatusMessageLevel, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.MessageLevelType.CreateFrom); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal SourceControlConfiguration(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.SourceControlConfigurationPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("ComplianceStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationInternal)this).ComplianceStatus = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IComplianceStatus) content.GetValueForProperty("ComplianceStatus",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationInternal)this).ComplianceStatus, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ComplianceStatusTypeConverter.ConvertFrom); + } + if (content.Contains("OperatorType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationInternal)this).OperatorType = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.OperatorType?) content.GetValueForProperty("OperatorType",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationInternal)this).OperatorType, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.OperatorType.CreateFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("HelmOperatorProperty")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationInternal)this).HelmOperatorProperty = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IHelmOperatorProperties) content.GetValueForProperty("HelmOperatorProperty",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationInternal)this).HelmOperatorProperty, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.HelmOperatorPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("RepositoryUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationInternal)this).RepositoryUrl = (string) content.GetValueForProperty("RepositoryUrl",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationInternal)this).RepositoryUrl, global::System.Convert.ToString); + } + if (content.Contains("OperatorNamespace")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationInternal)this).OperatorNamespace = (string) content.GetValueForProperty("OperatorNamespace",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationInternal)this).OperatorNamespace, global::System.Convert.ToString); + } + if (content.Contains("OperatorInstanceName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationInternal)this).OperatorInstanceName = (string) content.GetValueForProperty("OperatorInstanceName",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationInternal)this).OperatorInstanceName, global::System.Convert.ToString); + } + if (content.Contains("OperatorParam")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationInternal)this).OperatorParam = (string) content.GetValueForProperty("OperatorParam",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationInternal)this).OperatorParam, global::System.Convert.ToString); + } + if (content.Contains("ConfigurationProtectedSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationInternal)this).ConfigurationProtectedSetting = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IConfigurationProtectedSettings) content.GetValueForProperty("ConfigurationProtectedSetting",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationInternal)this).ConfigurationProtectedSetting, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ConfigurationProtectedSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("OperatorScope")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationInternal)this).OperatorScope = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.OperatorScopeType?) content.GetValueForProperty("OperatorScope",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationInternal)this).OperatorScope, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.OperatorScopeType.CreateFrom); + } + if (content.Contains("RepositoryPublicKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationInternal)this).RepositoryPublicKey = (string) content.GetValueForProperty("RepositoryPublicKey",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationInternal)this).RepositoryPublicKey, global::System.Convert.ToString); + } + if (content.Contains("SshKnownHostsContent")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationInternal)this).SshKnownHostsContent = (string) content.GetValueForProperty("SshKnownHostsContent",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationInternal)this).SshKnownHostsContent, global::System.Convert.ToString); + } + if (content.Contains("EnableHelmOperator")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationInternal)this).EnableHelmOperator = (bool?) content.GetValueForProperty("EnableHelmOperator",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationInternal)this).EnableHelmOperator, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningStateType?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningStateType.CreateFrom); + } + if (content.Contains("HelmOperatorPropertyChartVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationInternal)this).HelmOperatorPropertyChartVersion = (string) content.GetValueForProperty("HelmOperatorPropertyChartVersion",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationInternal)this).HelmOperatorPropertyChartVersion, global::System.Convert.ToString); + } + if (content.Contains("HelmOperatorPropertyChartValue")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationInternal)this).HelmOperatorPropertyChartValue = (string) content.GetValueForProperty("HelmOperatorPropertyChartValue",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationInternal)this).HelmOperatorPropertyChartValue, global::System.Convert.ToString); + } + if (content.Contains("ComplianceStatusMessage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationInternal)this).ComplianceStatusMessage = (string) content.GetValueForProperty("ComplianceStatusMessage",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationInternal)this).ComplianceStatusMessage, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("ComplianceStatusComplianceState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationInternal)this).ComplianceStatusComplianceState = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ComplianceStateType?) content.GetValueForProperty("ComplianceStatusComplianceState",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationInternal)this).ComplianceStatusComplianceState, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ComplianceStateType.CreateFrom); + } + if (content.Contains("ComplianceStatusLastConfigApplied")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationInternal)this).ComplianceStatusLastConfigApplied = (global::System.DateTime?) content.GetValueForProperty("ComplianceStatusLastConfigApplied",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationInternal)this).ComplianceStatusLastConfigApplied, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("ComplianceStatusMessageLevel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationInternal)this).ComplianceStatusMessageLevel = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.MessageLevelType?) content.GetValueForProperty("ComplianceStatusMessageLevel",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationInternal)this).ComplianceStatusMessageLevel, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.MessageLevelType.CreateFrom); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The SourceControl Configuration object returned in Get & Put response. + [System.ComponentModel.TypeConverter(typeof(SourceControlConfigurationTypeConverter))] + public partial interface ISourceControlConfiguration + + { + + } +} \ No newline at end of file diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20210301/SourceControlConfiguration.TypeConverter.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/SourceControlConfiguration.TypeConverter.cs similarity index 82% rename from src/KubernetesConfiguration/generated/api/Models/Api20210301/SourceControlConfiguration.TypeConverter.cs rename to src/KubernetesConfiguration/generated/api/Models/Api20220301/SourceControlConfiguration.TypeConverter.cs index ca989fcbf2b7..14cf0937ae2b 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Api20210301/SourceControlConfiguration.TypeConverter.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/SourceControlConfiguration.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; @@ -14,20 +14,20 @@ public partial class SourceControlConfigurationTypeConverter : global::System.Ma { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// 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. + /// 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. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +75,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// 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 + /// 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 + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,21 +100,20 @@ public static bool CanConvertFrom(dynamic sourceValue) 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 + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfiguration ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfiguration ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfiguration).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfiguration).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20210301/SourceControlConfiguration.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/SourceControlConfiguration.cs similarity index 85% rename from src/KubernetesConfiguration/generated/api/Models/Api20210301/SourceControlConfiguration.cs rename to src/KubernetesConfiguration/generated/api/Models/Api20220301/SourceControlConfiguration.cs index c74d6f4b9529..c0fc92a4400b 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Api20210301/SourceControlConfiguration.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/SourceControlConfiguration.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; /// The SourceControl Configuration object returned in Get & Put response. public partial class SourceControlConfiguration : - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfiguration, - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationInternal, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfiguration, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationInternal, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IValidates { /// @@ -21,40 +21,49 @@ public partial class SourceControlConfiguration : /// The compliance state of the configuration. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ComplianceStateType? ComplianceStatusComplianceState { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationPropertiesInternal)Property).ComplianceStatusComplianceState; } + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.DoNotFormat] + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ComplianceStateType? ComplianceStatusComplianceState { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationPropertiesInternal)Property).ComplianceStatusComplianceState; } /// Datetime the configuration was last applied. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public global::System.DateTime? ComplianceStatusLastConfigApplied { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationPropertiesInternal)Property).ComplianceStatusLastConfigApplied; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationPropertiesInternal)Property).ComplianceStatusLastConfigApplied = value ?? default(global::System.DateTime); } + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.DoNotFormat] + public global::System.DateTime? ComplianceStatusLastConfigApplied { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationPropertiesInternal)Property).ComplianceStatusLastConfigApplied; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationPropertiesInternal)Property).ComplianceStatusLastConfigApplied = value ?? default(global::System.DateTime); } /// Message from when the configuration was applied. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string ComplianceStatusMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationPropertiesInternal)Property).ComplianceStatusMessage; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationPropertiesInternal)Property).ComplianceStatusMessage = value ?? null; } + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.DoNotFormat] + public string ComplianceStatusMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationPropertiesInternal)Property).ComplianceStatusMessage; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationPropertiesInternal)Property).ComplianceStatusMessage = value ?? null; } /// Level of the message. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.MessageLevelType? ComplianceStatusMessageLevel { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationPropertiesInternal)Property).ComplianceStatusMessageLevel; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationPropertiesInternal)Property).ComplianceStatusMessageLevel = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.MessageLevelType)""); } + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.DoNotFormat] + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.MessageLevelType? ComplianceStatusMessageLevel { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationPropertiesInternal)Property).ComplianceStatusMessageLevel; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationPropertiesInternal)Property).ComplianceStatusMessageLevel = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.MessageLevelType)""); } /// Name-value pairs of protected configuration settings for the configuration [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IConfigurationProtectedSettings ConfigurationProtectedSetting { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationPropertiesInternal)Property).ConfigurationProtectedSetting; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationPropertiesInternal)Property).ConfigurationProtectedSetting = value ?? null /* model class */; } + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.DoNotFormat] + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IConfigurationProtectedSettings ConfigurationProtectedSetting { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationPropertiesInternal)Property).ConfigurationProtectedSetting; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationPropertiesInternal)Property).ConfigurationProtectedSetting = value ?? null /* model class */; } /// Option to enable Helm Operator for this git configuration. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public bool? EnableHelmOperator { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationPropertiesInternal)Property).EnableHelmOperator; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationPropertiesInternal)Property).EnableHelmOperator = value ?? default(bool); } + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.DoNotFormat] + public bool? EnableHelmOperator { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationPropertiesInternal)Property).EnableHelmOperator; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationPropertiesInternal)Property).EnableHelmOperator = value ?? default(bool); } /// Values override for the operator Helm chart. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string HelmOperatorPropertyChartValue { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationPropertiesInternal)Property).HelmOperatorPropertyChartValue; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationPropertiesInternal)Property).HelmOperatorPropertyChartValue = value ?? null; } + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.DoNotFormat] + public string HelmOperatorPropertyChartValue { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationPropertiesInternal)Property).HelmOperatorPropertyChartValue; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationPropertiesInternal)Property).HelmOperatorPropertyChartValue = value ?? null; } /// Version of the operator Helm chart. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string HelmOperatorPropertyChartVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationPropertiesInternal)Property).HelmOperatorPropertyChartVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationPropertiesInternal)Property).HelmOperatorPropertyChartVersion = value ?? null; } + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.DoNotFormat] + public string HelmOperatorPropertyChartVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationPropertiesInternal)Property).HelmOperatorPropertyChartVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationPropertiesInternal)Property).HelmOperatorPropertyChartVersion = value ?? null; } /// /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inherited)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.DoNotFormat] public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)__resource).Id; } /// Internal Acessors for Id @@ -67,83 +76,95 @@ public partial class SourceControlConfiguration : string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)__resource).Type = value; } /// Internal Acessors for ComplianceStatus - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IComplianceStatus Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationInternal.ComplianceStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationPropertiesInternal)Property).ComplianceStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationPropertiesInternal)Property).ComplianceStatus = value; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IComplianceStatus Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationInternal.ComplianceStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationPropertiesInternal)Property).ComplianceStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationPropertiesInternal)Property).ComplianceStatus = value; } /// Internal Acessors for ComplianceStatusComplianceState - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ComplianceStateType? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationInternal.ComplianceStatusComplianceState { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationPropertiesInternal)Property).ComplianceStatusComplianceState; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationPropertiesInternal)Property).ComplianceStatusComplianceState = value; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ComplianceStateType? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationInternal.ComplianceStatusComplianceState { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationPropertiesInternal)Property).ComplianceStatusComplianceState; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationPropertiesInternal)Property).ComplianceStatusComplianceState = value; } /// Internal Acessors for HelmOperatorProperty - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IHelmOperatorProperties Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationInternal.HelmOperatorProperty { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationPropertiesInternal)Property).HelmOperatorProperty; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationPropertiesInternal)Property).HelmOperatorProperty = value; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IHelmOperatorProperties Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationInternal.HelmOperatorProperty { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationPropertiesInternal)Property).HelmOperatorProperty; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationPropertiesInternal)Property).HelmOperatorProperty = value; } /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationProperties Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.SourceControlConfigurationProperties()); set { {_property = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationProperties Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.SourceControlConfigurationProperties()); set { {_property = value;} } } /// Internal Acessors for ProvisioningState - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningStateType? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationPropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationPropertiesInternal)Property).ProvisioningState = value; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningStateType? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationPropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationPropertiesInternal)Property).ProvisioningState = value; } /// Internal Acessors for RepositoryPublicKey - string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationInternal.RepositoryPublicKey { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationPropertiesInternal)Property).RepositoryPublicKey; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationPropertiesInternal)Property).RepositoryPublicKey = value; } + string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationInternal.RepositoryPublicKey { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationPropertiesInternal)Property).RepositoryPublicKey; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationPropertiesInternal)Property).RepositoryPublicKey = value; } /// Internal Acessors for SystemData - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemData Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationInternal.SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.SystemData()); set { {_systemData = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemData Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationInternal.SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.SystemData()); set { {_systemData = value;} } } /// The name of the resource [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inherited)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.FormatTable(Index = 0)] public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)__resource).Name; } /// Instance name of the operator - identifying the specific configuration. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string OperatorInstanceName { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationPropertiesInternal)Property).OperatorInstanceName; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationPropertiesInternal)Property).OperatorInstanceName = value ?? null; } + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.DoNotFormat] + public string OperatorInstanceName { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationPropertiesInternal)Property).OperatorInstanceName; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationPropertiesInternal)Property).OperatorInstanceName = value ?? null; } /// /// The namespace to which this operator is installed to. Maximum of 253 lower case alphanumeric characters, hyphen and period /// only. /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string OperatorNamespace { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationPropertiesInternal)Property).OperatorNamespace; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationPropertiesInternal)Property).OperatorNamespace = value ?? null; } + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.DoNotFormat] + public string OperatorNamespace { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationPropertiesInternal)Property).OperatorNamespace; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationPropertiesInternal)Property).OperatorNamespace = value ?? null; } /// Any Parameters for the Operator instance in string format. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string OperatorParam { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationPropertiesInternal)Property).OperatorParam; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationPropertiesInternal)Property).OperatorParam = value ?? null; } + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.DoNotFormat] + public string OperatorParam { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationPropertiesInternal)Property).OperatorParam; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationPropertiesInternal)Property).OperatorParam = value ?? null; } /// Scope at which the operator will be installed. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.OperatorScopeType? OperatorScope { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationPropertiesInternal)Property).OperatorScope; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationPropertiesInternal)Property).OperatorScope = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.OperatorScopeType)""); } + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.DoNotFormat] + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.OperatorScopeType? OperatorScope { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationPropertiesInternal)Property).OperatorScope; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationPropertiesInternal)Property).OperatorScope = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.OperatorScopeType)""); } /// Type of the operator [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.OperatorType? OperatorType { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationPropertiesInternal)Property).OperatorType; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationPropertiesInternal)Property).OperatorType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.OperatorType)""); } + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.DoNotFormat] + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.OperatorType? OperatorType { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationPropertiesInternal)Property).OperatorType; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationPropertiesInternal)Property).OperatorType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.OperatorType)""); } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationProperties _property; + private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationProperties _property; /// Properties to create a Source Control Configuration resource [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.SourceControlConfigurationProperties()); set => this._property = value; } + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.DoNotFormat] + internal Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.SourceControlConfigurationProperties()); set => this._property = value; } /// The provisioning state of the resource provider. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningStateType? ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationPropertiesInternal)Property).ProvisioningState; } + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.DoNotFormat] + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningStateType? ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationPropertiesInternal)Property).ProvisioningState; } /// /// Public Key associated with this SourceControl configuration (either generated within the cluster or provided by the user). /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string RepositoryPublicKey { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationPropertiesInternal)Property).RepositoryPublicKey; } + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.DoNotFormat] + public string RepositoryPublicKey { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationPropertiesInternal)Property).RepositoryPublicKey; } /// Url of the SourceControl Repository. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string RepositoryUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationPropertiesInternal)Property).RepositoryUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationPropertiesInternal)Property).RepositoryUrl = value ?? null; } + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.FormatTable(Index = 1)] + public string RepositoryUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationPropertiesInternal)Property).RepositoryUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationPropertiesInternal)Property).RepositoryUrl = value ?? null; } /// Gets the resource group name [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] - public string ResourceGroupName { get => (new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/").Match(this.Id).Success ? new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/").Match(this.Id).Groups["resourceGroupName"].Value : null); } + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.FormatTable(Index = 2)] + public string ResourceGroupName { get => (new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Success ? new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Groups["resourceGroupName"].Value : null); } /// /// Base64-encoded known_hosts contents containing public SSH keys required to access private Git instances /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string SshKnownHostsContent { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationPropertiesInternal)Property).SshKnownHostsContent; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationPropertiesInternal)Property).SshKnownHostsContent = value ?? null; } + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.DoNotFormat] + public string SshKnownHostsContent { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationPropertiesInternal)Property).SshKnownHostsContent; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationPropertiesInternal)Property).SshKnownHostsContent = value ?? null; } /// Backing field for property. private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemData _systemData; @@ -152,36 +173,44 @@ public partial class SourceControlConfiguration : /// Top level metadata https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/common-api-contracts.md#system-metadata-for-all-azure-resources /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.DoNotFormat] internal Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemData SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.SystemData()); } /// The timestamp of resource creation (UTC). [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.DoNotFormat] public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemDataInternal)SystemData).CreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemDataInternal)SystemData).CreatedAt = value ?? default(global::System.DateTime); } /// The identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.DoNotFormat] public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemDataInternal)SystemData).CreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemDataInternal)SystemData).CreatedBy = value ?? null; } /// The type of identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.DoNotFormat] public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemDataInternal)SystemData).CreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemDataInternal)SystemData).CreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.CreatedByType)""); } /// The timestamp of resource last modification (UTC) [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.DoNotFormat] public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemDataInternal)SystemData).LastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemDataInternal)SystemData).LastModifiedAt = value ?? default(global::System.DateTime); } /// The identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.DoNotFormat] public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemDataInternal)SystemData).LastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemDataInternal)SystemData).LastModifiedBy = value ?? null; } /// The type of identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.DoNotFormat] public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemDataInternal)SystemData).LastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.ISystemDataInternal)SystemData).LastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.CreatedByType)""); } /// /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inherited)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.DoNotFormat] public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal)__resource).Type; } /// Creates an new instance. @@ -194,7 +223,7 @@ public SourceControlConfiguration() /// an instance that will receive validation /// events. /// - /// A < see cref = "global::System.Threading.Tasks.Task" /> that will be complete when validation is completed. + /// A that will be complete when validation is completed. /// public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener eventListener) { @@ -245,8 +274,8 @@ public partial interface ISourceControlConfiguration : ReadOnly = false, Description = @"Name-value pairs of protected configuration settings for the configuration", SerializedName = @"configurationProtectedSettings", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IConfigurationProtectedSettings) })] - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IConfigurationProtectedSettings ConfigurationProtectedSetting { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IConfigurationProtectedSettings) })] + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IConfigurationProtectedSettings ConfigurationProtectedSetting { get; set; } /// Option to enable Helm Operator for this git configuration. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, @@ -405,7 +434,7 @@ internal partial interface ISourceControlConfigurationInternal : Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IResourceInternal { /// Compliance Status of the Configuration - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IComplianceStatus ComplianceStatus { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IComplianceStatus ComplianceStatus { get; set; } /// The compliance state of the configuration. Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ComplianceStateType? ComplianceStatusComplianceState { get; set; } /// Datetime the configuration was last applied. @@ -415,11 +444,11 @@ internal partial interface ISourceControlConfigurationInternal : /// Level of the message. Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.MessageLevelType? ComplianceStatusMessageLevel { get; set; } /// Name-value pairs of protected configuration settings for the configuration - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IConfigurationProtectedSettings ConfigurationProtectedSetting { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IConfigurationProtectedSettings ConfigurationProtectedSetting { get; set; } /// Option to enable Helm Operator for this git configuration. bool? EnableHelmOperator { get; set; } /// Properties for Helm operator. - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IHelmOperatorProperties HelmOperatorProperty { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IHelmOperatorProperties HelmOperatorProperty { get; set; } /// Values override for the operator Helm chart. string HelmOperatorPropertyChartValue { get; set; } /// Version of the operator Helm chart. @@ -438,7 +467,7 @@ internal partial interface ISourceControlConfigurationInternal : /// Type of the operator Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.OperatorType? OperatorType { get; set; } /// Properties to create a Source Control Configuration resource - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationProperties Property { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationProperties Property { get; set; } /// The provisioning state of the resource provider. Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningStateType? ProvisioningState { get; set; } /// diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20210301/SourceControlConfiguration.json.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/SourceControlConfiguration.json.cs similarity index 91% rename from src/KubernetesConfiguration/generated/api/Models/Api20210301/SourceControlConfiguration.json.cs rename to src/KubernetesConfiguration/generated/api/Models/Api20220301/SourceControlConfiguration.json.cs index 543275d01c0f..78ce1925bd1a 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Api20210301/SourceControlConfiguration.json.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/SourceControlConfiguration.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; @@ -20,7 +20,7 @@ public partial class SourceControlConfiguration partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class SourceControlConfiguration /// /// 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. + /// 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. @@ -42,7 +43,8 @@ public partial class SourceControlConfiguration /// /// 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. + /// 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. @@ -52,13 +54,13 @@ public partial class SourceControlConfiguration partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfiguration. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfiguration. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfiguration. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfiguration. /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfiguration FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfiguration FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json ? new SourceControlConfiguration(json) : null; } @@ -76,7 +78,7 @@ internal SourceControlConfiguration(Microsoft.Azure.PowerShell.Cmdlets.Kubernete return; } __resource = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.Resource(json); - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.SourceControlConfigurationProperties.FromJson(__jsonProperties) : Property;} + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.SourceControlConfigurationProperties.FromJson(__jsonProperties) : Property;} {_systemData = If( json?.PropertyT("systemData"), out var __jsonSystemData) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.SystemData.FromJson(__jsonSystemData) : SystemData;} AfterFromJson(json); } diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20210301/SourceControlConfigurationList.PowerShell.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/SourceControlConfigurationList.PowerShell.cs similarity index 71% rename from src/KubernetesConfiguration/generated/api/Models/Api20210301/SourceControlConfigurationList.PowerShell.cs rename to src/KubernetesConfiguration/generated/api/Models/Api20220301/SourceControlConfigurationList.PowerShell.cs index b61930cdcb44..69f549c06cca 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Api20210301/SourceControlConfigurationList.PowerShell.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/SourceControlConfigurationList.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; @@ -34,7 +34,8 @@ public partial class SourceControlConfigurationList /// /// 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. + /// 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. @@ -46,7 +47,8 @@ public partial class SourceControlConfigurationList /// /// 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. + /// 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. @@ -64,29 +66,29 @@ public partial class SourceControlConfigurationList partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationList DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationList DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new SourceControlConfigurationList(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationList DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationList DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new SourceControlConfigurationList(content); } @@ -95,11 +97,11 @@ public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models. /// 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.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationList FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationList FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -112,13 +114,19 @@ internal SourceControlConfigurationList(global::System.Collections.IDictionary c return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationListInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfiguration[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationListInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.SourceControlConfigurationTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationListInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationListInternal)this).NextLink, global::System.Convert.ToString); + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationListInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfiguration[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationListInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.SourceControlConfigurationTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationListInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationListInternal)this).NextLink, global::System.Convert.ToString); + } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -131,8 +139,14 @@ internal SourceControlConfigurationList(global::System.Management.Automation.PSO return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationListInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfiguration[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationListInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.SourceControlConfigurationTypeConverter.ConvertFrom)); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationListInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationListInternal)this).NextLink, global::System.Convert.ToString); + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationListInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfiguration[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationListInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.SourceControlConfigurationTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationListInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationListInternal)this).NextLink, global::System.Convert.ToString); + } AfterDeserializePSObject(content); } diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20210301/SourceControlConfigurationList.TypeConverter.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/SourceControlConfigurationList.TypeConverter.cs similarity index 82% rename from src/KubernetesConfiguration/generated/api/Models/Api20210301/SourceControlConfigurationList.TypeConverter.cs rename to src/KubernetesConfiguration/generated/api/Models/Api20220301/SourceControlConfigurationList.TypeConverter.cs index d4fc460cb392..e85913733c0e 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Api20210301/SourceControlConfigurationList.TypeConverter.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/SourceControlConfigurationList.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; @@ -14,20 +14,20 @@ public partial class SourceControlConfigurationListTypeConverter : global::Syste { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// 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. + /// 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. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +75,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// 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 + /// 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 + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,21 +100,21 @@ public static bool CanConvertFrom(dynamic sourceValue) 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 + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationList ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationList ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationList).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationList).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20210301/SourceControlConfigurationList.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/SourceControlConfigurationList.cs similarity index 86% rename from src/KubernetesConfiguration/generated/api/Models/Api20210301/SourceControlConfigurationList.cs rename to src/KubernetesConfiguration/generated/api/Models/Api20220301/SourceControlConfigurationList.cs index 9a42205a659a..241a4a8e5a29 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Api20210301/SourceControlConfigurationList.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/SourceControlConfigurationList.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; @@ -12,15 +12,15 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api2 /// and a URL link to get the next set of results. /// public partial class SourceControlConfigurationList : - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationList, - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationListInternal + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationList, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationListInternal { /// Internal Acessors for NextLink - string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationListInternal.NextLink { get => this._nextLink; set { {_nextLink = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationListInternal.NextLink { get => this._nextLink; set { {_nextLink = value;} } } /// Internal Acessors for Value - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfiguration[] Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationListInternal.Value { get => this._value; set { {_value = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfiguration[] Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationListInternal.Value { get => this._value; set { {_value = value;} } } /// Backing field for property. private string _nextLink; @@ -30,11 +30,11 @@ public partial class SourceControlConfigurationList : public string NextLink { get => this._nextLink; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfiguration[] _value; + private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfiguration[] _value; /// List of Source Control Configurations within a Kubernetes cluster. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfiguration[] Value { get => this._value; } + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfiguration[] Value { get => this._value; } /// Creates an new instance. public SourceControlConfigurationList() @@ -61,8 +61,8 @@ public partial interface ISourceControlConfigurationList : ReadOnly = true, Description = @"List of Source Control Configurations within a Kubernetes cluster.", SerializedName = @"value", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfiguration) })] - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfiguration[] Value { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfiguration) })] + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfiguration[] Value { get; } } /// Result of the request to list Source Control Configurations. It contains a list of SourceControlConfiguration objects @@ -73,7 +73,7 @@ internal partial interface ISourceControlConfigurationListInternal /// URL to get the next set of configuration objects, if any. string NextLink { get; set; } /// List of Source Control Configurations within a Kubernetes cluster. - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfiguration[] Value { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfiguration[] Value { get; set; } } } \ No newline at end of file diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20210301/SourceControlConfigurationList.json.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/SourceControlConfigurationList.json.cs similarity index 91% rename from src/KubernetesConfiguration/generated/api/Models/Api20210301/SourceControlConfigurationList.json.cs rename to src/KubernetesConfiguration/generated/api/Models/Api20220301/SourceControlConfigurationList.json.cs index 0cb4d2efb1a2..05faf640dc34 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Api20210301/SourceControlConfigurationList.json.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/SourceControlConfigurationList.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; @@ -23,7 +23,7 @@ public partial class SourceControlConfigurationList partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -33,7 +33,8 @@ public partial class SourceControlConfigurationList /// /// 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. + /// 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. @@ -45,7 +46,8 @@ public partial class SourceControlConfigurationList /// /// 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. + /// 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. @@ -55,13 +57,13 @@ public partial class SourceControlConfigurationList partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationList. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationList. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationList. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationList. /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationList FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationList FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json ? new SourceControlConfigurationList(json) : null; } @@ -78,7 +80,7 @@ internal SourceControlConfigurationList(Microsoft.Azure.PowerShell.Cmdlets.Kuber { return; } - {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20210301.ISourceControlConfiguration) (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.SourceControlConfiguration.FromJson(__u) )) ))() : null : Value;} + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Models.Api20220301.ISourceControlConfiguration) (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.SourceControlConfiguration.FromJson(__u) )) ))() : null : Value;} {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} AfterFromJson(json); } diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20220301/SourceControlConfigurationProperties.PowerShell.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/SourceControlConfigurationProperties.PowerShell.cs new file mode 100644 index 000000000000..1f38551f1062 --- /dev/null +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/SourceControlConfigurationProperties.PowerShell.cs @@ -0,0 +1,312 @@ +// 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.KubernetesConfiguration.Models.Api20220301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; + + /// Properties to create a Source Control Configuration resource + [System.ComponentModel.TypeConverter(typeof(SourceControlConfigurationPropertiesTypeConverter))] + public partial class SourceControlConfigurationProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new SourceControlConfigurationProperties(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.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new SourceControlConfigurationProperties(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.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal SourceControlConfigurationProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("HelmOperatorProperty")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationPropertiesInternal)this).HelmOperatorProperty = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IHelmOperatorProperties) content.GetValueForProperty("HelmOperatorProperty",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationPropertiesInternal)this).HelmOperatorProperty, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.HelmOperatorPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("ComplianceStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationPropertiesInternal)this).ComplianceStatus = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IComplianceStatus) content.GetValueForProperty("ComplianceStatus",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationPropertiesInternal)this).ComplianceStatus, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ComplianceStatusTypeConverter.ConvertFrom); + } + if (content.Contains("RepositoryUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationPropertiesInternal)this).RepositoryUrl = (string) content.GetValueForProperty("RepositoryUrl",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationPropertiesInternal)this).RepositoryUrl, global::System.Convert.ToString); + } + if (content.Contains("OperatorNamespace")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationPropertiesInternal)this).OperatorNamespace = (string) content.GetValueForProperty("OperatorNamespace",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationPropertiesInternal)this).OperatorNamespace, global::System.Convert.ToString); + } + if (content.Contains("OperatorInstanceName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationPropertiesInternal)this).OperatorInstanceName = (string) content.GetValueForProperty("OperatorInstanceName",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationPropertiesInternal)this).OperatorInstanceName, global::System.Convert.ToString); + } + if (content.Contains("OperatorType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationPropertiesInternal)this).OperatorType = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.OperatorType?) content.GetValueForProperty("OperatorType",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationPropertiesInternal)this).OperatorType, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.OperatorType.CreateFrom); + } + if (content.Contains("OperatorParam")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationPropertiesInternal)this).OperatorParam = (string) content.GetValueForProperty("OperatorParam",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationPropertiesInternal)this).OperatorParam, global::System.Convert.ToString); + } + if (content.Contains("ConfigurationProtectedSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationPropertiesInternal)this).ConfigurationProtectedSetting = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IConfigurationProtectedSettings) content.GetValueForProperty("ConfigurationProtectedSetting",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationPropertiesInternal)this).ConfigurationProtectedSetting, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ConfigurationProtectedSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("OperatorScope")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationPropertiesInternal)this).OperatorScope = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.OperatorScopeType?) content.GetValueForProperty("OperatorScope",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationPropertiesInternal)this).OperatorScope, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.OperatorScopeType.CreateFrom); + } + if (content.Contains("RepositoryPublicKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationPropertiesInternal)this).RepositoryPublicKey = (string) content.GetValueForProperty("RepositoryPublicKey",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationPropertiesInternal)this).RepositoryPublicKey, global::System.Convert.ToString); + } + if (content.Contains("SshKnownHostsContent")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationPropertiesInternal)this).SshKnownHostsContent = (string) content.GetValueForProperty("SshKnownHostsContent",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationPropertiesInternal)this).SshKnownHostsContent, global::System.Convert.ToString); + } + if (content.Contains("EnableHelmOperator")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationPropertiesInternal)this).EnableHelmOperator = (bool?) content.GetValueForProperty("EnableHelmOperator",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationPropertiesInternal)this).EnableHelmOperator, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationPropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningStateType?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationPropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningStateType.CreateFrom); + } + if (content.Contains("HelmOperatorPropertyChartVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationPropertiesInternal)this).HelmOperatorPropertyChartVersion = (string) content.GetValueForProperty("HelmOperatorPropertyChartVersion",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationPropertiesInternal)this).HelmOperatorPropertyChartVersion, global::System.Convert.ToString); + } + if (content.Contains("HelmOperatorPropertyChartValue")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationPropertiesInternal)this).HelmOperatorPropertyChartValue = (string) content.GetValueForProperty("HelmOperatorPropertyChartValue",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationPropertiesInternal)this).HelmOperatorPropertyChartValue, global::System.Convert.ToString); + } + if (content.Contains("ComplianceStatusMessage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationPropertiesInternal)this).ComplianceStatusMessage = (string) content.GetValueForProperty("ComplianceStatusMessage",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationPropertiesInternal)this).ComplianceStatusMessage, global::System.Convert.ToString); + } + if (content.Contains("ComplianceStatusComplianceState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationPropertiesInternal)this).ComplianceStatusComplianceState = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ComplianceStateType?) content.GetValueForProperty("ComplianceStatusComplianceState",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationPropertiesInternal)this).ComplianceStatusComplianceState, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ComplianceStateType.CreateFrom); + } + if (content.Contains("ComplianceStatusLastConfigApplied")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationPropertiesInternal)this).ComplianceStatusLastConfigApplied = (global::System.DateTime?) content.GetValueForProperty("ComplianceStatusLastConfigApplied",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationPropertiesInternal)this).ComplianceStatusLastConfigApplied, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("ComplianceStatusMessageLevel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationPropertiesInternal)this).ComplianceStatusMessageLevel = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.MessageLevelType?) content.GetValueForProperty("ComplianceStatusMessageLevel",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationPropertiesInternal)this).ComplianceStatusMessageLevel, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.MessageLevelType.CreateFrom); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal SourceControlConfigurationProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("HelmOperatorProperty")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationPropertiesInternal)this).HelmOperatorProperty = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IHelmOperatorProperties) content.GetValueForProperty("HelmOperatorProperty",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationPropertiesInternal)this).HelmOperatorProperty, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.HelmOperatorPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("ComplianceStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationPropertiesInternal)this).ComplianceStatus = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IComplianceStatus) content.GetValueForProperty("ComplianceStatus",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationPropertiesInternal)this).ComplianceStatus, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ComplianceStatusTypeConverter.ConvertFrom); + } + if (content.Contains("RepositoryUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationPropertiesInternal)this).RepositoryUrl = (string) content.GetValueForProperty("RepositoryUrl",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationPropertiesInternal)this).RepositoryUrl, global::System.Convert.ToString); + } + if (content.Contains("OperatorNamespace")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationPropertiesInternal)this).OperatorNamespace = (string) content.GetValueForProperty("OperatorNamespace",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationPropertiesInternal)this).OperatorNamespace, global::System.Convert.ToString); + } + if (content.Contains("OperatorInstanceName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationPropertiesInternal)this).OperatorInstanceName = (string) content.GetValueForProperty("OperatorInstanceName",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationPropertiesInternal)this).OperatorInstanceName, global::System.Convert.ToString); + } + if (content.Contains("OperatorType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationPropertiesInternal)this).OperatorType = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.OperatorType?) content.GetValueForProperty("OperatorType",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationPropertiesInternal)this).OperatorType, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.OperatorType.CreateFrom); + } + if (content.Contains("OperatorParam")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationPropertiesInternal)this).OperatorParam = (string) content.GetValueForProperty("OperatorParam",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationPropertiesInternal)this).OperatorParam, global::System.Convert.ToString); + } + if (content.Contains("ConfigurationProtectedSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationPropertiesInternal)this).ConfigurationProtectedSetting = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IConfigurationProtectedSettings) content.GetValueForProperty("ConfigurationProtectedSetting",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationPropertiesInternal)this).ConfigurationProtectedSetting, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ConfigurationProtectedSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("OperatorScope")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationPropertiesInternal)this).OperatorScope = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.OperatorScopeType?) content.GetValueForProperty("OperatorScope",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationPropertiesInternal)this).OperatorScope, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.OperatorScopeType.CreateFrom); + } + if (content.Contains("RepositoryPublicKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationPropertiesInternal)this).RepositoryPublicKey = (string) content.GetValueForProperty("RepositoryPublicKey",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationPropertiesInternal)this).RepositoryPublicKey, global::System.Convert.ToString); + } + if (content.Contains("SshKnownHostsContent")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationPropertiesInternal)this).SshKnownHostsContent = (string) content.GetValueForProperty("SshKnownHostsContent",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationPropertiesInternal)this).SshKnownHostsContent, global::System.Convert.ToString); + } + if (content.Contains("EnableHelmOperator")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationPropertiesInternal)this).EnableHelmOperator = (bool?) content.GetValueForProperty("EnableHelmOperator",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationPropertiesInternal)this).EnableHelmOperator, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationPropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningStateType?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationPropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningStateType.CreateFrom); + } + if (content.Contains("HelmOperatorPropertyChartVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationPropertiesInternal)this).HelmOperatorPropertyChartVersion = (string) content.GetValueForProperty("HelmOperatorPropertyChartVersion",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationPropertiesInternal)this).HelmOperatorPropertyChartVersion, global::System.Convert.ToString); + } + if (content.Contains("HelmOperatorPropertyChartValue")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationPropertiesInternal)this).HelmOperatorPropertyChartValue = (string) content.GetValueForProperty("HelmOperatorPropertyChartValue",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationPropertiesInternal)this).HelmOperatorPropertyChartValue, global::System.Convert.ToString); + } + if (content.Contains("ComplianceStatusMessage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationPropertiesInternal)this).ComplianceStatusMessage = (string) content.GetValueForProperty("ComplianceStatusMessage",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationPropertiesInternal)this).ComplianceStatusMessage, global::System.Convert.ToString); + } + if (content.Contains("ComplianceStatusComplianceState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationPropertiesInternal)this).ComplianceStatusComplianceState = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ComplianceStateType?) content.GetValueForProperty("ComplianceStatusComplianceState",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationPropertiesInternal)this).ComplianceStatusComplianceState, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ComplianceStateType.CreateFrom); + } + if (content.Contains("ComplianceStatusLastConfigApplied")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationPropertiesInternal)this).ComplianceStatusLastConfigApplied = (global::System.DateTime?) content.GetValueForProperty("ComplianceStatusLastConfigApplied",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationPropertiesInternal)this).ComplianceStatusLastConfigApplied, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("ComplianceStatusMessageLevel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationPropertiesInternal)this).ComplianceStatusMessageLevel = (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.MessageLevelType?) content.GetValueForProperty("ComplianceStatusMessageLevel",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationPropertiesInternal)this).ComplianceStatusMessageLevel, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.MessageLevelType.CreateFrom); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Properties to create a Source Control Configuration resource + [System.ComponentModel.TypeConverter(typeof(SourceControlConfigurationPropertiesTypeConverter))] + public partial interface ISourceControlConfigurationProperties + + { + + } +} \ No newline at end of file diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20210301/SourceControlConfigurationProperties.TypeConverter.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/SourceControlConfigurationProperties.TypeConverter.cs similarity index 82% rename from src/KubernetesConfiguration/generated/api/Models/Api20210301/SourceControlConfigurationProperties.TypeConverter.cs rename to src/KubernetesConfiguration/generated/api/Models/Api20220301/SourceControlConfigurationProperties.TypeConverter.cs index 7e3d7acbfd2a..fd89933985ba 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Api20210301/SourceControlConfigurationProperties.TypeConverter.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/SourceControlConfigurationProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 { using Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell; @@ -15,20 +15,20 @@ public partial class SourceControlConfigurationPropertiesTypeConverter : global: { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// 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. + /// 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. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -77,19 +77,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// 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 + /// 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 + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -101,21 +102,21 @@ public static bool CanConvertFrom(dynamic sourceValue) 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 + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20210301/SourceControlConfigurationProperties.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/SourceControlConfigurationProperties.cs similarity index 91% rename from src/KubernetesConfiguration/generated/api/Models/Api20210301/SourceControlConfigurationProperties.cs rename to src/KubernetesConfiguration/generated/api/Models/Api20220301/SourceControlConfigurationProperties.cs index 582d694bf427..6c7fbd7b32ac 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Api20210301/SourceControlConfigurationProperties.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/SourceControlConfigurationProperties.cs @@ -3,45 +3,45 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; /// Properties to create a Source Control Configuration resource public partial class SourceControlConfigurationProperties : - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationProperties, - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationPropertiesInternal + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationProperties, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationPropertiesInternal { /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IComplianceStatus _complianceStatus; + private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IComplianceStatus _complianceStatus; /// Compliance Status of the Configuration [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IComplianceStatus ComplianceStatus { get => (this._complianceStatus = this._complianceStatus ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ComplianceStatus()); } + internal Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IComplianceStatus ComplianceStatus { get => (this._complianceStatus = this._complianceStatus ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ComplianceStatus()); } /// The compliance state of the configuration. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ComplianceStateType? ComplianceStatusComplianceState { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IComplianceStatusInternal)ComplianceStatus).ComplianceState; } + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ComplianceStateType? ComplianceStatusComplianceState { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IComplianceStatusInternal)ComplianceStatus).ComplianceState; } /// Datetime the configuration was last applied. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public global::System.DateTime? ComplianceStatusLastConfigApplied { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IComplianceStatusInternal)ComplianceStatus).LastConfigApplied; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IComplianceStatusInternal)ComplianceStatus).LastConfigApplied = value ?? default(global::System.DateTime); } + public global::System.DateTime? ComplianceStatusLastConfigApplied { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IComplianceStatusInternal)ComplianceStatus).LastConfigApplied; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IComplianceStatusInternal)ComplianceStatus).LastConfigApplied = value ?? default(global::System.DateTime); } /// Message from when the configuration was applied. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string ComplianceStatusMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IComplianceStatusInternal)ComplianceStatus).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IComplianceStatusInternal)ComplianceStatus).Message = value ?? null; } + public string ComplianceStatusMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IComplianceStatusInternal)ComplianceStatus).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IComplianceStatusInternal)ComplianceStatus).Message = value ?? null; } /// Level of the message. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.MessageLevelType? ComplianceStatusMessageLevel { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IComplianceStatusInternal)ComplianceStatus).MessageLevel; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IComplianceStatusInternal)ComplianceStatus).MessageLevel = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.MessageLevelType)""); } + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.MessageLevelType? ComplianceStatusMessageLevel { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IComplianceStatusInternal)ComplianceStatus).MessageLevel; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IComplianceStatusInternal)ComplianceStatus).MessageLevel = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.MessageLevelType)""); } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IConfigurationProtectedSettings _configurationProtectedSetting; + private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IConfigurationProtectedSettings _configurationProtectedSetting; /// Name-value pairs of protected configuration settings for the configuration [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IConfigurationProtectedSettings ConfigurationProtectedSetting { get => (this._configurationProtectedSetting = this._configurationProtectedSetting ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ConfigurationProtectedSettings()); set => this._configurationProtectedSetting = value; } + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IConfigurationProtectedSettings ConfigurationProtectedSetting { get => (this._configurationProtectedSetting = this._configurationProtectedSetting ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ConfigurationProtectedSettings()); set => this._configurationProtectedSetting = value; } /// Backing field for property. private bool? _enableHelmOperator; @@ -51,34 +51,34 @@ public partial class SourceControlConfigurationProperties : public bool? EnableHelmOperator { get => this._enableHelmOperator; set => this._enableHelmOperator = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IHelmOperatorProperties _helmOperatorProperty; + private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IHelmOperatorProperties _helmOperatorProperty; /// Properties for Helm operator. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IHelmOperatorProperties HelmOperatorProperty { get => (this._helmOperatorProperty = this._helmOperatorProperty ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.HelmOperatorProperties()); set => this._helmOperatorProperty = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IHelmOperatorProperties HelmOperatorProperty { get => (this._helmOperatorProperty = this._helmOperatorProperty ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.HelmOperatorProperties()); set => this._helmOperatorProperty = value; } /// Values override for the operator Helm chart. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string HelmOperatorPropertyChartValue { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IHelmOperatorPropertiesInternal)HelmOperatorProperty).ChartValue; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IHelmOperatorPropertiesInternal)HelmOperatorProperty).ChartValue = value ?? null; } + public string HelmOperatorPropertyChartValue { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IHelmOperatorPropertiesInternal)HelmOperatorProperty).ChartValue; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IHelmOperatorPropertiesInternal)HelmOperatorProperty).ChartValue = value ?? null; } /// Version of the operator Helm chart. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Inlined)] - public string HelmOperatorPropertyChartVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IHelmOperatorPropertiesInternal)HelmOperatorProperty).ChartVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IHelmOperatorPropertiesInternal)HelmOperatorProperty).ChartVersion = value ?? null; } + public string HelmOperatorPropertyChartVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IHelmOperatorPropertiesInternal)HelmOperatorProperty).ChartVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IHelmOperatorPropertiesInternal)HelmOperatorProperty).ChartVersion = value ?? null; } /// Internal Acessors for ComplianceStatus - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IComplianceStatus Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationPropertiesInternal.ComplianceStatus { get => (this._complianceStatus = this._complianceStatus ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ComplianceStatus()); set { {_complianceStatus = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IComplianceStatus Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationPropertiesInternal.ComplianceStatus { get => (this._complianceStatus = this._complianceStatus ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ComplianceStatus()); set { {_complianceStatus = value;} } } /// Internal Acessors for ComplianceStatusComplianceState - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ComplianceStateType? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationPropertiesInternal.ComplianceStatusComplianceState { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IComplianceStatusInternal)ComplianceStatus).ComplianceState; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IComplianceStatusInternal)ComplianceStatus).ComplianceState = value; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ComplianceStateType? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationPropertiesInternal.ComplianceStatusComplianceState { get => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IComplianceStatusInternal)ComplianceStatus).ComplianceState; set => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IComplianceStatusInternal)ComplianceStatus).ComplianceState = value; } /// Internal Acessors for HelmOperatorProperty - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IHelmOperatorProperties Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationPropertiesInternal.HelmOperatorProperty { get => (this._helmOperatorProperty = this._helmOperatorProperty ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.HelmOperatorProperties()); set { {_helmOperatorProperty = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IHelmOperatorProperties Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationPropertiesInternal.HelmOperatorProperty { get => (this._helmOperatorProperty = this._helmOperatorProperty ?? new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.HelmOperatorProperties()); set { {_helmOperatorProperty = value;} } } /// Internal Acessors for ProvisioningState - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningStateType? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationPropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningStateType? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationPropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } /// Internal Acessors for RepositoryPublicKey - string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationPropertiesInternal.RepositoryPublicKey { get => this._repositoryPublicKey; set { {_repositoryPublicKey = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationPropertiesInternal.RepositoryPublicKey { get => this._repositoryPublicKey; set { {_repositoryPublicKey = value;} } } /// Backing field for property. private string _operatorInstanceName; @@ -198,8 +198,8 @@ public partial interface ISourceControlConfigurationProperties : ReadOnly = false, Description = @"Name-value pairs of protected configuration settings for the configuration", SerializedName = @"configurationProtectedSettings", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IConfigurationProtectedSettings) })] - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IConfigurationProtectedSettings ConfigurationProtectedSetting { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IConfigurationProtectedSettings) })] + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IConfigurationProtectedSettings ConfigurationProtectedSetting { get; set; } /// Option to enable Helm Operator for this git configuration. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, @@ -310,7 +310,7 @@ internal partial interface ISourceControlConfigurationPropertiesInternal { /// Compliance Status of the Configuration - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IComplianceStatus ComplianceStatus { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IComplianceStatus ComplianceStatus { get; set; } /// The compliance state of the configuration. Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ComplianceStateType? ComplianceStatusComplianceState { get; set; } /// Datetime the configuration was last applied. @@ -320,11 +320,11 @@ internal partial interface ISourceControlConfigurationPropertiesInternal /// Level of the message. Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.MessageLevelType? ComplianceStatusMessageLevel { get; set; } /// Name-value pairs of protected configuration settings for the configuration - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IConfigurationProtectedSettings ConfigurationProtectedSetting { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IConfigurationProtectedSettings ConfigurationProtectedSetting { get; set; } /// Option to enable Helm Operator for this git configuration. bool? EnableHelmOperator { get; set; } /// Properties for Helm operator. - Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IHelmOperatorProperties HelmOperatorProperty { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IHelmOperatorProperties HelmOperatorProperty { get; set; } /// Values override for the operator Helm chart. string HelmOperatorPropertyChartValue { get; set; } /// Version of the operator Helm chart. diff --git a/src/KubernetesConfiguration/generated/api/Models/Api20210301/SourceControlConfigurationProperties.json.cs b/src/KubernetesConfiguration/generated/api/Models/Api20220301/SourceControlConfigurationProperties.json.cs similarity index 94% rename from src/KubernetesConfiguration/generated/api/Models/Api20210301/SourceControlConfigurationProperties.json.cs rename to src/KubernetesConfiguration/generated/api/Models/Api20220301/SourceControlConfigurationProperties.json.cs index 592d192c983c..cb876f6d79b9 100644 --- a/src/KubernetesConfiguration/generated/api/Models/Api20210301/SourceControlConfigurationProperties.json.cs +++ b/src/KubernetesConfiguration/generated/api/Models/Api20220301/SourceControlConfigurationProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301 +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301 { using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; @@ -20,7 +20,7 @@ public partial class SourceControlConfigurationProperties partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class SourceControlConfigurationProperties /// /// 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. + /// 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. @@ -42,7 +43,8 @@ public partial class SourceControlConfigurationProperties /// /// 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. + /// 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. @@ -52,13 +54,13 @@ public partial class SourceControlConfigurationProperties partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfigurationProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json ? new SourceControlConfigurationProperties(json) : null; } @@ -75,14 +77,14 @@ internal SourceControlConfigurationProperties(Microsoft.Azure.PowerShell.Cmdlets { return; } - {_helmOperatorProperty = If( json?.PropertyT("helmOperatorProperties"), out var __jsonHelmOperatorProperties) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.HelmOperatorProperties.FromJson(__jsonHelmOperatorProperties) : HelmOperatorProperty;} - {_complianceStatus = If( json?.PropertyT("complianceStatus"), out var __jsonComplianceStatus) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ComplianceStatus.FromJson(__jsonComplianceStatus) : ComplianceStatus;} + {_helmOperatorProperty = If( json?.PropertyT("helmOperatorProperties"), out var __jsonHelmOperatorProperties) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.HelmOperatorProperties.FromJson(__jsonHelmOperatorProperties) : HelmOperatorProperty;} + {_complianceStatus = If( json?.PropertyT("complianceStatus"), out var __jsonComplianceStatus) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ComplianceStatus.FromJson(__jsonComplianceStatus) : ComplianceStatus;} {_repositoryUrl = If( json?.PropertyT("repositoryUrl"), out var __jsonRepositoryUrl) ? (string)__jsonRepositoryUrl : (string)RepositoryUrl;} {_operatorNamespace = If( json?.PropertyT("operatorNamespace"), out var __jsonOperatorNamespace) ? (string)__jsonOperatorNamespace : (string)OperatorNamespace;} {_operatorInstanceName = If( json?.PropertyT("operatorInstanceName"), out var __jsonOperatorInstanceName) ? (string)__jsonOperatorInstanceName : (string)OperatorInstanceName;} {_operatorType = If( json?.PropertyT("operatorType"), out var __jsonOperatorType) ? (string)__jsonOperatorType : (string)OperatorType;} {_operatorParam = If( json?.PropertyT("operatorParams"), out var __jsonOperatorParams) ? (string)__jsonOperatorParams : (string)OperatorParam;} - {_configurationProtectedSetting = If( json?.PropertyT("configurationProtectedSettings"), out var __jsonConfigurationProtectedSettings) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ConfigurationProtectedSettings.FromJson(__jsonConfigurationProtectedSettings) : ConfigurationProtectedSetting;} + {_configurationProtectedSetting = If( json?.PropertyT("configurationProtectedSettings"), out var __jsonConfigurationProtectedSettings) ? Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ConfigurationProtectedSettings.FromJson(__jsonConfigurationProtectedSettings) : ConfigurationProtectedSetting;} {_operatorScope = If( json?.PropertyT("operatorScope"), out var __jsonOperatorScope) ? (string)__jsonOperatorScope : (string)OperatorScope;} {_repositoryPublicKey = If( json?.PropertyT("repositoryPublicKey"), out var __jsonRepositoryPublicKey) ? (string)__jsonRepositoryPublicKey : (string)RepositoryPublicKey;} {_sshKnownHostsContent = If( json?.PropertyT("sshKnownHostsContents"), out var __jsonSshKnownHostsContents) ? (string)__jsonSshKnownHostsContents : (string)SshKnownHostsContent;} diff --git a/src/KubernetesConfiguration/generated/api/Models/KubernetesConfigurationIdentity.PowerShell.cs b/src/KubernetesConfiguration/generated/api/Models/KubernetesConfigurationIdentity.PowerShell.cs index 89527a7a13c8..35bc75c0b662 100644 --- a/src/KubernetesConfiguration/generated/api/Models/KubernetesConfigurationIdentity.PowerShell.cs +++ b/src/KubernetesConfiguration/generated/api/Models/KubernetesConfigurationIdentity.PowerShell.cs @@ -30,7 +30,8 @@ public partial class KubernetesConfigurationIdentity /// /// 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. + /// 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. @@ -42,7 +43,8 @@ public partial class KubernetesConfigurationIdentity /// /// 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. + /// 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. @@ -91,7 +93,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models. /// 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. + /// an instance of the model class. public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentity FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); /// @@ -108,15 +110,46 @@ internal KubernetesConfigurationIdentity(global::System.Collections.IDictionary return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentityInternal)this).SubscriptionId = (string) content.GetValueForProperty("SubscriptionId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentityInternal)this).SubscriptionId, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentityInternal)this).ResourceGroupName = (string) content.GetValueForProperty("ResourceGroupName",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentityInternal)this).ResourceGroupName, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentityInternal)this).ClusterRp = (string) content.GetValueForProperty("ClusterRp",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentityInternal)this).ClusterRp, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentityInternal)this).ClusterResourceName = (string) content.GetValueForProperty("ClusterResourceName",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentityInternal)this).ClusterResourceName, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentityInternal)this).ClusterName = (string) content.GetValueForProperty("ClusterName",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentityInternal)this).ClusterName, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentityInternal)this).SourceControlConfigurationName = (string) content.GetValueForProperty("SourceControlConfigurationName",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentityInternal)this).SourceControlConfigurationName, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentityInternal)this).ExtensionName = (string) content.GetValueForProperty("ExtensionName",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentityInternal)this).ExtensionName, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentityInternal)this).OperationId = (string) content.GetValueForProperty("OperationId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentityInternal)this).OperationId, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentityInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentityInternal)this).Id, global::System.Convert.ToString); + if (content.Contains("SubscriptionId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentityInternal)this).SubscriptionId = (string) content.GetValueForProperty("SubscriptionId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentityInternal)this).SubscriptionId, global::System.Convert.ToString); + } + if (content.Contains("ResourceGroupName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentityInternal)this).ResourceGroupName = (string) content.GetValueForProperty("ResourceGroupName",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentityInternal)this).ResourceGroupName, global::System.Convert.ToString); + } + if (content.Contains("ClusterRp")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentityInternal)this).ClusterRp = (string) content.GetValueForProperty("ClusterRp",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentityInternal)this).ClusterRp, global::System.Convert.ToString); + } + if (content.Contains("ClusterResourceName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentityInternal)this).ClusterResourceName = (string) content.GetValueForProperty("ClusterResourceName",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentityInternal)this).ClusterResourceName, global::System.Convert.ToString); + } + if (content.Contains("ClusterName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentityInternal)this).ClusterName = (string) content.GetValueForProperty("ClusterName",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentityInternal)this).ClusterName, global::System.Convert.ToString); + } + if (content.Contains("ExtensionName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentityInternal)this).ExtensionName = (string) content.GetValueForProperty("ExtensionName",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentityInternal)this).ExtensionName, global::System.Convert.ToString); + } + if (content.Contains("OperationId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentityInternal)this).OperationId = (string) content.GetValueForProperty("OperationId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentityInternal)this).OperationId, global::System.Convert.ToString); + } + if (content.Contains("FluxConfigurationName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentityInternal)this).FluxConfigurationName = (string) content.GetValueForProperty("FluxConfigurationName",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentityInternal)this).FluxConfigurationName, global::System.Convert.ToString); + } + if (content.Contains("SourceControlConfigurationName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentityInternal)this).SourceControlConfigurationName = (string) content.GetValueForProperty("SourceControlConfigurationName",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentityInternal)this).SourceControlConfigurationName, global::System.Convert.ToString); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentityInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentityInternal)this).Id, global::System.Convert.ToString); + } AfterDeserializeDictionary(content); } @@ -134,15 +167,46 @@ internal KubernetesConfigurationIdentity(global::System.Management.Automation.PS return; } // actually deserialize - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentityInternal)this).SubscriptionId = (string) content.GetValueForProperty("SubscriptionId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentityInternal)this).SubscriptionId, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentityInternal)this).ResourceGroupName = (string) content.GetValueForProperty("ResourceGroupName",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentityInternal)this).ResourceGroupName, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentityInternal)this).ClusterRp = (string) content.GetValueForProperty("ClusterRp",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentityInternal)this).ClusterRp, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentityInternal)this).ClusterResourceName = (string) content.GetValueForProperty("ClusterResourceName",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentityInternal)this).ClusterResourceName, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentityInternal)this).ClusterName = (string) content.GetValueForProperty("ClusterName",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentityInternal)this).ClusterName, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentityInternal)this).SourceControlConfigurationName = (string) content.GetValueForProperty("SourceControlConfigurationName",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentityInternal)this).SourceControlConfigurationName, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentityInternal)this).ExtensionName = (string) content.GetValueForProperty("ExtensionName",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentityInternal)this).ExtensionName, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentityInternal)this).OperationId = (string) content.GetValueForProperty("OperationId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentityInternal)this).OperationId, global::System.Convert.ToString); - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentityInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentityInternal)this).Id, global::System.Convert.ToString); + if (content.Contains("SubscriptionId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentityInternal)this).SubscriptionId = (string) content.GetValueForProperty("SubscriptionId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentityInternal)this).SubscriptionId, global::System.Convert.ToString); + } + if (content.Contains("ResourceGroupName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentityInternal)this).ResourceGroupName = (string) content.GetValueForProperty("ResourceGroupName",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentityInternal)this).ResourceGroupName, global::System.Convert.ToString); + } + if (content.Contains("ClusterRp")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentityInternal)this).ClusterRp = (string) content.GetValueForProperty("ClusterRp",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentityInternal)this).ClusterRp, global::System.Convert.ToString); + } + if (content.Contains("ClusterResourceName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentityInternal)this).ClusterResourceName = (string) content.GetValueForProperty("ClusterResourceName",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentityInternal)this).ClusterResourceName, global::System.Convert.ToString); + } + if (content.Contains("ClusterName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentityInternal)this).ClusterName = (string) content.GetValueForProperty("ClusterName",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentityInternal)this).ClusterName, global::System.Convert.ToString); + } + if (content.Contains("ExtensionName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentityInternal)this).ExtensionName = (string) content.GetValueForProperty("ExtensionName",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentityInternal)this).ExtensionName, global::System.Convert.ToString); + } + if (content.Contains("OperationId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentityInternal)this).OperationId = (string) content.GetValueForProperty("OperationId",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentityInternal)this).OperationId, global::System.Convert.ToString); + } + if (content.Contains("FluxConfigurationName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentityInternal)this).FluxConfigurationName = (string) content.GetValueForProperty("FluxConfigurationName",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentityInternal)this).FluxConfigurationName, global::System.Convert.ToString); + } + if (content.Contains("SourceControlConfigurationName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentityInternal)this).SourceControlConfigurationName = (string) content.GetValueForProperty("SourceControlConfigurationName",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentityInternal)this).SourceControlConfigurationName, global::System.Convert.ToString); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentityInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentityInternal)this).Id, global::System.Convert.ToString); + } AfterDeserializePSObject(content); } diff --git a/src/KubernetesConfiguration/generated/api/Models/KubernetesConfigurationIdentity.TypeConverter.cs b/src/KubernetesConfiguration/generated/api/Models/KubernetesConfigurationIdentity.TypeConverter.cs index 0d1a3f1dd693..659a674a4e2d 100644 --- a/src/KubernetesConfiguration/generated/api/Models/KubernetesConfigurationIdentity.TypeConverter.cs +++ b/src/KubernetesConfiguration/generated/api/Models/KubernetesConfigurationIdentity.TypeConverter.cs @@ -14,20 +14,20 @@ public partial class KubernetesConfigurationIdentityTypeConverter : global::Syst { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// 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. + /// 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. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -80,19 +80,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// 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 + /// 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 + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -104,8 +105,8 @@ public static bool CanConvertFrom(dynamic sourceValue) 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 + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// diff --git a/src/KubernetesConfiguration/generated/api/Models/KubernetesConfigurationIdentity.cs b/src/KubernetesConfiguration/generated/api/Models/KubernetesConfigurationIdentity.cs index 3173673162b3..9a02e7e30f98 100644 --- a/src/KubernetesConfiguration/generated/api/Models/KubernetesConfigurationIdentity.cs +++ b/src/KubernetesConfiguration/generated/api/Models/KubernetesConfigurationIdentity.cs @@ -23,8 +23,7 @@ public partial class KubernetesConfigurationIdentity : private string _clusterResourceName; /// - /// The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or connectedClusters (for OnPrem K8S - /// clusters). + /// The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] public string ClusterResourceName { get => this._clusterResourceName; set => this._clusterResourceName = value; } @@ -33,8 +32,7 @@ public partial class KubernetesConfigurationIdentity : private string _clusterRp; /// - /// The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or Microsoft.Kubernetes (for OnPrem K8S - /// clusters). + /// The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] public string ClusterRp { get => this._clusterRp; set => this._clusterRp = value; } @@ -46,6 +44,13 @@ public partial class KubernetesConfigurationIdentity : [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] public string ExtensionName { get => this._extensionName; set => this._extensionName = value; } + /// Backing field for property. + private string _fluxConfigurationName; + + /// Name of the Flux Configuration. + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] + public string FluxConfigurationName { get => this._fluxConfigurationName; set => this._fluxConfigurationName = value; } + /// Backing field for property. private string _id; @@ -63,7 +68,7 @@ public partial class KubernetesConfigurationIdentity : /// Backing field for property. private string _resourceGroupName; - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } @@ -77,9 +82,7 @@ public partial class KubernetesConfigurationIdentity : /// Backing field for property. private string _subscriptionId; - /// - /// The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000) - /// + /// The ID of the target subscription. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Origin(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.PropertyOrigin.Owned)] public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -101,24 +104,22 @@ public partial interface IKubernetesConfigurationIdentity : PossibleTypes = new [] { typeof(string) })] string ClusterName { get; set; } /// - /// The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or connectedClusters (for OnPrem K8S - /// clusters). + /// The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, - Description = @"The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or connectedClusters (for OnPrem K8S clusters).", + Description = @"The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters.", SerializedName = @"clusterResourceName", PossibleTypes = new [] { typeof(string) })] string ClusterResourceName { get; set; } /// - /// The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or Microsoft.Kubernetes (for OnPrem K8S - /// clusters). + /// The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. /// [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, - Description = @"The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or Microsoft.Kubernetes (for OnPrem K8S clusters).", + Description = @"The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService.", SerializedName = @"clusterRp", PossibleTypes = new [] { typeof(string) })] string ClusterRp { get; set; } @@ -130,6 +131,14 @@ public partial interface IKubernetesConfigurationIdentity : SerializedName = @"extensionName", PossibleTypes = new [] { typeof(string) })] string ExtensionName { get; set; } + /// Name of the Flux Configuration. + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Name of the Flux Configuration.", + SerializedName = @"fluxConfigurationName", + PossibleTypes = new [] { typeof(string) })] + string FluxConfigurationName { get; set; } /// Resource identity path [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, @@ -146,11 +155,11 @@ public partial interface IKubernetesConfigurationIdentity : SerializedName = @"operationId", PossibleTypes = new [] { typeof(string) })] string OperationId { get; set; } - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, - Description = @"The name of the resource group.", + Description = @"The name of the resource group. The name is case insensitive.", SerializedName = @"resourceGroupName", PossibleTypes = new [] { typeof(string) })] string ResourceGroupName { get; set; } @@ -162,13 +171,11 @@ public partial interface IKubernetesConfigurationIdentity : SerializedName = @"sourceControlConfigurationName", PossibleTypes = new [] { typeof(string) })] string SourceControlConfigurationName { get; set; } - /// - /// The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000) - /// + /// The ID of the target subscription. [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, - Description = @"The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000)", + Description = @"The ID of the target subscription.", SerializedName = @"subscriptionId", PossibleTypes = new [] { typeof(string) })] string SubscriptionId { get; set; } @@ -180,28 +187,26 @@ internal partial interface IKubernetesConfigurationIdentityInternal /// The name of the kubernetes cluster. string ClusterName { get; set; } /// - /// The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or connectedClusters (for OnPrem K8S - /// clusters). + /// The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. /// string ClusterResourceName { get; set; } /// - /// The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or Microsoft.Kubernetes (for OnPrem K8S - /// clusters). + /// The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. /// string ClusterRp { get; set; } /// Name of the Extension. string ExtensionName { get; set; } + /// Name of the Flux Configuration. + string FluxConfigurationName { get; set; } /// Resource identity path string Id { get; set; } /// operation Id string OperationId { get; set; } - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. string ResourceGroupName { get; set; } /// Name of the Source Control Configuration. string SourceControlConfigurationName { get; set; } - /// - /// The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000) - /// + /// The ID of the target subscription. string SubscriptionId { get; set; } } diff --git a/src/KubernetesConfiguration/generated/api/Models/KubernetesConfigurationIdentity.json.cs b/src/KubernetesConfiguration/generated/api/Models/KubernetesConfigurationIdentity.json.cs index 6f7943fd11c4..cdb74aaf18d0 100644 --- a/src/KubernetesConfiguration/generated/api/Models/KubernetesConfigurationIdentity.json.cs +++ b/src/KubernetesConfiguration/generated/api/Models/KubernetesConfigurationIdentity.json.cs @@ -19,7 +19,7 @@ public partial class KubernetesConfigurationIdentity partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -29,7 +29,8 @@ public partial class KubernetesConfigurationIdentity /// /// 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. + /// 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. @@ -41,7 +42,8 @@ public partial class KubernetesConfigurationIdentity /// /// 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. + /// 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. @@ -79,9 +81,10 @@ internal KubernetesConfigurationIdentity(Microsoft.Azure.PowerShell.Cmdlets.Kube {_clusterRp = If( json?.PropertyT("clusterRp"), out var __jsonClusterRp) ? (string)__jsonClusterRp : (string)ClusterRp;} {_clusterResourceName = If( json?.PropertyT("clusterResourceName"), out var __jsonClusterResourceName) ? (string)__jsonClusterResourceName : (string)ClusterResourceName;} {_clusterName = If( json?.PropertyT("clusterName"), out var __jsonClusterName) ? (string)__jsonClusterName : (string)ClusterName;} - {_sourceControlConfigurationName = If( json?.PropertyT("sourceControlConfigurationName"), out var __jsonSourceControlConfigurationName) ? (string)__jsonSourceControlConfigurationName : (string)SourceControlConfigurationName;} {_extensionName = If( json?.PropertyT("extensionName"), out var __jsonExtensionName) ? (string)__jsonExtensionName : (string)ExtensionName;} {_operationId = If( json?.PropertyT("operationId"), out var __jsonOperationId) ? (string)__jsonOperationId : (string)OperationId;} + {_fluxConfigurationName = If( json?.PropertyT("fluxConfigurationName"), out var __jsonFluxConfigurationName) ? (string)__jsonFluxConfigurationName : (string)FluxConfigurationName;} + {_sourceControlConfigurationName = If( json?.PropertyT("sourceControlConfigurationName"), out var __jsonSourceControlConfigurationName) ? (string)__jsonSourceControlConfigurationName : (string)SourceControlConfigurationName;} {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)Id;} AfterFromJson(json); } @@ -110,9 +113,10 @@ public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.J AddIf( null != (((object)this._clusterRp)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonString(this._clusterRp.ToString()) : null, "clusterRp" ,container.Add ); AddIf( null != (((object)this._clusterResourceName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonString(this._clusterResourceName.ToString()) : null, "clusterResourceName" ,container.Add ); AddIf( null != (((object)this._clusterName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonString(this._clusterName.ToString()) : null, "clusterName" ,container.Add ); - AddIf( null != (((object)this._sourceControlConfigurationName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonString(this._sourceControlConfigurationName.ToString()) : null, "sourceControlConfigurationName" ,container.Add ); AddIf( null != (((object)this._extensionName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonString(this._extensionName.ToString()) : null, "extensionName" ,container.Add ); AddIf( null != (((object)this._operationId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonString(this._operationId.ToString()) : null, "operationId" ,container.Add ); + AddIf( null != (((object)this._fluxConfigurationName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonString(this._fluxConfigurationName.ToString()) : null, "fluxConfigurationName" ,container.Add ); + AddIf( null != (((object)this._sourceControlConfigurationName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonString(this._sourceControlConfigurationName.ToString()) : null, "sourceControlConfigurationName" ,container.Add ); AddIf( null != (((object)this._id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonString(this._id.ToString()) : null, "id" ,container.Add ); AfterToJson(ref container); return container; diff --git a/src/KubernetesConfiguration/generated/api/Support/AksIdentityType.Completer.cs b/src/KubernetesConfiguration/generated/api/Support/AksIdentityType.Completer.cs new file mode 100644 index 000000000000..43ffdfac1800 --- /dev/null +++ b/src/KubernetesConfiguration/generated/api/Support/AksIdentityType.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.KubernetesConfiguration.Support +{ + + /// The identity type. + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.AksIdentityTypeTypeConverter))] + public partial struct AksIdentityType : + 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) || "SystemAssigned".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'SystemAssigned'", "SystemAssigned", global::System.Management.Automation.CompletionResultType.ParameterValue, "SystemAssigned"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "UserAssigned".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'UserAssigned'", "UserAssigned", global::System.Management.Automation.CompletionResultType.ParameterValue, "UserAssigned"); + } + } + } +} \ No newline at end of file diff --git a/src/KubernetesConfiguration/generated/api/Support/AksIdentityType.TypeConverter.cs b/src/KubernetesConfiguration/generated/api/Support/AksIdentityType.TypeConverter.cs new file mode 100644 index 000000000000..4f00de868d22 --- /dev/null +++ b/src/KubernetesConfiguration/generated/api/Support/AksIdentityType.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.KubernetesConfiguration.Support +{ + + /// The identity type. + public partial class AksIdentityTypeTypeConverter : + 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) => AksIdentityType.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/KubernetesConfiguration/generated/api/Support/AksIdentityType.cs b/src/KubernetesConfiguration/generated/api/Support/AksIdentityType.cs new file mode 100644 index 000000000000..5a77e32534c2 --- /dev/null +++ b/src/KubernetesConfiguration/generated/api/Support/AksIdentityType.cs @@ -0,0 +1,98 @@ +// 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.KubernetesConfiguration.Support +{ + + /// The identity type. + public partial struct AksIdentityType : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.AksIdentityType SystemAssigned = @"SystemAssigned"; + + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.AksIdentityType UserAssigned = @"UserAssigned"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private AksIdentityType(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Conversion from arbitrary object to AksIdentityType + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new AksIdentityType(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type AksIdentityType + /// 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.KubernetesConfiguration.Support.AksIdentityType e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type AksIdentityType (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 AksIdentityType && Equals((AksIdentityType)obj); + } + + /// Returns hashCode for enum AksIdentityType + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for AksIdentityType + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to AksIdentityType + /// the value to convert to an instance of . + + public static implicit operator AksIdentityType(string value) + { + return new AksIdentityType(value); + } + + /// Implicit operator to convert AksIdentityType to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.AksIdentityType e) + { + return e._value; + } + + /// Overriding != operator for enum AksIdentityType + /// 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.KubernetesConfiguration.Support.AksIdentityType e1, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.AksIdentityType e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum AksIdentityType + /// 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.KubernetesConfiguration.Support.AksIdentityType e1, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.AksIdentityType e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/src/KubernetesConfiguration/generated/api/Support/ComplianceStateType.TypeConverter.cs b/src/KubernetesConfiguration/generated/api/Support/ComplianceStateType.TypeConverter.cs index 6658c97f5ae8..b8ac1647a45e 100644 --- a/src/KubernetesConfiguration/generated/api/Support/ComplianceStateType.TypeConverter.cs +++ b/src/KubernetesConfiguration/generated/api/Support/ComplianceStateType.TypeConverter.cs @@ -12,32 +12,32 @@ public partial class ComplianceStateTypeTypeConverter : { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// 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. + /// 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. + /// 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. + /// 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 + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to diff --git a/src/KubernetesConfiguration/generated/api/Support/ComplianceStateType.cs b/src/KubernetesConfiguration/generated/api/Support/ComplianceStateType.cs index 119991466ddd..c90a283523e8 100644 --- a/src/KubernetesConfiguration/generated/api/Support/ComplianceStateType.cs +++ b/src/KubernetesConfiguration/generated/api/Support/ComplianceStateType.cs @@ -23,7 +23,7 @@ public partial struct ComplianceStateType : /// the value for an instance of the Enum. private string _value { get; set; } - /// Creates an instance of the + /// Creates an instance of the Enum class. /// the value to create an instance for. private ComplianceStateType(string underlyingValue) { @@ -84,8 +84,8 @@ public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Kubern } /// Overriding != operator for enum ComplianceStateType - /// the value to compare against - /// the value to compare against + /// 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.KubernetesConfiguration.Support.ComplianceStateType e1, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ComplianceStateType e2) { @@ -93,8 +93,8 @@ public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Kubern } /// Overriding == operator for enum ComplianceStateType - /// the value to compare against - /// the value to compare against + /// 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.KubernetesConfiguration.Support.ComplianceStateType e1, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ComplianceStateType e2) { diff --git a/src/KubernetesConfiguration/generated/api/Support/CreatedByType.TypeConverter.cs b/src/KubernetesConfiguration/generated/api/Support/CreatedByType.TypeConverter.cs index 0f1dae15f86f..e88f2fc6c091 100644 --- a/src/KubernetesConfiguration/generated/api/Support/CreatedByType.TypeConverter.cs +++ b/src/KubernetesConfiguration/generated/api/Support/CreatedByType.TypeConverter.cs @@ -12,32 +12,32 @@ public partial class CreatedByTypeTypeConverter : { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// 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. + /// 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. + /// 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. + /// 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 + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to diff --git a/src/KubernetesConfiguration/generated/api/Support/CreatedByType.cs b/src/KubernetesConfiguration/generated/api/Support/CreatedByType.cs index 52b279b3eee3..1dfd308effef 100644 --- a/src/KubernetesConfiguration/generated/api/Support/CreatedByType.cs +++ b/src/KubernetesConfiguration/generated/api/Support/CreatedByType.cs @@ -28,7 +28,7 @@ internal static object CreateFrom(object value) return new CreatedByType(global::System.Convert.ToString(value)); } - /// Creates an instance of the + /// Creates an instance of the Enum class. /// the value to create an instance for. private CreatedByType(string underlyingValue) { @@ -82,8 +82,8 @@ public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Kubern } /// Overriding != operator for enum CreatedByType - /// the value to compare against - /// the value to compare against + /// 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.KubernetesConfiguration.Support.CreatedByType e1, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.CreatedByType e2) { @@ -91,8 +91,8 @@ public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Kubern } /// Overriding == operator for enum CreatedByType - /// the value to compare against - /// the value to compare against + /// 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.KubernetesConfiguration.Support.CreatedByType e1, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.CreatedByType e2) { diff --git a/src/KubernetesConfiguration/generated/api/Support/FluxComplianceState.Completer.cs b/src/KubernetesConfiguration/generated/api/Support/FluxComplianceState.Completer.cs new file mode 100644 index 000000000000..eafc276daccf --- /dev/null +++ b/src/KubernetesConfiguration/generated/api/Support/FluxComplianceState.Completer.cs @@ -0,0 +1,51 @@ +// 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.KubernetesConfiguration.Support +{ + + /// Compliance state of the cluster object. + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.FluxComplianceStateTypeConverter))] + public partial struct FluxComplianceState : + 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) || "Compliant".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Compliant'", "Compliant", global::System.Management.Automation.CompletionResultType.ParameterValue, "Compliant"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Non-Compliant".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Non-Compliant'", "Non-Compliant", global::System.Management.Automation.CompletionResultType.ParameterValue, "Non-Compliant"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Pending".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Pending'", "Pending", global::System.Management.Automation.CompletionResultType.ParameterValue, "Pending"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Suspended".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Suspended'", "Suspended", global::System.Management.Automation.CompletionResultType.ParameterValue, "Suspended"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Unknown".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Unknown'", "Unknown", global::System.Management.Automation.CompletionResultType.ParameterValue, "Unknown"); + } + } + } +} \ No newline at end of file diff --git a/src/KubernetesConfiguration/generated/api/Support/FluxComplianceState.TypeConverter.cs b/src/KubernetesConfiguration/generated/api/Support/FluxComplianceState.TypeConverter.cs new file mode 100644 index 000000000000..eca2ab598cb1 --- /dev/null +++ b/src/KubernetesConfiguration/generated/api/Support/FluxComplianceState.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.KubernetesConfiguration.Support +{ + + /// Compliance state of the cluster object. + public partial class FluxComplianceStateTypeConverter : + 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) => FluxComplianceState.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/KubernetesConfiguration/generated/api/Support/FluxComplianceState.cs b/src/KubernetesConfiguration/generated/api/Support/FluxComplianceState.cs new file mode 100644 index 000000000000..887d93faa559 --- /dev/null +++ b/src/KubernetesConfiguration/generated/api/Support/FluxComplianceState.cs @@ -0,0 +1,104 @@ +// 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.KubernetesConfiguration.Support +{ + + /// Compliance state of the cluster object. + public partial struct FluxComplianceState : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.FluxComplianceState Compliant = @"Compliant"; + + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.FluxComplianceState NonCompliant = @"Non-Compliant"; + + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.FluxComplianceState Pending = @"Pending"; + + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.FluxComplianceState Suspended = @"Suspended"; + + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.FluxComplianceState Unknown = @"Unknown"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to FluxComplianceState + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new FluxComplianceState(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type FluxComplianceState + /// 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.KubernetesConfiguration.Support.FluxComplianceState e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type FluxComplianceState (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 FluxComplianceState && Equals((FluxComplianceState)obj); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private FluxComplianceState(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns hashCode for enum FluxComplianceState + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for FluxComplianceState + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to FluxComplianceState + /// the value to convert to an instance of . + + public static implicit operator FluxComplianceState(string value) + { + return new FluxComplianceState(value); + } + + /// Implicit operator to convert FluxComplianceState to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.FluxComplianceState e) + { + return e._value; + } + + /// Overriding != operator for enum FluxComplianceState + /// 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.KubernetesConfiguration.Support.FluxComplianceState e1, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.FluxComplianceState e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum FluxComplianceState + /// 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.KubernetesConfiguration.Support.FluxComplianceState e1, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.FluxComplianceState e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/src/KubernetesConfiguration/generated/api/Support/KustomizationValidationType.Completer.cs b/src/KubernetesConfiguration/generated/api/Support/KustomizationValidationType.Completer.cs new file mode 100644 index 000000000000..ba1818327087 --- /dev/null +++ b/src/KubernetesConfiguration/generated/api/Support/KustomizationValidationType.Completer.cs @@ -0,0 +1,45 @@ +// 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.KubernetesConfiguration.Support +{ + + /// + /// Specify whether to validate the Kubernetes objects referenced in the Kustomization before applying them to the cluster. + /// + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.KustomizationValidationTypeTypeConverter))] + public partial struct KustomizationValidationType : + 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) || "client".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'client'", "client", global::System.Management.Automation.CompletionResultType.ParameterValue, "client"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "server".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'server'", "server", global::System.Management.Automation.CompletionResultType.ParameterValue, "server"); + } + } + } +} \ No newline at end of file diff --git a/src/KubernetesConfiguration/generated/api/Support/KustomizationValidationType.TypeConverter.cs b/src/KubernetesConfiguration/generated/api/Support/KustomizationValidationType.TypeConverter.cs new file mode 100644 index 000000000000..c1bc044ead3f --- /dev/null +++ b/src/KubernetesConfiguration/generated/api/Support/KustomizationValidationType.TypeConverter.cs @@ -0,0 +1,61 @@ +// 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.KubernetesConfiguration.Support +{ + + /// + /// Specify whether to validate the Kubernetes objects referenced in the Kustomization before applying them to the cluster. + /// + public partial class KustomizationValidationTypeTypeConverter : + 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) => KustomizationValidationType.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/KubernetesConfiguration/generated/api/Support/KustomizationValidationType.cs b/src/KubernetesConfiguration/generated/api/Support/KustomizationValidationType.cs new file mode 100644 index 000000000000..12126640cbb0 --- /dev/null +++ b/src/KubernetesConfiguration/generated/api/Support/KustomizationValidationType.cs @@ -0,0 +1,106 @@ +// 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.KubernetesConfiguration.Support +{ + + /// + /// Specify whether to validate the Kubernetes objects referenced in the Kustomization before applying them to the cluster. + /// + public partial struct KustomizationValidationType : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.KustomizationValidationType Client = @"client"; + + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.KustomizationValidationType None = @"none"; + + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.KustomizationValidationType Server = @"server"; + + /// + /// the value for an instance of the Enum. + /// + private string _value { get; set; } + + /// Conversion from arbitrary object to KustomizationValidationType + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new KustomizationValidationType(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type KustomizationValidationType + /// 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.KubernetesConfiguration.Support.KustomizationValidationType e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type KustomizationValidationType (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 KustomizationValidationType && Equals((KustomizationValidationType)obj); + } + + /// Returns hashCode for enum KustomizationValidationType + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// + /// Creates an instance of the Enum class. + /// + /// the value to create an instance for. + private KustomizationValidationType(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for KustomizationValidationType + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to KustomizationValidationType + /// the value to convert to an instance of . + + public static implicit operator KustomizationValidationType(string value) + { + return new KustomizationValidationType(value); + } + + /// Implicit operator to convert KustomizationValidationType to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.KustomizationValidationType e) + { + return e._value; + } + + /// Overriding != operator for enum KustomizationValidationType + /// 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.KubernetesConfiguration.Support.KustomizationValidationType e1, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.KustomizationValidationType e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum KustomizationValidationType + /// 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.KubernetesConfiguration.Support.KustomizationValidationType e1, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.KustomizationValidationType e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/src/KubernetesConfiguration/generated/api/Support/LevelType.TypeConverter.cs b/src/KubernetesConfiguration/generated/api/Support/LevelType.TypeConverter.cs index 22f7628f541e..61388bbc07fb 100644 --- a/src/KubernetesConfiguration/generated/api/Support/LevelType.TypeConverter.cs +++ b/src/KubernetesConfiguration/generated/api/Support/LevelType.TypeConverter.cs @@ -12,32 +12,32 @@ public partial class LevelTypeTypeConverter : { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// 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. + /// 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. + /// 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. + /// 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 + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to diff --git a/src/KubernetesConfiguration/generated/api/Support/LevelType.cs b/src/KubernetesConfiguration/generated/api/Support/LevelType.cs index 8e0a9a7d5a1c..b87d66965ff8 100644 --- a/src/KubernetesConfiguration/generated/api/Support/LevelType.cs +++ b/src/KubernetesConfiguration/generated/api/Support/LevelType.cs @@ -49,7 +49,7 @@ public override int GetHashCode() return this._value.GetHashCode(); } - /// Creates an instance of the + /// Creates an instance of the Enum class. /// the value to create an instance for. private LevelType(string underlyingValue) { @@ -80,8 +80,8 @@ public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Kubern } /// Overriding != operator for enum LevelType - /// the value to compare against - /// the value to compare against + /// 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.KubernetesConfiguration.Support.LevelType e1, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.LevelType e2) { @@ -89,8 +89,8 @@ public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Kubern } /// Overriding == operator for enum LevelType - /// the value to compare against - /// the value to compare against + /// 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.KubernetesConfiguration.Support.LevelType e1, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.LevelType e2) { diff --git a/src/KubernetesConfiguration/generated/api/Support/MessageLevelType.TypeConverter.cs b/src/KubernetesConfiguration/generated/api/Support/MessageLevelType.TypeConverter.cs index 2a1b1b635895..63f2c70f3a12 100644 --- a/src/KubernetesConfiguration/generated/api/Support/MessageLevelType.TypeConverter.cs +++ b/src/KubernetesConfiguration/generated/api/Support/MessageLevelType.TypeConverter.cs @@ -12,32 +12,32 @@ public partial class MessageLevelTypeTypeConverter : { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// 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. + /// 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. + /// 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. + /// 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 + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to diff --git a/src/KubernetesConfiguration/generated/api/Support/MessageLevelType.cs b/src/KubernetesConfiguration/generated/api/Support/MessageLevelType.cs index be77ddd87ec6..477de7d36eb8 100644 --- a/src/KubernetesConfiguration/generated/api/Support/MessageLevelType.cs +++ b/src/KubernetesConfiguration/generated/api/Support/MessageLevelType.cs @@ -49,7 +49,7 @@ public override int GetHashCode() return this._value.GetHashCode(); } - /// Creates an instance of the + /// Creates an instance of the Enum class. /// the value to create an instance for. private MessageLevelType(string underlyingValue) { @@ -80,8 +80,8 @@ public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Kubern } /// Overriding != operator for enum MessageLevelType - /// the value to compare against - /// the value to compare against + /// 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.KubernetesConfiguration.Support.MessageLevelType e1, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.MessageLevelType e2) { @@ -89,8 +89,8 @@ public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Kubern } /// Overriding == operator for enum MessageLevelType - /// the value to compare against - /// the value to compare against + /// 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.KubernetesConfiguration.Support.MessageLevelType e1, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.MessageLevelType e2) { diff --git a/src/KubernetesConfiguration/generated/api/Support/OperatorScopeType.TypeConverter.cs b/src/KubernetesConfiguration/generated/api/Support/OperatorScopeType.TypeConverter.cs index 7e3c8ad407e1..4e35b7cbd2f5 100644 --- a/src/KubernetesConfiguration/generated/api/Support/OperatorScopeType.TypeConverter.cs +++ b/src/KubernetesConfiguration/generated/api/Support/OperatorScopeType.TypeConverter.cs @@ -12,32 +12,32 @@ public partial class OperatorScopeTypeTypeConverter : { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// 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. + /// 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. + /// 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. + /// 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 + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to diff --git a/src/KubernetesConfiguration/generated/api/Support/OperatorScopeType.cs b/src/KubernetesConfiguration/generated/api/Support/OperatorScopeType.cs index 216032bf6db1..6a7d4f710ea8 100644 --- a/src/KubernetesConfiguration/generated/api/Support/OperatorScopeType.cs +++ b/src/KubernetesConfiguration/generated/api/Support/OperatorScopeType.cs @@ -47,7 +47,7 @@ public override int GetHashCode() return this._value.GetHashCode(); } - /// Creates an instance of the + /// Creates an instance of the Enum class. /// the value to create an instance for. private OperatorScopeType(string underlyingValue) { @@ -78,8 +78,8 @@ public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Kubern } /// Overriding != operator for enum OperatorScopeType - /// the value to compare against - /// the value to compare against + /// 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.KubernetesConfiguration.Support.OperatorScopeType e1, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.OperatorScopeType e2) { @@ -87,8 +87,8 @@ public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Kubern } /// Overriding == operator for enum OperatorScopeType - /// the value to compare against - /// the value to compare against + /// 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.KubernetesConfiguration.Support.OperatorScopeType e1, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.OperatorScopeType e2) { diff --git a/src/KubernetesConfiguration/generated/api/Support/OperatorType.TypeConverter.cs b/src/KubernetesConfiguration/generated/api/Support/OperatorType.TypeConverter.cs index cd7aa98b34ed..5e88f1f19a89 100644 --- a/src/KubernetesConfiguration/generated/api/Support/OperatorType.TypeConverter.cs +++ b/src/KubernetesConfiguration/generated/api/Support/OperatorType.TypeConverter.cs @@ -12,32 +12,32 @@ public partial class OperatorTypeTypeConverter : { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// 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. + /// 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. + /// 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. + /// 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 + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to diff --git a/src/KubernetesConfiguration/generated/api/Support/OperatorType.cs b/src/KubernetesConfiguration/generated/api/Support/OperatorType.cs index f7e9d924b03b..2857227378b5 100644 --- a/src/KubernetesConfiguration/generated/api/Support/OperatorType.cs +++ b/src/KubernetesConfiguration/generated/api/Support/OperatorType.cs @@ -45,7 +45,7 @@ public override int GetHashCode() return this._value.GetHashCode(); } - /// Creates an instance of the + /// Creates an instance of the Enum class. /// the value to create an instance for. private OperatorType(string underlyingValue) { @@ -76,8 +76,8 @@ public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Kubern } /// Overriding != operator for enum OperatorType - /// the value to compare against - /// the value to compare against + /// 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.KubernetesConfiguration.Support.OperatorType e1, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.OperatorType e2) { @@ -85,8 +85,8 @@ public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Kubern } /// Overriding == operator for enum OperatorType - /// the value to compare against - /// the value to compare against + /// 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.KubernetesConfiguration.Support.OperatorType e1, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.OperatorType e2) { diff --git a/src/KubernetesConfiguration/generated/api/Support/ProvisioningState.Completer.cs b/src/KubernetesConfiguration/generated/api/Support/ProvisioningState.Completer.cs index 0ec38e9b3217..7aa1a17de060 100644 --- a/src/KubernetesConfiguration/generated/api/Support/ProvisioningState.Completer.cs +++ b/src/KubernetesConfiguration/generated/api/Support/ProvisioningState.Completer.cs @@ -6,7 +6,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support { - /// The provisioning state of the extension resource. + /// The provisioning state of the resource. [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningStateTypeConverter))] public partial struct ProvisioningState : System.Management.Automation.IArgumentCompleter diff --git a/src/KubernetesConfiguration/generated/api/Support/ProvisioningState.TypeConverter.cs b/src/KubernetesConfiguration/generated/api/Support/ProvisioningState.TypeConverter.cs index d31a403399e1..132ba6a6736d 100644 --- a/src/KubernetesConfiguration/generated/api/Support/ProvisioningState.TypeConverter.cs +++ b/src/KubernetesConfiguration/generated/api/Support/ProvisioningState.TypeConverter.cs @@ -6,38 +6,38 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support { - /// The provisioning state of the extension resource. + /// The provisioning state of the resource. public partial class ProvisioningStateTypeConverter : global::System.Management.Automation.PSTypeConverter { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// 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. + /// 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. + /// 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. + /// 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 + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to diff --git a/src/KubernetesConfiguration/generated/api/Support/ProvisioningState.cs b/src/KubernetesConfiguration/generated/api/Support/ProvisioningState.cs index d971d772b2d2..1cedb85372d9 100644 --- a/src/KubernetesConfiguration/generated/api/Support/ProvisioningState.cs +++ b/src/KubernetesConfiguration/generated/api/Support/ProvisioningState.cs @@ -6,7 +6,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support { - /// The provisioning state of the extension resource. + /// The provisioning state of the resource. public partial struct ProvisioningState : System.IEquatable { @@ -55,7 +55,7 @@ public override int GetHashCode() return this._value.GetHashCode(); } - /// Creates an instance of the + /// Creates an instance of the Enum class. /// the value to create an instance for. private ProvisioningState(string underlyingValue) { @@ -86,8 +86,8 @@ public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Kubern } /// Overriding != operator for enum ProvisioningState - /// the value to compare against - /// the value to compare against + /// 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.KubernetesConfiguration.Support.ProvisioningState e1, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningState e2) { @@ -95,8 +95,8 @@ public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Kubern } /// Overriding == operator for enum ProvisioningState - /// the value to compare against - /// the value to compare against + /// 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.KubernetesConfiguration.Support.ProvisioningState e1, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningState e2) { diff --git a/src/KubernetesConfiguration/generated/api/Support/ProvisioningStateType.TypeConverter.cs b/src/KubernetesConfiguration/generated/api/Support/ProvisioningStateType.TypeConverter.cs index fdc99c4f31b6..e3d9e9118411 100644 --- a/src/KubernetesConfiguration/generated/api/Support/ProvisioningStateType.TypeConverter.cs +++ b/src/KubernetesConfiguration/generated/api/Support/ProvisioningStateType.TypeConverter.cs @@ -12,32 +12,32 @@ public partial class ProvisioningStateTypeTypeConverter : { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// 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. + /// 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. + /// 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. + /// 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 + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to diff --git a/src/KubernetesConfiguration/generated/api/Support/ProvisioningStateType.cs b/src/KubernetesConfiguration/generated/api/Support/ProvisioningStateType.cs index 991cb0d8b360..f03248d36fea 100644 --- a/src/KubernetesConfiguration/generated/api/Support/ProvisioningStateType.cs +++ b/src/KubernetesConfiguration/generated/api/Support/ProvisioningStateType.cs @@ -53,7 +53,7 @@ public override int GetHashCode() return this._value.GetHashCode(); } - /// Creates an instance of the + /// Creates an instance of the Enum class. /// the value to create an instance for. private ProvisioningStateType(string underlyingValue) { @@ -84,8 +84,8 @@ public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Kubern } /// Overriding != operator for enum ProvisioningStateType - /// the value to compare against - /// the value to compare against + /// 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.KubernetesConfiguration.Support.ProvisioningStateType e1, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningStateType e2) { @@ -93,8 +93,8 @@ public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Kubern } /// Overriding == operator for enum ProvisioningStateType - /// the value to compare against - /// the value to compare against + /// 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.KubernetesConfiguration.Support.ProvisioningStateType e1, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ProvisioningStateType e2) { diff --git a/src/KubernetesConfiguration/generated/api/Support/ResourceIdentityType.TypeConverter.cs b/src/KubernetesConfiguration/generated/api/Support/ResourceIdentityType.TypeConverter.cs index 914a143b6a4b..4de8b162e663 100644 --- a/src/KubernetesConfiguration/generated/api/Support/ResourceIdentityType.TypeConverter.cs +++ b/src/KubernetesConfiguration/generated/api/Support/ResourceIdentityType.TypeConverter.cs @@ -12,32 +12,32 @@ public partial class ResourceIdentityTypeTypeConverter : { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// 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. + /// 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. + /// 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. + /// 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 + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to diff --git a/src/KubernetesConfiguration/generated/api/Support/ResourceIdentityType.cs b/src/KubernetesConfiguration/generated/api/Support/ResourceIdentityType.cs index c34d62d55484..242b162de6f0 100644 --- a/src/KubernetesConfiguration/generated/api/Support/ResourceIdentityType.cs +++ b/src/KubernetesConfiguration/generated/api/Support/ResourceIdentityType.cs @@ -45,7 +45,7 @@ public override int GetHashCode() return this._value.GetHashCode(); } - /// Creates an instance of the + /// Creates an instance of the Enum class. /// the value to create an instance for. private ResourceIdentityType(string underlyingValue) { @@ -76,8 +76,8 @@ public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Kubern } /// Overriding != operator for enum ResourceIdentityType - /// the value to compare against - /// the value to compare against + /// 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.KubernetesConfiguration.Support.ResourceIdentityType e1, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ResourceIdentityType e2) { @@ -85,8 +85,8 @@ public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Kubern } /// Overriding == operator for enum ResourceIdentityType - /// the value to compare against - /// the value to compare against + /// 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.KubernetesConfiguration.Support.ResourceIdentityType e1, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ResourceIdentityType e2) { diff --git a/src/KubernetesConfiguration/generated/api/Support/ScopeType.Completer.cs b/src/KubernetesConfiguration/generated/api/Support/ScopeType.Completer.cs new file mode 100644 index 000000000000..c6e28714a1f2 --- /dev/null +++ b/src/KubernetesConfiguration/generated/api/Support/ScopeType.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.KubernetesConfiguration.Support +{ + + /// Scope at which the configuration will be installed. + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ScopeTypeTypeConverter))] + public partial struct ScopeType : + 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) || "cluster".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'cluster'", "cluster", global::System.Management.Automation.CompletionResultType.ParameterValue, "cluster"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "namespace".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'namespace'", "namespace", global::System.Management.Automation.CompletionResultType.ParameterValue, "namespace"); + } + } + } +} \ No newline at end of file diff --git a/src/KubernetesConfiguration/generated/api/Support/ScopeType.TypeConverter.cs b/src/KubernetesConfiguration/generated/api/Support/ScopeType.TypeConverter.cs new file mode 100644 index 000000000000..986f86229635 --- /dev/null +++ b/src/KubernetesConfiguration/generated/api/Support/ScopeType.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.KubernetesConfiguration.Support +{ + + /// Scope at which the configuration will be installed. + public partial class ScopeTypeTypeConverter : + 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) => ScopeType.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/KubernetesConfiguration/generated/api/Support/ScopeType.cs b/src/KubernetesConfiguration/generated/api/Support/ScopeType.cs new file mode 100644 index 000000000000..cd8d6362764f --- /dev/null +++ b/src/KubernetesConfiguration/generated/api/Support/ScopeType.cs @@ -0,0 +1,98 @@ +// 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.KubernetesConfiguration.Support +{ + + /// Scope at which the configuration will be installed. + public partial struct ScopeType : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ScopeType Cluster = @"cluster"; + + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ScopeType Namespace = @"namespace"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to ScopeType + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new ScopeType(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type ScopeType + /// 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.KubernetesConfiguration.Support.ScopeType e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type ScopeType (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 ScopeType && Equals((ScopeType)obj); + } + + /// Returns hashCode for enum ScopeType + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private ScopeType(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for ScopeType + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to ScopeType + /// the value to convert to an instance of . + + public static implicit operator ScopeType(string value) + { + return new ScopeType(value); + } + + /// Implicit operator to convert ScopeType to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ScopeType e) + { + return e._value; + } + + /// Overriding != operator for enum ScopeType + /// 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.KubernetesConfiguration.Support.ScopeType e1, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ScopeType e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum ScopeType + /// 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.KubernetesConfiguration.Support.ScopeType e1, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ScopeType e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/src/KubernetesConfiguration/generated/api/Support/SourceKindType.Completer.cs b/src/KubernetesConfiguration/generated/api/Support/SourceKindType.Completer.cs new file mode 100644 index 000000000000..690065e4debf --- /dev/null +++ b/src/KubernetesConfiguration/generated/api/Support/SourceKindType.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.KubernetesConfiguration.Support +{ + + /// Source Kind to pull the configuration data from. + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindTypeTypeConverter))] + public partial struct SourceKindType : + 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) || "GitRepository".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'GitRepository'", "GitRepository", global::System.Management.Automation.CompletionResultType.ParameterValue, "GitRepository"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Bucket".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Bucket'", "Bucket", global::System.Management.Automation.CompletionResultType.ParameterValue, "Bucket"); + } + } + } +} \ No newline at end of file diff --git a/src/KubernetesConfiguration/generated/api/Support/SourceKindType.TypeConverter.cs b/src/KubernetesConfiguration/generated/api/Support/SourceKindType.TypeConverter.cs new file mode 100644 index 000000000000..55e841443b19 --- /dev/null +++ b/src/KubernetesConfiguration/generated/api/Support/SourceKindType.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.KubernetesConfiguration.Support +{ + + /// Source Kind to pull the configuration data from. + public partial class SourceKindTypeTypeConverter : + 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) => SourceKindType.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/KubernetesConfiguration/generated/api/Support/SourceKindType.cs b/src/KubernetesConfiguration/generated/api/Support/SourceKindType.cs new file mode 100644 index 000000000000..3bb0d35acd7a --- /dev/null +++ b/src/KubernetesConfiguration/generated/api/Support/SourceKindType.cs @@ -0,0 +1,98 @@ +// 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.KubernetesConfiguration.Support +{ + + /// Source Kind to pull the configuration data from. + public partial struct SourceKindType : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType Bucket = @"Bucket"; + + public static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType GitRepository = @"GitRepository"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to SourceKindType + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new SourceKindType(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type SourceKindType + /// 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.KubernetesConfiguration.Support.SourceKindType e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type SourceKindType (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 SourceKindType && Equals((SourceKindType)obj); + } + + /// Returns hashCode for enum SourceKindType + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private SourceKindType(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for SourceKindType + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to SourceKindType + /// the value to convert to an instance of . + + public static implicit operator SourceKindType(string value) + { + return new SourceKindType(value); + } + + /// Implicit operator to convert SourceKindType to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType e) + { + return e._value; + } + + /// Overriding != operator for enum SourceKindType + /// 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.KubernetesConfiguration.Support.SourceKindType e1, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum SourceKindType + /// 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.KubernetesConfiguration.Support.SourceKindType e1, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/src/KubernetesConfiguration/generated/cmdlets/GetAzKubernetesConfigFluxOperationStatus_Get.cs b/src/KubernetesConfiguration/generated/cmdlets/GetAzKubernetesConfigFluxOperationStatus_Get.cs new file mode 100644 index 000000000000..8d4ccaccd9aa --- /dev/null +++ b/src/KubernetesConfiguration/generated/cmdlets/GetAzKubernetesConfigFluxOperationStatus_Get.cs @@ -0,0 +1,465 @@ +// 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.KubernetesConfiguration.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; + using System; + + /// Get Async Operation status + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/{fluxConfigurationName}/operations/{operationId}" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzKubernetesConfigFluxOperationStatus_Get")] + [global::System.Management.Automation.Alias("Get-AzK8sConfigFluxOperationStatus")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResult))] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Description(@"Get Async Operation status")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Generated] + public partial class GetAzKubernetesConfigFluxOperationStatus_Get : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.KubernetesConfiguration Client => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.ClientAPI; + + /// Backing field for property. + private string _clusterName; + + /// The name of the kubernetes cluster. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the kubernetes cluster.")] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the kubernetes cluster.", + SerializedName = @"clusterName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] + public string ClusterName { get => this._clusterName; set => this._clusterName = value; } + + /// Backing field for property. + private string _clusterRp; + + /// + /// The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService.")] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService.", + SerializedName = @"clusterRp", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] + public string ClusterRp { get => this._clusterRp; set => this._clusterRp = value; } + + /// Backing field for property. + private string _clusterType; + + /// + /// The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters.")] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters.", + SerializedName = @"clusterResourceName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] + public string ClusterType { get => this._clusterType; set => this._clusterType = 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.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Backing field for property. + private string _fluxConfigurationName; + + /// Name of the Flux Configuration. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Flux Configuration.")] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Flux Configuration.", + SerializedName = @"fluxConfigurationName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] + public string FluxConfigurationName { get => this._fluxConfigurationName; set => this._fluxConfigurationName = value; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _operationId; + + /// operation Id + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "operation Id")] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"operation Id", + SerializedName = @"operationId", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] + public string OperationId { get => this._operationId; set => this._operationId = value; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.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.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResult + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzKubernetesConfigFluxOperationStatus_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.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.FluxConfigOperationStatusGet(SubscriptionId, ResourceGroupName, ClusterRp, ClusterType, ClusterName, FluxConfigurationName, OperationId, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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,ClusterRp=ClusterRp,ClusterType=ClusterType,ClusterName=ClusterName,FluxConfigurationName=FluxConfigurationName,OperationId=OperationId}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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, ClusterRp=ClusterRp, ClusterType=ClusterType, ClusterName=ClusterName, FluxConfigurationName=FluxConfigurationName, OperationId=OperationId }) + { + 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, ClusterRp=ClusterRp, ClusterType=ClusterType, ClusterName=ClusterName, FluxConfigurationName=FluxConfigurationName, OperationId=OperationId }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResult + /// 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.KubernetesConfiguration.Models.Api20220301.IOperationStatusResult + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/src/KubernetesConfiguration/generated/cmdlets/GetAzKubernetesConfigFluxOperationStatus_GetViaIdentity.cs b/src/KubernetesConfiguration/generated/cmdlets/GetAzKubernetesConfigFluxOperationStatus_GetViaIdentity.cs new file mode 100644 index 000000000000..8da2540754d8 --- /dev/null +++ b/src/KubernetesConfiguration/generated/cmdlets/GetAzKubernetesConfigFluxOperationStatus_GetViaIdentity.cs @@ -0,0 +1,400 @@ +// 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.KubernetesConfiguration.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; + using System; + + /// Get Async Operation status + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/{fluxConfigurationName}/operations/{operationId}" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzKubernetesConfigFluxOperationStatus_GetViaIdentity")] + [global::System.Management.Automation.Alias("Get-AzK8sConfigFluxOperationStatus")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResult))] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Description(@"Get Async Operation status")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Generated] + public partial class GetAzKubernetesConfigFluxOperationStatus_GetViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.KubernetesConfiguration Client => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentity 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.KubernetesConfiguration.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResult + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzKubernetesConfigFluxOperationStatus_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.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.FluxConfigOperationStatusGetViaIdentity(InputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ClusterRp) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ClusterRp"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ClusterResourceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ClusterResourceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ClusterName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ClusterName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.FluxConfigurationName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.FluxConfigurationName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.OperationId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.OperationId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.FluxConfigOperationStatusGet(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.ClusterRp ?? null, InputObject.ClusterResourceName ?? null, InputObject.ClusterName ?? null, InputObject.FluxConfigurationName ?? null, InputObject.OperationId ?? null, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResult + /// 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.KubernetesConfiguration.Models.Api20220301.IOperationStatusResult + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/src/KubernetesConfiguration/generated/cmdlets/GetAzKubernetesConfigurationFlux_Get.cs b/src/KubernetesConfiguration/generated/cmdlets/GetAzKubernetesConfigurationFlux_Get.cs new file mode 100644 index 000000000000..4753a4201959 --- /dev/null +++ b/src/KubernetesConfiguration/generated/cmdlets/GetAzKubernetesConfigurationFlux_Get.cs @@ -0,0 +1,452 @@ +// 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.KubernetesConfiguration.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; + using System; + + /// Gets details of the Flux Configuration. + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/{fluxConfigurationName}" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzKubernetesConfigurationFlux_Get")] + [global::System.Management.Automation.Alias("Get-AzK8sConfigurationFlux")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfiguration))] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Description(@"Gets details of the Flux Configuration.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Generated] + public partial class GetAzKubernetesConfigurationFlux_Get : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.KubernetesConfiguration Client => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.ClientAPI; + + /// Backing field for property. + private string _clusterName; + + /// The name of the kubernetes cluster. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the kubernetes cluster.")] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the kubernetes cluster.", + SerializedName = @"clusterName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] + public string ClusterName { get => this._clusterName; set => this._clusterName = value; } + + /// Backing field for property. + private string _clusterRp; + + /// + /// The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService.")] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService.", + SerializedName = @"clusterRp", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] + public string ClusterRp { get => this._clusterRp; set => this._clusterRp = value; } + + /// Backing field for property. + private string _clusterType; + + /// + /// The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters.")] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters.", + SerializedName = @"clusterResourceName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] + public string ClusterType { get => this._clusterType; set => this._clusterType = 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.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// Name of the Flux Configuration. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Flux Configuration.")] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Flux Configuration.", + SerializedName = @"fluxConfigurationName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("FluxConfigurationName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.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.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfiguration + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzKubernetesConfigurationFlux_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.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.FluxConfigurationsGet(SubscriptionId, ResourceGroupName, ClusterRp, ClusterType, ClusterName, Name, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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,ClusterRp=ClusterRp,ClusterType=ClusterType,ClusterName=ClusterName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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, ClusterRp=ClusterRp, ClusterType=ClusterType, ClusterName=ClusterName, Name=Name }) + { + 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, ClusterRp=ClusterRp, ClusterType=ClusterType, ClusterName=ClusterName, Name=Name }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfiguration + /// 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.KubernetesConfiguration.Models.Api20220301.IFluxConfiguration + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/src/KubernetesConfiguration/generated/cmdlets/GetAzOperation_List1.cs b/src/KubernetesConfiguration/generated/cmdlets/GetAzKubernetesConfigurationFlux_GetViaIdentity.cs similarity index 78% rename from src/KubernetesConfiguration/generated/cmdlets/GetAzOperation_List1.cs rename to src/KubernetesConfiguration/generated/cmdlets/GetAzKubernetesConfigurationFlux_GetViaIdentity.cs index c7cded65b0ea..f4a159868fa0 100644 --- a/src/KubernetesConfiguration/generated/cmdlets/GetAzOperation_List1.cs +++ b/src/KubernetesConfiguration/generated/cmdlets/GetAzKubernetesConfigurationFlux_GetViaIdentity.cs @@ -8,18 +8,17 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Cmdlets using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; using System; - /// - /// List all the available operations the KubernetesConfiguration resource provider supports, in this api-version. - /// + /// Gets details of the Flux Configuration. /// - /// [OpenAPI] List=>GET:"/providers/Microsoft.KubernetesConfiguration/operations" + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/{fluxConfigurationName}" /// [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.InternalExport] - [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzOperation_List1")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IResourceProviderOperationAutoGenerated))] - [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Description(@"List all the available operations the KubernetesConfiguration resource provider supports, in this api-version.")] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzKubernetesConfigurationFlux_GetViaIdentity")] + [global::System.Management.Automation.Alias("Get-AzK8sConfigurationFlux")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfiguration))] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Description(@"Gets details of the Flux Configuration.")] [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Generated] - public partial class GetAzOperation_List1 : global::System.Management.Automation.PSCmdlet, + public partial class GetAzKubernetesConfigurationFlux_GetViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener { /// A unique id generatd for the this cmdlet when it is instantiated. @@ -36,12 +35,6 @@ public partial class GetAzOperation_List1 : global::System.Management.Automation /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); - /// A flag to tell whether it is the first onOK call. - private bool _isFirst = true; - - /// Link to retrieve next page. - private string _nextLink; - /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] @@ -71,15 +64,23 @@ public partial class GetAzOperation_List1 : global::System.Management.Automation [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentity 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. + /// cancellation delegate. Stops the cmdlet when called. /// global::System.Action Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - /// cancellation token. + /// cancellation token. global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener.Token => _cancellationTokenSource.Token; /// @@ -108,30 +109,35 @@ public partial class GetAzOperation_List1 : global::System.Management.Automation /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponse + /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfiguration + /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) /// protected override void BeginProcessing() { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); if (Break) { @@ -143,13 +149,13 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletEndProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } /// - /// Intializes a new instance of the cmdlet class. + /// Intializes a new instance of the cmdlet class. /// - public GetAzOperation_List1() + public GetAzKubernetesConfigurationFlux_GetViaIdentity() { } @@ -251,7 +257,6 @@ protected override void ProcessRecord() { using( NoSynchronizationContext ) { - await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletProcessRecordAsyncStart); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } Pipeline = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); if (null != HttpPipelinePrepend) @@ -266,7 +271,39 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.OperationsList1(onOk, onDefault, this, Pipeline); + if (InputObject?.Id != null) + { + await this.Client.FluxConfigurationsGetViaIdentity(InputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ClusterRp) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ClusterRp"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ClusterResourceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ClusterResourceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ClusterName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ClusterName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.FluxConfigurationName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.FluxConfigurationName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.FluxConfigurationsGet(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.ClusterRp ?? null, InputObject.ClusterResourceName ?? null, InputObject.ClusterName ?? null, InputObject.FluxConfigurationName ?? null, onOk, onDefault, this, Pipeline); + } await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.UndeclaredResponseException urexception) @@ -294,12 +331,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponse + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -316,7 +353,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -334,12 +371,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfiguration + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -351,24 +388,8 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // response should be returning an array of some kind. +Pageable - // pageable / value / nextLink - var result = await response; - WriteObject(result.Value,true); - _nextLink = result.NextLink; - if (_isFirst) - { - _isFirst = false; - while (_nextLink != null) - { - if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) - { - requestMessage = requestMessage.Clone(new global::System.Uri( _nextLink ),Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Method.Get ); - await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.FollowingNextLink); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.OperationsList1_Call(requestMessage, onOk, onDefault, this, Pipeline); - } - } - } + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfiguration + WriteObject((await response)); } } } diff --git a/src/KubernetesConfiguration/generated/cmdlets/GetAzKubernetesConfigurationFlux_List.cs b/src/KubernetesConfiguration/generated/cmdlets/GetAzKubernetesConfigurationFlux_List.cs new file mode 100644 index 000000000000..4a45eecf414d --- /dev/null +++ b/src/KubernetesConfiguration/generated/cmdlets/GetAzKubernetesConfigurationFlux_List.cs @@ -0,0 +1,459 @@ +// 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.KubernetesConfiguration.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; + using System; + + /// List all Flux Configurations. + /// + /// [OpenAPI] List=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/fluxConfigurations" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzKubernetesConfigurationFlux_List")] + [global::System.Management.Automation.Alias("Get-AzK8sConfigurationFlux")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfiguration))] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Description(@"List all Flux Configurations.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Generated] + public partial class GetAzKubernetesConfigurationFlux_List : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A flag to tell whether it is the first onOK call. + private bool _isFirst = true; + + /// Link to retrieve next page. + private string _nextLink; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.KubernetesConfiguration Client => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.ClientAPI; + + /// Backing field for property. + private string _clusterName; + + /// The name of the kubernetes cluster. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the kubernetes cluster.")] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the kubernetes cluster.", + SerializedName = @"clusterName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] + public string ClusterName { get => this._clusterName; set => this._clusterName = value; } + + /// Backing field for property. + private string _clusterRp; + + /// + /// The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService.")] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService.", + SerializedName = @"clusterRp", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] + public string ClusterRp { get => this._clusterRp; set => this._clusterRp = value; } + + /// Backing field for property. + private string _clusterType; + + /// + /// The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters.")] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters.", + SerializedName = @"clusterResourceName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] + public string ClusterType { get => this._clusterType; set => this._clusterType = 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.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.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.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationsList + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzKubernetesConfigurationFlux_List() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.FluxConfigurationsList(SubscriptionId, ResourceGroupName, ClusterRp, ClusterType, ClusterName, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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,ClusterRp=ClusterRp,ClusterType=ClusterType,ClusterName=ClusterName}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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, ClusterRp=ClusterRp, ClusterType=ClusterType, 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, ClusterRp=ClusterRp, ClusterType=ClusterType, 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 Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationsList + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // response should be returning an array of some kind. +Pageable + // pageable / value / nextLink + var result = await response; + WriteObject(result.Value,true); + _nextLink = result.NextLink; + if (_isFirst) + { + _isFirst = false; + while (_nextLink != null) + { + if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) + { + requestMessage = requestMessage.Clone(new global::System.Uri( _nextLink ),Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Method.Get ); + await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.FollowingNextLink); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.FluxConfigurationsList_Call(requestMessage, onOk, onDefault, this, Pipeline); + } + } + } + } + } + } +} \ No newline at end of file diff --git a/src/KubernetesConfiguration/generated/cmdlets/GetAzKubernetesConfiguration_Get.cs b/src/KubernetesConfiguration/generated/cmdlets/GetAzKubernetesConfiguration_Get.cs index cded00aabd79..e73219537e15 100644 --- a/src/KubernetesConfiguration/generated/cmdlets/GetAzKubernetesConfiguration_Get.cs +++ b/src/KubernetesConfiguration/generated/cmdlets/GetAzKubernetesConfiguration_Get.cs @@ -15,7 +15,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Cmdlets [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzKubernetesConfiguration_Get")] [global::System.Management.Automation.Alias("Get-AzK8sConfiguration")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfiguration))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfiguration))] [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Description(@"Gets details of the Source Control Configuration.")] [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Generated] public partial class GetAzKubernetesConfiguration_Get : global::System.Management.Automation.PSCmdlet, @@ -61,14 +61,13 @@ public partial class GetAzKubernetesConfiguration_Get : global::System.Managemen private string _clusterRp; /// - /// The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or Microsoft.Kubernetes (for OnPrem K8S - /// clusters). + /// The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. /// - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or Microsoft.Kubernetes (for OnPrem K8S clusters).")] + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService.")] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = true, ReadOnly = false, - Description = @"The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or Microsoft.Kubernetes (for OnPrem K8S clusters).", + Description = @"The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService.", SerializedName = @"clusterRp", PossibleTypes = new [] { typeof(string) })] [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] @@ -78,14 +77,13 @@ public partial class GetAzKubernetesConfiguration_Get : global::System.Managemen private string _clusterType; /// - /// The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or connectedClusters (for OnPrem K8S - /// clusters). + /// The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. /// - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or connectedClusters (for OnPrem K8S clusters).")] + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters.")] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = true, ReadOnly = false, - Description = @"The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or connectedClusters (for OnPrem K8S clusters).", + Description = @"The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters.", SerializedName = @"clusterResourceName", PossibleTypes = new [] { typeof(string) })] [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] @@ -116,11 +114,11 @@ public partial class GetAzKubernetesConfiguration_Get : global::System.Managemen public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } /// - /// cancellation delegate. Stops the cmdlet when called. + /// cancellation delegate. Stops the cmdlet when called. /// global::System.Action Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - /// cancellation token. + /// cancellation token. global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener.Token => _cancellationTokenSource.Token; /// Backing field for property. @@ -162,12 +160,12 @@ public partial class GetAzKubernetesConfiguration_Get : global::System.Managemen /// Backing field for property. private string _resourceGroupName; - /// The name of the resource group. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group.")] + /// 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.KubernetesConfiguration.Runtime.Info( Required = true, ReadOnly = false, - Description = @"The name of the resource group.", + Description = @"The name of the resource group. The name is case insensitive.", SerializedName = @"resourceGroupName", PossibleTypes = new [] { typeof(string) })] [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] @@ -176,14 +174,12 @@ public partial class GetAzKubernetesConfiguration_Get : global::System.Managemen /// Backing field for property. private string[] _subscriptionId; - /// - /// The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000) - /// - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000)")] + /// The ID of the target subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = true, ReadOnly = false, - Description = @"The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000)", + Description = @"The ID of the target subscription.", SerializedName = @"subscriptionId", PossibleTypes = new [] { typeof(string) })] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.DefaultInfo( @@ -198,30 +194,35 @@ public partial class GetAzKubernetesConfiguration_Get : global::System.Managemen /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponse + /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfiguration + /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) /// protected override void BeginProcessing() { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); if (Break) { @@ -233,7 +234,7 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletEndProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } /// @@ -341,7 +342,6 @@ protected override void ProcessRecord() { using( NoSynchronizationContext ) { - await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletProcessRecordAsyncStart); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } Pipeline = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); if (null != HttpPipelinePrepend) @@ -387,12 +387,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponse + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -409,7 +409,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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, ClusterRp=ClusterRp, ClusterType=ClusterType, ClusterName=ClusterName, Name=Name }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -427,12 +427,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfiguration + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -444,7 +444,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfiguration + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfiguration WriteObject((await response)); } } diff --git a/src/KubernetesConfiguration/generated/cmdlets/GetAzKubernetesConfiguration_GetViaIdentity.cs b/src/KubernetesConfiguration/generated/cmdlets/GetAzKubernetesConfiguration_GetViaIdentity.cs index fb0fcb9a65cc..a3887246a6c3 100644 --- a/src/KubernetesConfiguration/generated/cmdlets/GetAzKubernetesConfiguration_GetViaIdentity.cs +++ b/src/KubernetesConfiguration/generated/cmdlets/GetAzKubernetesConfiguration_GetViaIdentity.cs @@ -15,7 +15,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Cmdlets [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzKubernetesConfiguration_GetViaIdentity")] [global::System.Management.Automation.Alias("Get-AzK8sConfiguration")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfiguration))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfiguration))] [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Description(@"Gets details of the Source Control Configuration.")] [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Generated] public partial class GetAzKubernetesConfiguration_GetViaIdentity : global::System.Management.Automation.PSCmdlet, @@ -76,11 +76,11 @@ public partial class GetAzKubernetesConfiguration_GetViaIdentity : global::Syste public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } /// - /// cancellation delegate. Stops the cmdlet when called. + /// cancellation delegate. Stops the cmdlet when called. /// global::System.Action Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - /// cancellation token. + /// cancellation token. global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener.Token => _cancellationTokenSource.Token; /// @@ -109,30 +109,35 @@ public partial class GetAzKubernetesConfiguration_GetViaIdentity : global::Syste /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponse + /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfiguration + /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) /// protected override void BeginProcessing() { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); if (Break) { @@ -144,7 +149,7 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletEndProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } /// @@ -252,7 +257,6 @@ protected override void ProcessRecord() { using( NoSynchronizationContext ) { - await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletProcessRecordAsyncStart); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } Pipeline = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); if (null != HttpPipelinePrepend) @@ -327,12 +331,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponse + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -349,7 +353,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -367,12 +371,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfiguration + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -384,7 +388,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfiguration + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfiguration WriteObject((await response)); } } diff --git a/src/KubernetesConfiguration/generated/cmdlets/GetAzKubernetesConfiguration_List.cs b/src/KubernetesConfiguration/generated/cmdlets/GetAzKubernetesConfiguration_List.cs index 43f96afc159f..e1ed20650cfd 100644 --- a/src/KubernetesConfiguration/generated/cmdlets/GetAzKubernetesConfiguration_List.cs +++ b/src/KubernetesConfiguration/generated/cmdlets/GetAzKubernetesConfiguration_List.cs @@ -15,7 +15,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Cmdlets [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzKubernetesConfiguration_List")] [global::System.Management.Automation.Alias("Get-AzK8sConfiguration")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfiguration))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfiguration))] [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Description(@"List all Source Control Configurations.")] [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Generated] public partial class GetAzKubernetesConfiguration_List : global::System.Management.Automation.PSCmdlet, @@ -67,14 +67,13 @@ public partial class GetAzKubernetesConfiguration_List : global::System.Manageme private string _clusterRp; /// - /// The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or Microsoft.Kubernetes (for OnPrem K8S - /// clusters). + /// The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. /// - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or Microsoft.Kubernetes (for OnPrem K8S clusters).")] + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService.")] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = true, ReadOnly = false, - Description = @"The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or Microsoft.Kubernetes (for OnPrem K8S clusters).", + Description = @"The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService.", SerializedName = @"clusterRp", PossibleTypes = new [] { typeof(string) })] [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] @@ -84,14 +83,13 @@ public partial class GetAzKubernetesConfiguration_List : global::System.Manageme private string _clusterType; /// - /// The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or connectedClusters (for OnPrem K8S - /// clusters). + /// The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. /// - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or connectedClusters (for OnPrem K8S clusters).")] + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters.")] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = true, ReadOnly = false, - Description = @"The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or connectedClusters (for OnPrem K8S clusters).", + Description = @"The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters.", SerializedName = @"clusterResourceName", PossibleTypes = new [] { typeof(string) })] [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] @@ -122,11 +120,11 @@ public partial class GetAzKubernetesConfiguration_List : global::System.Manageme public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } /// - /// cancellation delegate. Stops the cmdlet when called. + /// cancellation delegate. Stops the cmdlet when called. /// global::System.Action Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - /// cancellation token. + /// cancellation token. global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener.Token => _cancellationTokenSource.Token; /// @@ -153,12 +151,12 @@ public partial class GetAzKubernetesConfiguration_List : global::System.Manageme /// Backing field for property. private string _resourceGroupName; - /// The name of the resource group. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group.")] + /// 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.KubernetesConfiguration.Runtime.Info( Required = true, ReadOnly = false, - Description = @"The name of the resource group.", + Description = @"The name of the resource group. The name is case insensitive.", SerializedName = @"resourceGroupName", PossibleTypes = new [] { typeof(string) })] [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] @@ -167,14 +165,12 @@ public partial class GetAzKubernetesConfiguration_List : global::System.Manageme /// Backing field for property. private string[] _subscriptionId; - /// - /// The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000) - /// - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000)")] + /// The ID of the target subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = true, ReadOnly = false, - Description = @"The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000)", + Description = @"The ID of the target subscription.", SerializedName = @"subscriptionId", PossibleTypes = new [] { typeof(string) })] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.DefaultInfo( @@ -189,30 +185,35 @@ public partial class GetAzKubernetesConfiguration_List : global::System.Manageme /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponse + /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationList + /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) /// protected override void BeginProcessing() { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); if (Break) { @@ -224,7 +225,7 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletEndProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } /// @@ -332,7 +333,6 @@ protected override void ProcessRecord() { using( NoSynchronizationContext ) { - await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletProcessRecordAsyncStart); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } Pipeline = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); if (null != HttpPipelinePrepend) @@ -378,12 +378,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponse + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -400,7 +400,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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, ClusterRp=ClusterRp, ClusterType=ClusterType, ClusterName=ClusterName }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -418,12 +418,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfigurationList + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { diff --git a/src/KubernetesConfiguration/generated/cmdlets/GetAzKubernetesExtension_Get.cs b/src/KubernetesConfiguration/generated/cmdlets/GetAzKubernetesExtension_Get.cs index 73a11cb0b6ed..b7e58ef35dbd 100644 --- a/src/KubernetesConfiguration/generated/cmdlets/GetAzKubernetesExtension_Get.cs +++ b/src/KubernetesConfiguration/generated/cmdlets/GetAzKubernetesExtension_Get.cs @@ -15,7 +15,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Cmdlets [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzKubernetesExtension_Get")] [global::System.Management.Automation.Alias("Get-AzK8sExtension")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtension))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtension))] [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Description(@"Gets Kubernetes Cluster Extension.")] [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Generated] public partial class GetAzKubernetesExtension_Get : global::System.Management.Automation.PSCmdlet, @@ -61,14 +61,13 @@ public partial class GetAzKubernetesExtension_Get : global::System.Management.Au private string _clusterRp; /// - /// The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or Microsoft.Kubernetes (for OnPrem K8S - /// clusters). + /// The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. /// - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or Microsoft.Kubernetes (for OnPrem K8S clusters).")] + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService.")] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = true, ReadOnly = false, - Description = @"The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or Microsoft.Kubernetes (for OnPrem K8S clusters).", + Description = @"The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService.", SerializedName = @"clusterRp", PossibleTypes = new [] { typeof(string) })] [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] @@ -78,14 +77,13 @@ public partial class GetAzKubernetesExtension_Get : global::System.Management.Au private string _clusterType; /// - /// The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or connectedClusters (for OnPrem K8S - /// clusters). + /// The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. /// - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or connectedClusters (for OnPrem K8S clusters).")] + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters.")] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = true, ReadOnly = false, - Description = @"The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or connectedClusters (for OnPrem K8S clusters).", + Description = @"The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters.", SerializedName = @"clusterResourceName", PossibleTypes = new [] { typeof(string) })] [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] @@ -116,11 +114,11 @@ public partial class GetAzKubernetesExtension_Get : global::System.Management.Au public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } /// - /// cancellation delegate. Stops the cmdlet when called. + /// cancellation delegate. Stops the cmdlet when called. /// global::System.Action Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - /// cancellation token. + /// cancellation token. global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener.Token => _cancellationTokenSource.Token; /// Backing field for property. @@ -176,14 +174,12 @@ public partial class GetAzKubernetesExtension_Get : global::System.Management.Au /// Backing field for property. private string[] _subscriptionId; - /// - /// The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000) - /// - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000)")] + /// The ID of the target subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = true, ReadOnly = false, - Description = @"The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000)", + Description = @"The ID of the target subscription.", SerializedName = @"subscriptionId", PossibleTypes = new [] { typeof(string) })] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.DefaultInfo( @@ -198,30 +194,35 @@ public partial class GetAzKubernetesExtension_Get : global::System.Management.Au /// 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 + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponse + /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtension + /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) /// protected override void BeginProcessing() { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); if (Break) { @@ -233,7 +234,7 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletEndProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } /// @@ -341,7 +342,6 @@ protected override void ProcessRecord() { using( NoSynchronizationContext ) { - await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletProcessRecordAsyncStart); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } Pipeline = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); if (null != HttpPipelinePrepend) @@ -387,12 +387,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponse + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -409,7 +409,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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, ClusterRp=ClusterRp, ClusterType=ClusterType, ClusterName=ClusterName, Name=Name }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -427,12 +427,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtension + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -444,7 +444,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtension + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtension WriteObject((await response)); } } diff --git a/src/KubernetesConfiguration/generated/cmdlets/GetAzKubernetesExtension_GetViaIdentity.cs b/src/KubernetesConfiguration/generated/cmdlets/GetAzKubernetesExtension_GetViaIdentity.cs index 1906762b0290..08878eaab959 100644 --- a/src/KubernetesConfiguration/generated/cmdlets/GetAzKubernetesExtension_GetViaIdentity.cs +++ b/src/KubernetesConfiguration/generated/cmdlets/GetAzKubernetesExtension_GetViaIdentity.cs @@ -15,7 +15,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Cmdlets [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzKubernetesExtension_GetViaIdentity")] [global::System.Management.Automation.Alias("Get-AzK8sExtension")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtension))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtension))] [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Description(@"Gets Kubernetes Cluster Extension.")] [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Generated] public partial class GetAzKubernetesExtension_GetViaIdentity : global::System.Management.Automation.PSCmdlet, @@ -76,11 +76,11 @@ public partial class GetAzKubernetesExtension_GetViaIdentity : global::System.Ma public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } /// - /// cancellation delegate. Stops the cmdlet when called. + /// cancellation delegate. Stops the cmdlet when called. /// global::System.Action Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - /// cancellation token. + /// cancellation token. global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener.Token => _cancellationTokenSource.Token; /// @@ -109,30 +109,35 @@ public partial class GetAzKubernetesExtension_GetViaIdentity : global::System.Ma /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponse + /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtension + /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) /// protected override void BeginProcessing() { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); if (Break) { @@ -144,7 +149,7 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletEndProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } /// @@ -252,7 +257,6 @@ protected override void ProcessRecord() { using( NoSynchronizationContext ) { - await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletProcessRecordAsyncStart); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } Pipeline = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); if (null != HttpPipelinePrepend) @@ -327,12 +331,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponse + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -349,7 +353,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -367,12 +371,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtension + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -384,7 +388,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtension + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtension WriteObject((await response)); } } diff --git a/src/KubernetesConfiguration/generated/cmdlets/GetAzKubernetesExtension_List.cs b/src/KubernetesConfiguration/generated/cmdlets/GetAzKubernetesExtension_List.cs index 2aeff531fa60..bc80f5b48698 100644 --- a/src/KubernetesConfiguration/generated/cmdlets/GetAzKubernetesExtension_List.cs +++ b/src/KubernetesConfiguration/generated/cmdlets/GetAzKubernetesExtension_List.cs @@ -15,7 +15,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Cmdlets [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzKubernetesExtension_List")] [global::System.Management.Automation.Alias("Get-AzK8sExtension")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtension))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtension))] [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Description(@"List all Extensions in the cluster.")] [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Generated] public partial class GetAzKubernetesExtension_List : global::System.Management.Automation.PSCmdlet, @@ -67,14 +67,13 @@ public partial class GetAzKubernetesExtension_List : global::System.Management.A private string _clusterRp; /// - /// The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or Microsoft.Kubernetes (for OnPrem K8S - /// clusters). + /// The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. /// - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or Microsoft.Kubernetes (for OnPrem K8S clusters).")] + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService.")] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = true, ReadOnly = false, - Description = @"The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or Microsoft.Kubernetes (for OnPrem K8S clusters).", + Description = @"The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService.", SerializedName = @"clusterRp", PossibleTypes = new [] { typeof(string) })] [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] @@ -84,14 +83,13 @@ public partial class GetAzKubernetesExtension_List : global::System.Management.A private string _clusterType; /// - /// The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or connectedClusters (for OnPrem K8S - /// clusters). + /// The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. /// - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or connectedClusters (for OnPrem K8S clusters).")] + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters.")] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = true, ReadOnly = false, - Description = @"The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or connectedClusters (for OnPrem K8S clusters).", + Description = @"The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters.", SerializedName = @"clusterResourceName", PossibleTypes = new [] { typeof(string) })] [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] @@ -122,11 +120,11 @@ public partial class GetAzKubernetesExtension_List : global::System.Management.A public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } /// - /// cancellation delegate. Stops the cmdlet when called. + /// cancellation delegate. Stops the cmdlet when called. /// global::System.Action Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - /// cancellation token. + /// cancellation token. global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener.Token => _cancellationTokenSource.Token; /// @@ -167,14 +165,12 @@ public partial class GetAzKubernetesExtension_List : global::System.Management.A /// Backing field for property. private string[] _subscriptionId; - /// - /// The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000) - /// - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000)")] + /// The ID of the target subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = true, ReadOnly = false, - Description = @"The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000)", + Description = @"The ID of the target subscription.", SerializedName = @"subscriptionId", PossibleTypes = new [] { typeof(string) })] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.DefaultInfo( @@ -189,30 +185,35 @@ public partial class GetAzKubernetesExtension_List : global::System.Management.A /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponse + /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionsList + /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) /// protected override void BeginProcessing() { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); if (Break) { @@ -224,7 +225,7 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletEndProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } /// @@ -332,7 +333,6 @@ protected override void ProcessRecord() { using( NoSynchronizationContext ) { - await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletProcessRecordAsyncStart); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } Pipeline = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); if (null != HttpPipelinePrepend) @@ -378,12 +378,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponse + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -400,7 +400,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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, ClusterRp=ClusterRp, ClusterType=ClusterType, ClusterName=ClusterName }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -418,12 +418,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionsList + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { diff --git a/src/KubernetesConfiguration/generated/cmdlets/GetAzOperation_List.cs b/src/KubernetesConfiguration/generated/cmdlets/GetAzOperation_List.cs index 88cbbad1acd7..52c9a0d73588 100644 --- a/src/KubernetesConfiguration/generated/cmdlets/GetAzOperation_List.cs +++ b/src/KubernetesConfiguration/generated/cmdlets/GetAzOperation_List.cs @@ -16,7 +16,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzOperation_List")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IResourceProviderOperation))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperation))] [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Description(@"List all the available operations the KubernetesConfiguration resource provider supports.")] [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Generated] public partial class GetAzOperation_List : global::System.Management.Automation.PSCmdlet, @@ -75,11 +75,11 @@ public partial class GetAzOperation_List : global::System.Management.Automation. public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } /// - /// cancellation delegate. Stops the cmdlet when called. + /// cancellation delegate. Stops the cmdlet when called. /// global::System.Action Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - /// cancellation token. + /// cancellation token. global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener.Token => _cancellationTokenSource.Token; /// @@ -108,30 +108,35 @@ public partial class GetAzOperation_List : global::System.Management.Automation. /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponse + /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationList + /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) /// protected override void BeginProcessing() { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); if (Break) { @@ -143,7 +148,7 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletEndProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } /// @@ -251,7 +256,6 @@ protected override void ProcessRecord() { using( NoSynchronizationContext ) { - await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletProcessRecordAsyncStart); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } Pipeline = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); if (null != HttpPipelinePrepend) @@ -294,12 +298,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponse + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -316,7 +320,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -334,12 +338,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperationList + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { diff --git a/src/KubernetesConfiguration/generated/cmdlets/NewAzKubernetesConfigurationFlux_CreateExpanded.cs b/src/KubernetesConfiguration/generated/cmdlets/NewAzKubernetesConfigurationFlux_CreateExpanded.cs new file mode 100644 index 000000000000..74149dab7ff8 --- /dev/null +++ b/src/KubernetesConfiguration/generated/cmdlets/NewAzKubernetesConfigurationFlux_CreateExpanded.cs @@ -0,0 +1,860 @@ +// 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.KubernetesConfiguration.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; + using System; + + /// Create a new Kubernetes Flux Configuration. + /// + /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/{fluxConfigurationName}" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzKubernetesConfigurationFlux_CreateExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.Alias("New-AzK8sConfigurationFlux")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfiguration))] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Description(@"Create a new Kubernetes Flux Configuration.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Generated] + public partial class NewAzKubernetesConfigurationFlux_CreateExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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(); + + /// The Flux Configuration object returned in Get & Put response. + private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfiguration _fluxConfigurationBody = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.FluxConfiguration(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Plaintext access key used to securely access the S3 bucket + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Plaintext access key used to securely access the S3 bucket")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Plaintext access key used to securely access the S3 bucket", + SerializedName = @"accessKey", + PossibleTypes = new [] { typeof(System.Security.SecureString) })] + public System.Security.SecureString BucketAccessKey { get => _fluxConfigurationBody.BucketAccessKey ?? null; set => _fluxConfigurationBody.BucketAccessKey = value; } + + /// + /// Specify whether to use insecure communication when puling data from the S3 bucket. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Specify whether to use insecure communication when puling data from the S3 bucket.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Specify whether to use insecure communication when puling data from the S3 bucket.", + SerializedName = @"insecure", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter BucketInsecure { get => _fluxConfigurationBody.BucketInsecure ?? default(global::System.Management.Automation.SwitchParameter); set => _fluxConfigurationBody.BucketInsecure = value; } + + /// + /// Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided + /// configuration secrets. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided configuration secrets.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided configuration secrets.", + SerializedName = @"localAuthRef", + PossibleTypes = new [] { typeof(string) })] + public string BucketLocalAuthRef { get => _fluxConfigurationBody.BucketLocalAuthRef ?? null; set => _fluxConfigurationBody.BucketLocalAuthRef = value; } + + /// The bucket name to sync from the url endpoint for the flux configuration. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The bucket name to sync from the url endpoint for the flux configuration.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The bucket name to sync from the url endpoint for the flux configuration.", + SerializedName = @"bucketName", + PossibleTypes = new [] { typeof(string) })] + public string BucketName { get => _fluxConfigurationBody.BucketName ?? null; set => _fluxConfigurationBody.BucketName = value; } + + /// + /// The interval at which to re-reconcile the cluster git repository source with the remote. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The interval at which to re-reconcile the cluster git repository source with the remote.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The interval at which to re-reconcile the cluster git repository source with the remote.", + SerializedName = @"syncIntervalInSeconds", + PossibleTypes = new [] { typeof(long) })] + public long BucketSyncIntervalInSecond { get => _fluxConfigurationBody.BucketSyncIntervalInSecond ?? default(long); set => _fluxConfigurationBody.BucketSyncIntervalInSecond = value; } + + /// + /// The maximum time to attempt to reconcile the cluster git repository source with the remote. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The maximum time to attempt to reconcile the cluster git repository source with the remote.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The maximum time to attempt to reconcile the cluster git repository source with the remote.", + SerializedName = @"timeoutInSeconds", + PossibleTypes = new [] { typeof(long) })] + public long BucketTimeoutInSecond { get => _fluxConfigurationBody.BucketTimeoutInSecond ?? default(long); set => _fluxConfigurationBody.BucketTimeoutInSecond = value; } + + /// The URL to sync for the flux configuration S3 bucket. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The URL to sync for the flux configuration S3 bucket.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The URL to sync for the flux configuration S3 bucket.", + SerializedName = @"url", + PossibleTypes = new [] { typeof(string) })] + public string BucketUrl { get => _fluxConfigurationBody.BucketUrl ?? null; set => _fluxConfigurationBody.BucketUrl = value; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.KubernetesConfiguration Client => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.ClientAPI; + + /// Backing field for property. + private string _clusterName; + + /// The name of the kubernetes cluster. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the kubernetes cluster.")] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the kubernetes cluster.", + SerializedName = @"clusterName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] + public string ClusterName { get => this._clusterName; set => this._clusterName = value; } + + /// Backing field for property. + private string _clusterRp; + + /// + /// The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService.")] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService.", + SerializedName = @"clusterRp", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] + public string ClusterRp { get => this._clusterRp; set => this._clusterRp = value; } + + /// Backing field for property. + private string _clusterType; + + /// + /// The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters.")] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters.", + SerializedName = @"clusterResourceName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] + public string ClusterType { get => this._clusterType; set => this._clusterType = value; } + + /// Key-value pairs of protected configuration settings for the configuration + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ExportAs(typeof(global::System.Collections.Hashtable))] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Key-value pairs of protected configuration settings for the configuration")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Key-value pairs of protected configuration settings for the configuration", + SerializedName = @"configurationProtectedSettings", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesConfigurationProtectedSettings) })] + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesConfigurationProtectedSettings ConfigurationProtectedSetting { get => _fluxConfigurationBody.ConfigurationProtectedSetting ?? null /* object */; set => _fluxConfigurationBody.ConfigurationProtectedSetting = 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.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// + /// Base64-encoded HTTPS certificate authority contents used to access git private git repositories over HTTPS + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Base64-encoded HTTPS certificate authority contents used to access git private git repositories over HTTPS")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Base64-encoded HTTPS certificate authority contents used to access git private git repositories over HTTPS", + SerializedName = @"httpsCACert", + PossibleTypes = new [] { typeof(string) })] + public string GitRepositoryHttpsCaCert { get => _fluxConfigurationBody.GitRepositoryHttpsCaCert ?? null; set => _fluxConfigurationBody.GitRepositoryHttpsCaCert = value; } + + /// Plaintext HTTPS username used to access private git repositories over HTTPS + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Plaintext HTTPS username used to access private git repositories over HTTPS")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Plaintext HTTPS username used to access private git repositories over HTTPS", + SerializedName = @"httpsUser", + PossibleTypes = new [] { typeof(string) })] + public string GitRepositoryHttpsUser { get => _fluxConfigurationBody.GitRepositoryHttpsUser ?? null; set => _fluxConfigurationBody.GitRepositoryHttpsUser = value; } + + /// + /// Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided + /// configuration secrets. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided configuration secrets.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided configuration secrets.", + SerializedName = @"localAuthRef", + PossibleTypes = new [] { typeof(string) })] + public string GitRepositoryLocalAuthRef { get => _fluxConfigurationBody.GitRepositoryLocalAuthRef ?? null; set => _fluxConfigurationBody.GitRepositoryLocalAuthRef = value; } + + /// + /// Base64-encoded known_hosts value containing public SSH keys required to access private git repositories over SSH + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Base64-encoded known_hosts value containing public SSH keys required to access private git repositories over SSH")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Base64-encoded known_hosts value containing public SSH keys required to access private git repositories over SSH", + SerializedName = @"sshKnownHosts", + PossibleTypes = new [] { typeof(string) })] + public string GitRepositorySshKnownHost { get => _fluxConfigurationBody.GitRepositorySshKnownHost ?? null; set => _fluxConfigurationBody.GitRepositorySshKnownHost = value; } + + /// + /// The interval at which to re-reconcile the cluster git repository source with the remote. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The interval at which to re-reconcile the cluster git repository source with the remote.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The interval at which to re-reconcile the cluster git repository source with the remote.", + SerializedName = @"syncIntervalInSeconds", + PossibleTypes = new [] { typeof(long) })] + public long GitRepositorySyncIntervalInSecond { get => _fluxConfigurationBody.GitRepositorySyncIntervalInSecond ?? default(long); set => _fluxConfigurationBody.GitRepositorySyncIntervalInSecond = value; } + + /// + /// The maximum time to attempt to reconcile the cluster git repository source with the remote. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The maximum time to attempt to reconcile the cluster git repository source with the remote.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The maximum time to attempt to reconcile the cluster git repository source with the remote.", + SerializedName = @"timeoutInSeconds", + PossibleTypes = new [] { typeof(long) })] + public long GitRepositoryTimeoutInSecond { get => _fluxConfigurationBody.GitRepositoryTimeoutInSecond ?? default(long); set => _fluxConfigurationBody.GitRepositoryTimeoutInSecond = value; } + + /// The URL to sync for the flux configuration git repository. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The URL to sync for the flux configuration git repository.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The URL to sync for the flux configuration git repository.", + SerializedName = @"url", + PossibleTypes = new [] { typeof(string) })] + public string GitRepositoryUrl { get => _fluxConfigurationBody.GitRepositoryUrl ?? null; set => _fluxConfigurationBody.GitRepositoryUrl = value; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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; } } + + /// + /// Array of kustomizations used to reconcile the artifact pulled by the source type on the cluster. + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ExportAs(typeof(global::System.Collections.Hashtable))] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Array of kustomizations used to reconcile the artifact pulled by the source type on the cluster.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Array of kustomizations used to reconcile the artifact pulled by the source type on the cluster.", + SerializedName = @"kustomizations", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesKustomizations) })] + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesKustomizations Kustomization { get => _fluxConfigurationBody.Kustomization ?? null /* object */; set => _fluxConfigurationBody.Kustomization = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// Name of the Flux Configuration. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Flux Configuration.")] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Flux Configuration.", + SerializedName = @"fluxConfigurationName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("FluxConfigurationName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The namespace to which this configuration is installed to. Maximum of 253 lower case alphanumeric characters, hyphen and + /// period only. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The namespace to which this configuration is installed to. Maximum of 253 lower case alphanumeric characters, hyphen and period only.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The namespace to which this configuration is installed to. Maximum of 253 lower case alphanumeric characters, hyphen and period only.", + SerializedName = @"namespace", + PossibleTypes = new [] { typeof(string) })] + public string Namespace { get => _fluxConfigurationBody.Namespace ?? null; set => _fluxConfigurationBody.Namespace = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// The git repository branch name to checkout. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The git repository branch name to checkout.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The git repository branch name to checkout.", + SerializedName = @"branch", + PossibleTypes = new [] { typeof(string) })] + public string RepositoryRefBranch { get => _fluxConfigurationBody.RepositoryRefBranch ?? null; set => _fluxConfigurationBody.RepositoryRefBranch = value; } + + /// + /// The commit SHA to checkout. This value must be combined with the branch name to be valid. This takes precedence over semver. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The commit SHA to checkout. This value must be combined with the branch name to be valid. This takes precedence over semver.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The commit SHA to checkout. This value must be combined with the branch name to be valid. This takes precedence over semver.", + SerializedName = @"commit", + PossibleTypes = new [] { typeof(string) })] + public string RepositoryRefCommit { get => _fluxConfigurationBody.RepositoryRefCommit ?? null; set => _fluxConfigurationBody.RepositoryRefCommit = value; } + + /// + /// The semver range used to match against git repository tags. This takes precedence over tag. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The semver range used to match against git repository tags. This takes precedence over tag.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The semver range used to match against git repository tags. This takes precedence over tag.", + SerializedName = @"semver", + PossibleTypes = new [] { typeof(string) })] + public string RepositoryRefSemver { get => _fluxConfigurationBody.RepositoryRefSemver ?? null; set => _fluxConfigurationBody.RepositoryRefSemver = value; } + + /// The git repository tag name to checkout. This takes precedence over branch. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The git repository tag name to checkout. This takes precedence over branch.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The git repository tag name to checkout. This takes precedence over branch.", + SerializedName = @"tag", + PossibleTypes = new [] { typeof(string) })] + public string RepositoryRefTag { get => _fluxConfigurationBody.RepositoryRefTag ?? null; set => _fluxConfigurationBody.RepositoryRefTag = value; } + + /// 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.KubernetesConfiguration.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.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Scope at which the operator will be installed. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Scope at which the operator will be installed.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Scope at which the operator will be installed.", + SerializedName = @"scope", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ScopeType) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ScopeType))] + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ScopeType Scope { get => _fluxConfigurationBody.Scope ?? ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ScopeType)""); set => _fluxConfigurationBody.Scope = value; } + + /// Source Kind to pull the configuration data from. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Source Kind to pull the configuration data from.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Source Kind to pull the configuration data from.", + SerializedName = @"sourceKind", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType))] + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType SourceKind { get => _fluxConfigurationBody.SourceKind ?? ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType)""); set => _fluxConfigurationBody.SourceKind = 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.KubernetesConfiguration.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// Whether this configuration should suspend its reconciliation of its kustomizations and sources. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Whether this configuration should suspend its reconciliation of its kustomizations and sources.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Whether this configuration should suspend its reconciliation of its kustomizations and sources.", + SerializedName = @"suspend", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter Suspend { get => _fluxConfigurationBody.Suspend ?? default(global::System.Management.Automation.SwitchParameter); set => _fluxConfigurationBody.Suspend = value; } + + /// + /// overrideOnBadRequest will be called before the regular onBadRequest has been processed, allowing customization + /// of what happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onBadRequest method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnBadRequest(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfiguration + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of NewAzKubernetesConfigurationFlux_CreateExpanded + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Cmdlets.NewAzKubernetesConfigurationFlux_CreateExpanded Clone() + { + var clone = new NewAzKubernetesConfigurationFlux_CreateExpanded(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._fluxConfigurationBody = this._fluxConfigurationBody; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.ClusterRp = this.ClusterRp; + clone.ClusterType = this.ClusterType; + clone.ClusterName = this.ClusterName; + clone.Name = this.Name; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// 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.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public NewAzKubernetesConfigurationFlux_CreateExpanded() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'FluxConfigurationsCreateOrUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.FluxConfigurationsCreateOrUpdate(SubscriptionId, ResourceGroupName, ClusterRp, ClusterType, ClusterName, Name, _fluxConfigurationBody, onOk, onBadRequest, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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,ClusterRp=ClusterRp,ClusterType=ClusterType,ClusterName=ClusterName,Name=Name,body=_fluxConfigurationBody}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// a delegate that is called when the remote service returns 400 (BadRequest). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onBadRequest(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnBadRequest(responseMessage, response, ref _returnNow); + // if overrideOnBadRequest has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onBadRequest - response for 400 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponse + WriteObject((await response)); + } + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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, ClusterRp=ClusterRp, ClusterType=ClusterType, ClusterName=ClusterName, Name=Name, body=_fluxConfigurationBody }) + { + 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, ClusterRp=ClusterRp, ClusterType=ClusterType, ClusterName=ClusterName, Name=Name, body=_fluxConfigurationBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfiguration + /// 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.KubernetesConfiguration.Models.Api20220301.IFluxConfiguration + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/src/KubernetesConfiguration/generated/cmdlets/NewAzKubernetesConfiguration_CreateExpanded.cs b/src/KubernetesConfiguration/generated/cmdlets/NewAzKubernetesConfiguration_CreateExpanded.cs index bf6ee8aff5a0..897273bfe9df 100644 --- a/src/KubernetesConfiguration/generated/cmdlets/NewAzKubernetesConfiguration_CreateExpanded.cs +++ b/src/KubernetesConfiguration/generated/cmdlets/NewAzKubernetesConfiguration_CreateExpanded.cs @@ -15,7 +15,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Cmdlets [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzKubernetesConfiguration_CreateExpanded", SupportsShouldProcess = true)] [global::System.Management.Automation.Alias("New-AzK8sConfiguration")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfiguration))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfiguration))] [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Description(@"Create a new Kubernetes Source Control Configuration.")] [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Generated] public partial class NewAzKubernetesConfiguration_CreateExpanded : global::System.Management.Automation.PSCmdlet, @@ -35,6 +35,9 @@ public partial class NewAzKubernetesConfiguration_CreateExpanded : global::Syste /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// The SourceControl Configuration object returned in Get & Put response. + private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfiguration _sourceControlConfigurationBody = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.SourceControlConfiguration(); + /// 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.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] @@ -61,14 +64,13 @@ public partial class NewAzKubernetesConfiguration_CreateExpanded : global::Syste private string _clusterRp; /// - /// The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or Microsoft.Kubernetes (for OnPrem K8S - /// clusters). + /// The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. /// - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or Microsoft.Kubernetes (for OnPrem K8S clusters).")] + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService.")] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = true, ReadOnly = false, - Description = @"The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or Microsoft.Kubernetes (for OnPrem K8S clusters).", + Description = @"The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService.", SerializedName = @"clusterRp", PossibleTypes = new [] { typeof(string) })] [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] @@ -78,14 +80,13 @@ public partial class NewAzKubernetesConfiguration_CreateExpanded : global::Syste private string _clusterType; /// - /// The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or connectedClusters (for OnPrem K8S - /// clusters). + /// The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. /// - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or connectedClusters (for OnPrem K8S clusters).")] + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters.")] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = true, ReadOnly = false, - Description = @"The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or connectedClusters (for OnPrem K8S clusters).", + Description = @"The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters.", SerializedName = @"clusterResourceName", PossibleTypes = new [] { typeof(string) })] [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] @@ -100,8 +101,8 @@ public partial class NewAzKubernetesConfiguration_CreateExpanded : global::Syste ReadOnly = false, Description = @"Name-value pairs of protected configuration settings for the configuration", SerializedName = @"configurationProtectedSettings", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IConfigurationProtectedSettings) })] - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IConfigurationProtectedSettings ConfigurationProtectedSetting { get => SourceControlConfigurationBody.ConfigurationProtectedSetting ?? null /* object */; set => SourceControlConfigurationBody.ConfigurationProtectedSetting = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IConfigurationProtectedSettings) })] + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IConfigurationProtectedSettings ConfigurationProtectedSetting { get => _sourceControlConfigurationBody.ConfigurationProtectedSetting ?? null /* object */; set => _sourceControlConfigurationBody.ConfigurationProtectedSetting = value; } /// /// The credentials, account, tenant, and subscription used for communication with Azure @@ -121,7 +122,7 @@ public partial class NewAzKubernetesConfiguration_CreateExpanded : global::Syste Description = @"Option to enable Helm Operator for this git configuration.", SerializedName = @"enableHelmOperator", PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] - public global::System.Management.Automation.SwitchParameter EnableHelmOperator { get => SourceControlConfigurationBody.EnableHelmOperator ?? default(global::System.Management.Automation.SwitchParameter); set => SourceControlConfigurationBody.EnableHelmOperator = value; } + public global::System.Management.Automation.SwitchParameter EnableHelmOperator { get => _sourceControlConfigurationBody.EnableHelmOperator ?? default(global::System.Management.Automation.SwitchParameter); set => _sourceControlConfigurationBody.EnableHelmOperator = value; } /// Values override for the operator Helm chart. [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Values override for the operator Helm chart.")] @@ -132,7 +133,7 @@ public partial class NewAzKubernetesConfiguration_CreateExpanded : global::Syste Description = @"Values override for the operator Helm chart.", SerializedName = @"chartValues", PossibleTypes = new [] { typeof(string) })] - public string HelmOperatorChartValue { get => SourceControlConfigurationBody.HelmOperatorPropertyChartValue ?? null; set => SourceControlConfigurationBody.HelmOperatorPropertyChartValue = value; } + public string HelmOperatorChartValue { get => _sourceControlConfigurationBody.HelmOperatorPropertyChartValue ?? null; set => _sourceControlConfigurationBody.HelmOperatorPropertyChartValue = value; } /// Version of the operator Helm chart. [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Version of the operator Helm chart.")] @@ -143,7 +144,7 @@ public partial class NewAzKubernetesConfiguration_CreateExpanded : global::Syste Description = @"Version of the operator Helm chart.", SerializedName = @"chartVersion", PossibleTypes = new [] { typeof(string) })] - public string HelmOperatorChartVersion { get => SourceControlConfigurationBody.HelmOperatorPropertyChartVersion ?? null; set => SourceControlConfigurationBody.HelmOperatorPropertyChartVersion = value; } + public string HelmOperatorChartVersion { get => _sourceControlConfigurationBody.HelmOperatorPropertyChartVersion ?? null; set => _sourceControlConfigurationBody.HelmOperatorPropertyChartVersion = value; } /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] @@ -161,11 +162,11 @@ public partial class NewAzKubernetesConfiguration_CreateExpanded : global::Syste public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } /// - /// cancellation delegate. Stops the cmdlet when called. + /// cancellation delegate. Stops the cmdlet when called. /// global::System.Action Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - /// cancellation token. + /// cancellation token. global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener.Token => _cancellationTokenSource.Token; /// Backing field for property. @@ -192,7 +193,7 @@ public partial class NewAzKubernetesConfiguration_CreateExpanded : global::Syste Description = @"Instance name of the operator - identifying the specific configuration.", SerializedName = @"operatorInstanceName", PossibleTypes = new [] { typeof(string) })] - public string OperatorInstanceName { get => SourceControlConfigurationBody.OperatorInstanceName ?? null; set => SourceControlConfigurationBody.OperatorInstanceName = value; } + public string OperatorInstanceName { get => _sourceControlConfigurationBody.OperatorInstanceName ?? null; set => _sourceControlConfigurationBody.OperatorInstanceName = value; } /// /// The namespace to which this operator is installed to. Maximum of 253 lower case alphanumeric characters, hyphen and period @@ -206,7 +207,7 @@ public partial class NewAzKubernetesConfiguration_CreateExpanded : global::Syste Description = @"The namespace to which this operator is installed to. Maximum of 253 lower case alphanumeric characters, hyphen and period only.", SerializedName = @"operatorNamespace", PossibleTypes = new [] { typeof(string) })] - public string OperatorNamespace { get => SourceControlConfigurationBody.OperatorNamespace ?? null; set => SourceControlConfigurationBody.OperatorNamespace = value; } + public string OperatorNamespace { get => _sourceControlConfigurationBody.OperatorNamespace ?? null; set => _sourceControlConfigurationBody.OperatorNamespace = value; } /// Any Parameters for the Operator instance in string format. [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Any Parameters for the Operator instance in string format.")] @@ -217,7 +218,7 @@ public partial class NewAzKubernetesConfiguration_CreateExpanded : global::Syste Description = @"Any Parameters for the Operator instance in string format.", SerializedName = @"operatorParams", PossibleTypes = new [] { typeof(string) })] - public string OperatorParam { get => SourceControlConfigurationBody.OperatorParam ?? null; set => SourceControlConfigurationBody.OperatorParam = value; } + public string OperatorParam { get => _sourceControlConfigurationBody.OperatorParam ?? null; set => _sourceControlConfigurationBody.OperatorParam = value; } /// Scope at which the operator will be installed. [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Scope at which the operator will be installed.")] @@ -229,7 +230,7 @@ public partial class NewAzKubernetesConfiguration_CreateExpanded : global::Syste SerializedName = @"operatorScope", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.OperatorScopeType) })] [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.OperatorScopeType))] - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.OperatorScopeType OperatorScope { get => SourceControlConfigurationBody.OperatorScope ?? ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.OperatorScopeType)""); set => SourceControlConfigurationBody.OperatorScope = value; } + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.OperatorScopeType OperatorScope { get => _sourceControlConfigurationBody.OperatorScope ?? ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.OperatorScopeType)""); set => _sourceControlConfigurationBody.OperatorScope = value; } /// Type of the operator [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Type of the operator")] @@ -241,7 +242,7 @@ public partial class NewAzKubernetesConfiguration_CreateExpanded : global::Syste SerializedName = @"operatorType", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.OperatorType) })] [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.OperatorType))] - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.OperatorType OperatorType { get => SourceControlConfigurationBody.OperatorType ?? ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.OperatorType)""); set => SourceControlConfigurationBody.OperatorType = value; } + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.OperatorType OperatorType { get => _sourceControlConfigurationBody.OperatorType ?? ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.OperatorType)""); set => _sourceControlConfigurationBody.OperatorType = value; } /// /// The instance of the that the remote call will use. @@ -273,28 +274,22 @@ public partial class NewAzKubernetesConfiguration_CreateExpanded : global::Syste Description = @"Url of the SourceControl Repository.", SerializedName = @"repositoryUrl", PossibleTypes = new [] { typeof(string) })] - public string RepositoryUrl { get => SourceControlConfigurationBody.RepositoryUrl ?? null; set => SourceControlConfigurationBody.RepositoryUrl = value; } + public string RepositoryUrl { get => _sourceControlConfigurationBody.RepositoryUrl ?? null; set => _sourceControlConfigurationBody.RepositoryUrl = value; } /// Backing field for property. private string _resourceGroupName; - /// The name of the resource group. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group.")] + /// 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.KubernetesConfiguration.Runtime.Info( Required = true, ReadOnly = false, - Description = @"The name of the resource group.", + Description = @"The name of the resource group. The name is case insensitive.", SerializedName = @"resourceGroupName", PossibleTypes = new [] { typeof(string) })] [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfiguration _sourceControlConfigurationBody= new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.SourceControlConfiguration(); - - /// The SourceControl Configuration object returned in Get & Put response. - private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfiguration SourceControlConfigurationBody { get => this._sourceControlConfigurationBody; set => this._sourceControlConfigurationBody = value; } - /// /// Base64-encoded known_hosts contents containing public SSH keys required to access private Git instances /// @@ -306,19 +301,17 @@ public partial class NewAzKubernetesConfiguration_CreateExpanded : global::Syste Description = @"Base64-encoded known_hosts contents containing public SSH keys required to access private Git instances", SerializedName = @"sshKnownHostsContents", PossibleTypes = new [] { typeof(string) })] - public string SshKnownHost { get => SourceControlConfigurationBody.SshKnownHostsContent ?? null; set => SourceControlConfigurationBody.SshKnownHostsContent = value; } + public string SshKnownHost { get => _sourceControlConfigurationBody.SshKnownHostsContent ?? null; set => _sourceControlConfigurationBody.SshKnownHostsContent = value; } /// Backing field for property. private string _subscriptionId; - /// - /// The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000) - /// - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000)")] + /// The ID of the target subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = true, ReadOnly = false, - Description = @"The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000)", + Description = @"The ID of the target subscription.", SerializedName = @"subscriptionId", PossibleTypes = new [] { typeof(string) })] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.DefaultInfo( @@ -333,42 +326,47 @@ public partial class NewAzKubernetesConfiguration_CreateExpanded : global::Syste /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfiguration + /// from the remote call /// /// Determines if the rest of the onCreated method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponse + /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfiguration + /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) /// protected override void BeginProcessing() { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); if (Break) { @@ -380,7 +378,7 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletEndProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } /// Handles/Dispatches events during the call to the REST service. @@ -491,7 +489,6 @@ protected override void ProcessRecord() { using( NoSynchronizationContext ) { - await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletProcessRecordAsyncStart); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } Pipeline = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); if (null != HttpPipelinePrepend) @@ -506,12 +503,12 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.SourceControlConfigurationsCreateOrUpdate(SubscriptionId, ResourceGroupName, ClusterRp, ClusterType, ClusterName, Name, SourceControlConfigurationBody, onOk, onCreated, onDefault, this, Pipeline); + await this.Client.SourceControlConfigurationsCreateOrUpdate(SubscriptionId, ResourceGroupName, ClusterRp, ClusterType, ClusterName, Name, _sourceControlConfigurationBody, onOk, onCreated, onDefault, this, Pipeline); await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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,ClusterRp=ClusterRp,ClusterType=ClusterType,ClusterName=ClusterName,Name=Name,body=SourceControlConfigurationBody}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,ClusterRp=ClusterRp,ClusterType=ClusterType,ClusterName=ClusterName,Name=Name,body=_sourceControlConfigurationBody}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -532,12 +529,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 201 (Created). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfiguration + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -549,7 +546,7 @@ protected override void StopProcessing() return ; } // onCreated - response for 201 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfiguration + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfiguration WriteObject((await response)); } } @@ -558,12 +555,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponse + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -580,15 +577,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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, ClusterRp=ClusterRp, ClusterType=ClusterType, ClusterName=ClusterName, Name=Name, body=SourceControlConfigurationBody }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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, ClusterRp=ClusterRp, ClusterType=ClusterType, ClusterName=ClusterName, Name=Name, body=_sourceControlConfigurationBody }) { 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, ClusterRp=ClusterRp, ClusterType=ClusterType, ClusterName=ClusterName, Name=Name, body=SourceControlConfigurationBody }) + 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, ClusterRp=ClusterRp, ClusterType=ClusterType, ClusterName=ClusterName, Name=Name, body=_sourceControlConfigurationBody }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -598,12 +595,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfiguration + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -615,7 +612,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfiguration + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfiguration WriteObject((await response)); } } diff --git a/src/KubernetesConfiguration/generated/cmdlets/NewAzKubernetesExtension_CreateExpanded.cs b/src/KubernetesConfiguration/generated/cmdlets/NewAzKubernetesExtension_CreateExpanded.cs index f5521b8ccdef..5ce4c420d764 100644 --- a/src/KubernetesConfiguration/generated/cmdlets/NewAzKubernetesExtension_CreateExpanded.cs +++ b/src/KubernetesConfiguration/generated/cmdlets/NewAzKubernetesExtension_CreateExpanded.cs @@ -15,7 +15,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Cmdlets [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzKubernetesExtension_CreateExpanded", SupportsShouldProcess = true)] [global::System.Management.Automation.Alias("New-AzK8sExtension")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtension))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtension))] [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Description(@"Create a new Kubernetes Cluster Extension.")] [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Generated] public partial class NewAzKubernetesExtension_CreateExpanded : global::System.Management.Automation.PSCmdlet, @@ -35,6 +35,9 @@ public partial class NewAzKubernetesExtension_CreateExpanded : global::System.Ma /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// The Extension object. + private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtension _extensionBody = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.Extension(); + /// The identity type. [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The identity type.")] [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Body)] @@ -43,9 +46,9 @@ public partial class NewAzKubernetesExtension_CreateExpanded : global::System.Ma ReadOnly = false, Description = @"The identity type.", SerializedName = @"type", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ResourceIdentityType) })] - [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ResourceIdentityType))] - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ResourceIdentityType AkAssignedIdentityType { get => ExtensionBody.AkAssignedIdentityType ?? ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ResourceIdentityType)""); set => ExtensionBody.AkAssignedIdentityType = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.AksIdentityType) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.AksIdentityType))] + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.AksIdentityType AkAssignedIdentityType { get => _extensionBody.AkAssignedIdentityType ?? ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.AksIdentityType)""); set => _extensionBody.AkAssignedIdentityType = value; } /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] @@ -63,7 +66,7 @@ public partial class NewAzKubernetesExtension_CreateExpanded : global::System.Ma Description = @"Flag to note if this extension participates in auto upgrade of minor version, or not.", SerializedName = @"autoUpgradeMinorVersion", PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] - public global::System.Management.Automation.SwitchParameter AutoUpgradeMinorVersion { get => ExtensionBody.AutoUpgradeMinorVersion ?? default(global::System.Management.Automation.SwitchParameter); set => ExtensionBody.AutoUpgradeMinorVersion = value; } + public global::System.Management.Automation.SwitchParameter AutoUpgradeMinorVersion { get => _extensionBody.AutoUpgradeMinorVersion ?? default(global::System.Management.Automation.SwitchParameter); set => _extensionBody.AutoUpgradeMinorVersion = value; } /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] @@ -99,20 +102,19 @@ public partial class NewAzKubernetesExtension_CreateExpanded : global::System.Ma Description = @"Namespace where the extension Release must be placed, for a Cluster scoped extension. If this namespace does not exist, it will be created", SerializedName = @"releaseNamespace", PossibleTypes = new [] { typeof(string) })] - public string ClusterReleaseNamespace { get => ExtensionBody.ClusterReleaseNamespace ?? null; set => ExtensionBody.ClusterReleaseNamespace = value; } + public string ClusterReleaseNamespace { get => _extensionBody.ClusterReleaseNamespace ?? null; set => _extensionBody.ClusterReleaseNamespace = value; } /// Backing field for property. private string _clusterRp; /// - /// The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or Microsoft.Kubernetes (for OnPrem K8S - /// clusters). + /// The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. /// - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or Microsoft.Kubernetes (for OnPrem K8S clusters).")] + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService.")] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = true, ReadOnly = false, - Description = @"The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or Microsoft.Kubernetes (for OnPrem K8S clusters).", + Description = @"The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService.", SerializedName = @"clusterRp", PossibleTypes = new [] { typeof(string) })] [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] @@ -122,14 +124,13 @@ public partial class NewAzKubernetesExtension_CreateExpanded : global::System.Ma private string _clusterType; /// - /// The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or connectedClusters (for OnPrem K8S - /// clusters). + /// The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. /// - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or connectedClusters (for OnPrem K8S clusters).")] + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters.")] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = true, ReadOnly = false, - Description = @"The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or connectedClusters (for OnPrem K8S clusters).", + Description = @"The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters.", SerializedName = @"clusterResourceName", PossibleTypes = new [] { typeof(string) })] [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] @@ -146,8 +147,8 @@ public partial class NewAzKubernetesExtension_CreateExpanded : global::System.Ma ReadOnly = false, Description = @"Configuration settings that are sensitive, as name-value pairs for configuring this extension.", SerializedName = @"configurationProtectedSettings", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesConfigurationProtectedSettings) })] - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesConfigurationProtectedSettings ConfigurationProtectedSetting { get => ExtensionBody.ConfigurationProtectedSetting ?? null /* object */; set => ExtensionBody.ConfigurationProtectedSetting = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesConfigurationProtectedSettings) })] + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesConfigurationProtectedSettings ConfigurationProtectedSetting { get => _extensionBody.ConfigurationProtectedSetting ?? null /* object */; set => _extensionBody.ConfigurationProtectedSetting = value; } /// Configuration settings, as name-value pairs for configuring this extension. [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ExportAs(typeof(global::System.Collections.Hashtable))] @@ -158,8 +159,8 @@ public partial class NewAzKubernetesExtension_CreateExpanded : global::System.Ma ReadOnly = false, Description = @"Configuration settings, as name-value pairs for configuring this extension.", SerializedName = @"configurationSettings", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesConfigurationSettings) })] - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesConfigurationSettings ConfigurationSetting { get => ExtensionBody.ConfigurationSetting ?? null /* object */; set => ExtensionBody.ConfigurationSetting = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesConfigurationSettings) })] + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesConfigurationSettings ConfigurationSetting { get => _extensionBody.ConfigurationSetting ?? null /* object */; set => _extensionBody.ConfigurationSetting = value; } /// /// The credentials, account, tenant, and subscription used for communication with Azure @@ -170,12 +171,6 @@ public partial class NewAzKubernetesExtension_CreateExpanded : global::System.Ma [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtension _extensionBody= new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.Extension(); - - /// The Extension object. - private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtension ExtensionBody { get => this._extensionBody; set => this._extensionBody = value; } - /// /// Type of the Extension, of which this resource is an instance of. It must be one of the Extension Types registered with /// Microsoft.KubernetesConfiguration by the Extension publisher. @@ -188,7 +183,7 @@ public partial class NewAzKubernetesExtension_CreateExpanded : global::System.Ma Description = @"Type of the Extension, of which this resource is an instance of. It must be one of the Extension Types registered with Microsoft.KubernetesConfiguration by the Extension publisher.", SerializedName = @"extensionType", PossibleTypes = new [] { typeof(string) })] - public string ExtensionType { get => ExtensionBody.ExtensionType ?? null; set => ExtensionBody.ExtensionType = value; } + public string ExtensionType { get => _extensionBody.ExtensionType ?? null; set => _extensionBody.ExtensionType = value; } /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] @@ -212,17 +207,17 @@ public partial class NewAzKubernetesExtension_CreateExpanded : global::System.Ma SerializedName = @"type", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ResourceIdentityType) })] [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ResourceIdentityType))] - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ResourceIdentityType IdentityType { get => ExtensionBody.IdentityType ?? ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ResourceIdentityType)""); set => ExtensionBody.IdentityType = value; } + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ResourceIdentityType IdentityType { get => _extensionBody.IdentityType ?? ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ResourceIdentityType)""); set => _extensionBody.IdentityType = 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. + /// cancellation delegate. Stops the cmdlet when called. /// global::System.Action Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - /// cancellation token. + /// cancellation token. global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener.Token => _cancellationTokenSource.Token; /// Backing field for property. @@ -252,7 +247,7 @@ public partial class NewAzKubernetesExtension_CreateExpanded : global::System.Ma Description = @"Namespace where the extension will be created for an Namespace scoped extension. If this namespace does not exist, it will be created", SerializedName = @"targetNamespace", PossibleTypes = new [] { typeof(string) })] - public string NamespaceTargetNamespace { get => ExtensionBody.NamespaceTargetNamespace ?? null; set => ExtensionBody.NamespaceTargetNamespace = value; } + public string NamespaceTargetNamespace { get => _extensionBody.NamespaceTargetNamespace ?? null; set => _extensionBody.NamespaceTargetNamespace = value; } /// /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue @@ -295,7 +290,7 @@ public partial class NewAzKubernetesExtension_CreateExpanded : global::System.Ma Description = @"ReleaseTrain this extension participates in for auto-upgrade (e.g. Stable, Preview, etc.) - only if autoUpgradeMinorVersion is 'true'.", SerializedName = @"releaseTrain", PossibleTypes = new [] { typeof(string) })] - public string ReleaseTrain { get => ExtensionBody.ReleaseTrain ?? null; set => ExtensionBody.ReleaseTrain = value; } + public string ReleaseTrain { get => _extensionBody.ReleaseTrain ?? null; set => _extensionBody.ReleaseTrain = value; } /// Backing field for property. private string _resourceGroupName; @@ -314,14 +309,12 @@ public partial class NewAzKubernetesExtension_CreateExpanded : global::System.Ma /// Backing field for property. private string _subscriptionId; - /// - /// The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000) - /// - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000)")] + /// The ID of the target subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = true, ReadOnly = false, - Description = @"The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000)", + Description = @"The ID of the target subscription.", SerializedName = @"subscriptionId", PossibleTypes = new [] { typeof(string) })] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.DefaultInfo( @@ -332,48 +325,53 @@ public partial class NewAzKubernetesExtension_CreateExpanded : global::System.Ma public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } /// - /// Version of the extension for this extension, if it is 'pinned' to a specific version. autoUpgradeMinorVersion must be + /// User-specified version of the extension for this extension to 'pin'. To use 'version', autoUpgradeMinorVersion must be /// 'false'. /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Version of the extension for this extension, if it is 'pinned' to a specific version. autoUpgradeMinorVersion must be 'false'.")] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "User-specified version of the extension for this extension to 'pin'. To use 'version', autoUpgradeMinorVersion must be 'false'.")] [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Body)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = false, ReadOnly = false, - Description = @"Version of the extension for this extension, if it is 'pinned' to a specific version. autoUpgradeMinorVersion must be 'false'.", + Description = @"User-specified version of the extension for this extension to 'pin'. To use 'version', autoUpgradeMinorVersion must be 'false'.", SerializedName = @"version", PossibleTypes = new [] { typeof(string) })] - public string Version { get => ExtensionBody.Version ?? null; set => ExtensionBody.Version = value; } + public string Version { get => _extensionBody.Version ?? null; set => _extensionBody.Version = 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 + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponse + /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtension + /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) /// protected override void BeginProcessing() { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); if (Break) { @@ -399,7 +397,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Cmdlets.NewAzK clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; clone.HttpPipelinePrepend = this.HttpPipelinePrepend; clone.HttpPipelineAppend = this.HttpPipelineAppend; - clone.ExtensionBody = this.ExtensionBody; + clone._extensionBody = this._extensionBody; clone.SubscriptionId = this.SubscriptionId; clone.ResourceGroupName = this.ResourceGroupName; clone.ClusterRp = this.ClusterRp; @@ -412,7 +410,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Cmdlets.NewAzK /// Performs clean-up after the command execution protected override void EndProcessing() { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletEndProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } /// Handles/Dispatches events during the call to the REST service. @@ -553,7 +551,6 @@ protected override void ProcessRecord() { using( NoSynchronizationContext ) { - await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletProcessRecordAsyncStart); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } Pipeline = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); if (null != HttpPipelinePrepend) @@ -568,12 +565,12 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.ExtensionsCreate(SubscriptionId, ResourceGroupName, ClusterRp, ClusterType, ClusterName, Name, ExtensionBody, onOk, onDefault, this, Pipeline); + await this.Client.ExtensionsCreate(SubscriptionId, ResourceGroupName, ClusterRp, ClusterType, ClusterName, Name, _extensionBody, onOk, onDefault, this, Pipeline); await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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,ClusterRp=ClusterRp,ClusterType=ClusterType,ClusterName=ClusterName,Name=Name,body=ExtensionBody}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,ClusterRp=ClusterRp,ClusterType=ClusterType,ClusterName=ClusterName,Name=Name,body=_extensionBody}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -596,12 +593,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponse + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -618,15 +615,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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, ClusterRp=ClusterRp, ClusterType=ClusterType, ClusterName=ClusterName, Name=Name, body=ExtensionBody }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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, ClusterRp=ClusterRp, ClusterType=ClusterType, ClusterName=ClusterName, Name=Name, body=_extensionBody }) { 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, ClusterRp=ClusterRp, ClusterType=ClusterType, ClusterName=ClusterName, Name=Name, body=ExtensionBody }) + 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, ClusterRp=ClusterRp, ClusterType=ClusterType, ClusterName=ClusterName, Name=Name, body=_extensionBody }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -636,12 +633,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtension + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -653,7 +650,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtension + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtension WriteObject((await response)); } } diff --git a/src/KubernetesConfiguration/generated/cmdlets/RemoveAzKubernetesConfigurationFlux_Delete.cs b/src/KubernetesConfiguration/generated/cmdlets/RemoveAzKubernetesConfigurationFlux_Delete.cs new file mode 100644 index 000000000000..56e9641f86d9 --- /dev/null +++ b/src/KubernetesConfiguration/generated/cmdlets/RemoveAzKubernetesConfigurationFlux_Delete.cs @@ -0,0 +1,577 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; + using System; + + /// + /// This will delete the YAML file used to set up the Flux Configuration, thus stopping future sync from the source repo. + /// + /// + /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/{fluxConfigurationName}" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzKubernetesConfigurationFlux_Delete", SupportsShouldProcess = true)] + [global::System.Management.Automation.Alias("Remove-AzK8sConfigurationFlux")] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Description(@"This will delete the YAML file used to set up the Flux Configuration, thus stopping future sync from the source repo.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Generated] + public partial class RemoveAzKubernetesConfigurationFlux_Delete : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.KubernetesConfiguration Client => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.ClientAPI; + + /// Backing field for property. + private string _clusterName; + + /// The name of the kubernetes cluster. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the kubernetes cluster.")] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the kubernetes cluster.", + SerializedName = @"clusterName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] + public string ClusterName { get => this._clusterName; set => this._clusterName = value; } + + /// Backing field for property. + private string _clusterRp; + + /// + /// The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService.")] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService.", + SerializedName = @"clusterRp", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] + public string ClusterRp { get => this._clusterRp; set => this._clusterRp = value; } + + /// Backing field for property. + private string _clusterType; + + /// + /// The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters.")] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters.", + SerializedName = @"clusterResourceName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] + public string ClusterType { get => this._clusterType; set => this._clusterType = 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.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Backing field for property. + private global::System.Management.Automation.SwitchParameter _forceDelete; + + /// Delete the extension resource in Azure - not the normal asynchronous delete. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Delete the extension resource in Azure - not the normal asynchronous delete.")] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Delete the extension resource in Azure - not the normal asynchronous delete.", + SerializedName = @"forceDelete", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Query)] + public global::System.Management.Automation.SwitchParameter ForceDelete { get => this._forceDelete; set => this._forceDelete = value; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// Name of the Flux Configuration. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Flux Configuration.")] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Flux Configuration.", + SerializedName = @"fluxConfigurationName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("FluxConfigurationName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.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.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of + /// what happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onNoContent method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnNoContent(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of RemoveAzKubernetesConfigurationFlux_Delete + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Cmdlets.RemoveAzKubernetesConfigurationFlux_Delete Clone() + { + var clone = new RemoveAzKubernetesConfigurationFlux_Delete(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.ClusterRp = this.ClusterRp; + clone.ClusterType = this.ClusterType; + clone.ClusterName = this.ClusterName; + clone.Name = this.Name; + clone.ForceDelete = this.ForceDelete; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// 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.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'FluxConfigurationsDelete' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.FluxConfigurationsDelete(SubscriptionId, ResourceGroupName, ClusterRp, ClusterType, ClusterName, Name, this.InvocationInformation.BoundParameters.ContainsKey("ForceDelete") ? ForceDelete : default(global::System.Management.Automation.SwitchParameter?), onOk, onNoContent, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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,ClusterRp=ClusterRp,ClusterType=ClusterType,ClusterName=ClusterName,Name=Name,ForceDelete=this.InvocationInformation.BoundParameters.ContainsKey("ForceDelete") ? ForceDelete : default(global::System.Management.Automation.SwitchParameter?)}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public RemoveAzKubernetesConfigurationFlux_Delete() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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, ClusterRp=ClusterRp, ClusterType=ClusterType, ClusterName=ClusterName, Name=Name, ForceDelete=this.InvocationInformation.BoundParameters.ContainsKey("ForceDelete") ? ForceDelete : default(global::System.Management.Automation.SwitchParameter?) }) + { + 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, ClusterRp=ClusterRp, ClusterType=ClusterType, ClusterName=ClusterName, Name=Name, ForceDelete=this.InvocationInformation.BoundParameters.ContainsKey("ForceDelete") ? ForceDelete : default(global::System.Management.Automation.SwitchParameter?) }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 204 (NoContent). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onNoContent(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnNoContent(responseMessage, ref _returnNow); + // if overrideOnNoContent has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onNoContent - response for 204 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/src/KubernetesConfiguration/generated/cmdlets/RemoveAzKubernetesConfigurationFlux_DeleteViaIdentity.cs b/src/KubernetesConfiguration/generated/cmdlets/RemoveAzKubernetesConfigurationFlux_DeleteViaIdentity.cs new file mode 100644 index 000000000000..ec1607c476c8 --- /dev/null +++ b/src/KubernetesConfiguration/generated/cmdlets/RemoveAzKubernetesConfigurationFlux_DeleteViaIdentity.cs @@ -0,0 +1,518 @@ +// 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.KubernetesConfiguration.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; + using System; + + /// + /// This will delete the YAML file used to set up the Flux Configuration, thus stopping future sync from the source repo. + /// + /// + /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/{fluxConfigurationName}" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzKubernetesConfigurationFlux_DeleteViaIdentity", SupportsShouldProcess = true)] + [global::System.Management.Automation.Alias("Remove-AzK8sConfigurationFlux")] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Description(@"This will delete the YAML file used to set up the Flux Configuration, thus stopping future sync from the source repo.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Generated] + public partial class RemoveAzKubernetesConfigurationFlux_DeleteViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.KubernetesConfiguration Client => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Backing field for property. + private global::System.Management.Automation.SwitchParameter _forceDelete; + + /// Delete the extension resource in Azure - not the normal asynchronous delete. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Delete the extension resource in Azure - not the normal asynchronous delete.")] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Delete the extension resource in Azure - not the normal asynchronous delete.", + SerializedName = @"forceDelete", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Query)] + public global::System.Management.Automation.SwitchParameter ForceDelete { get => this._forceDelete; set => this._forceDelete = value; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentity 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.KubernetesConfiguration.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of + /// what happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onNoContent method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnNoContent(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of RemoveAzKubernetesConfigurationFlux_DeleteViaIdentity + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Cmdlets.RemoveAzKubernetesConfigurationFlux_DeleteViaIdentity Clone() + { + var clone = new RemoveAzKubernetesConfigurationFlux_DeleteViaIdentity(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.ForceDelete = this.ForceDelete; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// 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.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'FluxConfigurationsDelete' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.FluxConfigurationsDeleteViaIdentity(InputObject.Id, this.InvocationInformation.BoundParameters.ContainsKey("ForceDelete") ? ForceDelete : default(global::System.Management.Automation.SwitchParameter?), onOk, onNoContent, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ClusterRp) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ClusterRp"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ClusterResourceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ClusterResourceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ClusterName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ClusterName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.FluxConfigurationName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.FluxConfigurationName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.FluxConfigurationsDelete(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.ClusterRp ?? null, InputObject.ClusterResourceName ?? null, InputObject.ClusterName ?? null, InputObject.FluxConfigurationName ?? null, this.InvocationInformation.BoundParameters.ContainsKey("ForceDelete") ? ForceDelete : default(global::System.Management.Automation.SwitchParameter?), onOk, onNoContent, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ForceDelete=this.InvocationInformation.BoundParameters.ContainsKey("ForceDelete") ? ForceDelete : default(global::System.Management.Automation.SwitchParameter?)}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public RemoveAzKubernetesConfigurationFlux_DeleteViaIdentity() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ForceDelete=this.InvocationInformation.BoundParameters.ContainsKey("ForceDelete") ? ForceDelete : default(global::System.Management.Automation.SwitchParameter?) }) + { + 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 { ForceDelete=this.InvocationInformation.BoundParameters.ContainsKey("ForceDelete") ? ForceDelete : default(global::System.Management.Automation.SwitchParameter?) }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 204 (NoContent). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onNoContent(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnNoContent(responseMessage, ref _returnNow); + // if overrideOnNoContent has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onNoContent - response for 204 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/src/KubernetesConfiguration/generated/cmdlets/RemoveAzKubernetesConfiguration_Delete.cs b/src/KubernetesConfiguration/generated/cmdlets/RemoveAzKubernetesConfiguration_Delete.cs index 3d9393146bf5..5a948a3671e7 100644 --- a/src/KubernetesConfiguration/generated/cmdlets/RemoveAzKubernetesConfiguration_Delete.cs +++ b/src/KubernetesConfiguration/generated/cmdlets/RemoveAzKubernetesConfiguration_Delete.cs @@ -69,14 +69,13 @@ public partial class RemoveAzKubernetesConfiguration_Delete : global::System.Man private string _clusterRp; /// - /// The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or Microsoft.Kubernetes (for OnPrem K8S - /// clusters). + /// The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. /// - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or Microsoft.Kubernetes (for OnPrem K8S clusters).")] + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService.")] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = true, ReadOnly = false, - Description = @"The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or Microsoft.Kubernetes (for OnPrem K8S clusters).", + Description = @"The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService.", SerializedName = @"clusterRp", PossibleTypes = new [] { typeof(string) })] [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] @@ -86,14 +85,13 @@ public partial class RemoveAzKubernetesConfiguration_Delete : global::System.Man private string _clusterType; /// - /// The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or connectedClusters (for OnPrem K8S - /// clusters). + /// The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. /// - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or connectedClusters (for OnPrem K8S clusters).")] + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters.")] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = true, ReadOnly = false, - Description = @"The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or connectedClusters (for OnPrem K8S clusters).", + Description = @"The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters.", SerializedName = @"clusterResourceName", PossibleTypes = new [] { typeof(string) })] [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] @@ -124,11 +122,11 @@ public partial class RemoveAzKubernetesConfiguration_Delete : global::System.Man public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } /// - /// cancellation delegate. Stops the cmdlet when called. + /// cancellation delegate. Stops the cmdlet when called. /// global::System.Action Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - /// cancellation token. + /// cancellation token. global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener.Token => _cancellationTokenSource.Token; /// Backing field for property. @@ -185,12 +183,12 @@ public partial class RemoveAzKubernetesConfiguration_Delete : global::System.Man /// Backing field for property. private string _resourceGroupName; - /// The name of the resource group. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group.")] + /// 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.KubernetesConfiguration.Runtime.Info( Required = true, ReadOnly = false, - Description = @"The name of the resource group.", + Description = @"The name of the resource group. The name is case insensitive.", SerializedName = @"resourceGroupName", PossibleTypes = new [] { typeof(string) })] [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] @@ -199,14 +197,12 @@ public partial class RemoveAzKubernetesConfiguration_Delete : global::System.Man /// Backing field for property. private string _subscriptionId; - /// - /// The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000) - /// - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000)")] + /// The ID of the target subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = true, ReadOnly = false, - Description = @"The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000)", + Description = @"The ID of the target subscription.", SerializedName = @"subscriptionId", PossibleTypes = new [] { typeof(string) })] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.DefaultInfo( @@ -221,12 +217,12 @@ public partial class RemoveAzKubernetesConfiguration_Delete : global::System.Man /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponse + /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of @@ -253,6 +249,11 @@ public partial class RemoveAzKubernetesConfiguration_Delete : global::System.Man /// protected override void BeginProcessing() { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); if (Break) { @@ -290,7 +291,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Cmdlets.Remove /// Performs clean-up after the command execution protected override void EndProcessing() { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletEndProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } /// Handles/Dispatches events during the call to the REST service. @@ -423,7 +424,6 @@ protected override void ProcessRecord() { using( NoSynchronizationContext ) { - await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletProcessRecordAsyncStart); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } Pipeline = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); if (null != HttpPipelinePrepend) @@ -474,12 +474,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponse + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -496,7 +496,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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, ClusterRp=ClusterRp, ClusterType=ClusterType, ClusterName=ClusterName, Name=Name }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } diff --git a/src/KubernetesConfiguration/generated/cmdlets/RemoveAzKubernetesConfiguration_DeleteViaIdentity.cs b/src/KubernetesConfiguration/generated/cmdlets/RemoveAzKubernetesConfiguration_DeleteViaIdentity.cs index 2563fbfbe894..a2a5348dbf90 100644 --- a/src/KubernetesConfiguration/generated/cmdlets/RemoveAzKubernetesConfiguration_DeleteViaIdentity.cs +++ b/src/KubernetesConfiguration/generated/cmdlets/RemoveAzKubernetesConfiguration_DeleteViaIdentity.cs @@ -84,11 +84,11 @@ public partial class RemoveAzKubernetesConfiguration_DeleteViaIdentity : global: public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } /// - /// cancellation delegate. Stops the cmdlet when called. + /// cancellation delegate. Stops the cmdlet when called. /// global::System.Action Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - /// cancellation token. + /// cancellation token. global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener.Token => _cancellationTokenSource.Token; /// @@ -132,12 +132,12 @@ public partial class RemoveAzKubernetesConfiguration_DeleteViaIdentity : global: /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponse + /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of @@ -164,6 +164,11 @@ public partial class RemoveAzKubernetesConfiguration_DeleteViaIdentity : global: /// protected override void BeginProcessing() { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); if (Break) { @@ -195,7 +200,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Cmdlets.Remove /// Performs clean-up after the command execution protected override void EndProcessing() { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletEndProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } /// Handles/Dispatches events during the call to the REST service. @@ -328,7 +333,6 @@ protected override void ProcessRecord() { using( NoSynchronizationContext ) { - await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletProcessRecordAsyncStart); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } Pipeline = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); if (null != HttpPipelinePrepend) @@ -411,12 +415,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponse + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -433,7 +437,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } diff --git a/src/KubernetesConfiguration/generated/cmdlets/RemoveAzKubernetesExtension_Delete.cs b/src/KubernetesConfiguration/generated/cmdlets/RemoveAzKubernetesExtension_Delete.cs index 34acb1b605d5..6e3d46405c65 100644 --- a/src/KubernetesConfiguration/generated/cmdlets/RemoveAzKubernetesExtension_Delete.cs +++ b/src/KubernetesConfiguration/generated/cmdlets/RemoveAzKubernetesExtension_Delete.cs @@ -68,14 +68,13 @@ public partial class RemoveAzKubernetesExtension_Delete : global::System.Managem private string _clusterRp; /// - /// The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or Microsoft.Kubernetes (for OnPrem K8S - /// clusters). + /// The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. /// - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or Microsoft.Kubernetes (for OnPrem K8S clusters).")] + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService.")] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = true, ReadOnly = false, - Description = @"The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or Microsoft.Kubernetes (for OnPrem K8S clusters).", + Description = @"The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService.", SerializedName = @"clusterRp", PossibleTypes = new [] { typeof(string) })] [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] @@ -85,14 +84,13 @@ public partial class RemoveAzKubernetesExtension_Delete : global::System.Managem private string _clusterType; /// - /// The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or connectedClusters (for OnPrem K8S - /// clusters). + /// The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. /// - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or connectedClusters (for OnPrem K8S clusters).")] + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters.")] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = true, ReadOnly = false, - Description = @"The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or connectedClusters (for OnPrem K8S clusters).", + Description = @"The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters.", SerializedName = @"clusterResourceName", PossibleTypes = new [] { typeof(string) })] [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] @@ -137,11 +135,11 @@ public partial class RemoveAzKubernetesExtension_Delete : global::System.Managem public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } /// - /// cancellation delegate. Stops the cmdlet when called. + /// cancellation delegate. Stops the cmdlet when called. /// global::System.Action Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - /// cancellation token. + /// cancellation token. global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener.Token => _cancellationTokenSource.Token; /// Backing field for property. @@ -212,14 +210,12 @@ public partial class RemoveAzKubernetesExtension_Delete : global::System.Managem /// Backing field for property. private string _subscriptionId; - /// - /// The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000) - /// - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000)")] + /// The ID of the target subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = true, ReadOnly = false, - Description = @"The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000)", + Description = @"The ID of the target subscription.", SerializedName = @"subscriptionId", PossibleTypes = new [] { typeof(string) })] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.DefaultInfo( @@ -234,12 +230,12 @@ public partial class RemoveAzKubernetesExtension_Delete : global::System.Managem /// 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 + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponse + /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of @@ -266,6 +262,11 @@ public partial class RemoveAzKubernetesExtension_Delete : global::System.Managem /// protected override void BeginProcessing() { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); if (Break) { @@ -304,7 +305,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Cmdlets.Remove /// Performs clean-up after the command execution protected override void EndProcessing() { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletEndProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } /// Handles/Dispatches events during the call to the REST service. @@ -437,7 +438,6 @@ protected override void ProcessRecord() { using( NoSynchronizationContext ) { - await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletProcessRecordAsyncStart); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } Pipeline = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); if (null != HttpPipelinePrepend) @@ -488,12 +488,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponse + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -510,7 +510,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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, ClusterRp=ClusterRp, ClusterType=ClusterType, ClusterName=ClusterName, Name=Name, ForceDelete=this.InvocationInformation.BoundParameters.ContainsKey("ForceDelete") ? ForceDelete : default(global::System.Management.Automation.SwitchParameter?) }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } diff --git a/src/KubernetesConfiguration/generated/cmdlets/RemoveAzKubernetesExtension_DeleteViaIdentity.cs b/src/KubernetesConfiguration/generated/cmdlets/RemoveAzKubernetesExtension_DeleteViaIdentity.cs index e133c7caaa29..a04bc84fdd20 100644 --- a/src/KubernetesConfiguration/generated/cmdlets/RemoveAzKubernetesExtension_DeleteViaIdentity.cs +++ b/src/KubernetesConfiguration/generated/cmdlets/RemoveAzKubernetesExtension_DeleteViaIdentity.cs @@ -97,11 +97,11 @@ public partial class RemoveAzKubernetesExtension_DeleteViaIdentity : global::Sys public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } /// - /// cancellation delegate. Stops the cmdlet when called. + /// cancellation delegate. Stops the cmdlet when called. /// global::System.Action Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - /// cancellation token. + /// cancellation token. global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener.Token => _cancellationTokenSource.Token; /// @@ -145,12 +145,12 @@ public partial class RemoveAzKubernetesExtension_DeleteViaIdentity : global::Sys /// 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 + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponse + /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of @@ -177,6 +177,11 @@ public partial class RemoveAzKubernetesExtension_DeleteViaIdentity : global::Sys /// protected override void BeginProcessing() { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); if (Break) { @@ -209,7 +214,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Cmdlets.Remove /// Performs clean-up after the command execution protected override void EndProcessing() { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletEndProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } /// Handles/Dispatches events during the call to the REST service. @@ -342,7 +347,6 @@ protected override void ProcessRecord() { using( NoSynchronizationContext ) { - await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletProcessRecordAsyncStart); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } Pipeline = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); if (null != HttpPipelinePrepend) @@ -425,12 +429,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponse + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -447,7 +451,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ForceDelete=this.InvocationInformation.BoundParameters.ContainsKey("ForceDelete") ? ForceDelete : default(global::System.Management.Automation.SwitchParameter?) }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } diff --git a/src/KubernetesConfiguration/generated/cmdlets/SetAzKubernetesConfigurationFlux_UpdateExpanded.cs b/src/KubernetesConfiguration/generated/cmdlets/SetAzKubernetesConfigurationFlux_UpdateExpanded.cs new file mode 100644 index 000000000000..860b9d2d728b --- /dev/null +++ b/src/KubernetesConfiguration/generated/cmdlets/SetAzKubernetesConfigurationFlux_UpdateExpanded.cs @@ -0,0 +1,859 @@ +// 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.KubernetesConfiguration.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; + using System; + + /// Create a new Kubernetes Flux Configuration. + /// + /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/{fluxConfigurationName}" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Set, @"AzKubernetesConfigurationFlux_UpdateExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfiguration))] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Description(@"Create a new Kubernetes Flux Configuration.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Generated] + public partial class SetAzKubernetesConfigurationFlux_UpdateExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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(); + + /// The Flux Configuration object returned in Get & Put response. + private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfiguration _fluxConfigurationBody = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.FluxConfiguration(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Plaintext access key used to securely access the S3 bucket + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Plaintext access key used to securely access the S3 bucket")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Plaintext access key used to securely access the S3 bucket", + SerializedName = @"accessKey", + PossibleTypes = new [] { typeof(System.Security.SecureString) })] + public System.Security.SecureString BucketAccessKey { get => _fluxConfigurationBody.BucketAccessKey ?? null; set => _fluxConfigurationBody.BucketAccessKey = value; } + + /// + /// Specify whether to use insecure communication when puling data from the S3 bucket. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Specify whether to use insecure communication when puling data from the S3 bucket.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Specify whether to use insecure communication when puling data from the S3 bucket.", + SerializedName = @"insecure", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter BucketInsecure { get => _fluxConfigurationBody.BucketInsecure ?? default(global::System.Management.Automation.SwitchParameter); set => _fluxConfigurationBody.BucketInsecure = value; } + + /// + /// Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided + /// configuration secrets. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided configuration secrets.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided configuration secrets.", + SerializedName = @"localAuthRef", + PossibleTypes = new [] { typeof(string) })] + public string BucketLocalAuthRef { get => _fluxConfigurationBody.BucketLocalAuthRef ?? null; set => _fluxConfigurationBody.BucketLocalAuthRef = value; } + + /// The bucket name to sync from the url endpoint for the flux configuration. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The bucket name to sync from the url endpoint for the flux configuration.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The bucket name to sync from the url endpoint for the flux configuration.", + SerializedName = @"bucketName", + PossibleTypes = new [] { typeof(string) })] + public string BucketName { get => _fluxConfigurationBody.BucketName ?? null; set => _fluxConfigurationBody.BucketName = value; } + + /// + /// The interval at which to re-reconcile the cluster git repository source with the remote. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The interval at which to re-reconcile the cluster git repository source with the remote.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The interval at which to re-reconcile the cluster git repository source with the remote.", + SerializedName = @"syncIntervalInSeconds", + PossibleTypes = new [] { typeof(long) })] + public long BucketSyncIntervalInSecond { get => _fluxConfigurationBody.BucketSyncIntervalInSecond ?? default(long); set => _fluxConfigurationBody.BucketSyncIntervalInSecond = value; } + + /// + /// The maximum time to attempt to reconcile the cluster git repository source with the remote. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The maximum time to attempt to reconcile the cluster git repository source with the remote.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The maximum time to attempt to reconcile the cluster git repository source with the remote.", + SerializedName = @"timeoutInSeconds", + PossibleTypes = new [] { typeof(long) })] + public long BucketTimeoutInSecond { get => _fluxConfigurationBody.BucketTimeoutInSecond ?? default(long); set => _fluxConfigurationBody.BucketTimeoutInSecond = value; } + + /// The URL to sync for the flux configuration S3 bucket. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The URL to sync for the flux configuration S3 bucket.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The URL to sync for the flux configuration S3 bucket.", + SerializedName = @"url", + PossibleTypes = new [] { typeof(string) })] + public string BucketUrl { get => _fluxConfigurationBody.BucketUrl ?? null; set => _fluxConfigurationBody.BucketUrl = value; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.KubernetesConfiguration Client => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.ClientAPI; + + /// Backing field for property. + private string _clusterName; + + /// The name of the kubernetes cluster. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the kubernetes cluster.")] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the kubernetes cluster.", + SerializedName = @"clusterName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] + public string ClusterName { get => this._clusterName; set => this._clusterName = value; } + + /// Backing field for property. + private string _clusterRp; + + /// + /// The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService.")] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService.", + SerializedName = @"clusterRp", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] + public string ClusterRp { get => this._clusterRp; set => this._clusterRp = value; } + + /// Backing field for property. + private string _clusterType; + + /// + /// The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters.")] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters.", + SerializedName = @"clusterResourceName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] + public string ClusterType { get => this._clusterType; set => this._clusterType = value; } + + /// Key-value pairs of protected configuration settings for the configuration + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ExportAs(typeof(global::System.Collections.Hashtable))] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Key-value pairs of protected configuration settings for the configuration")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Key-value pairs of protected configuration settings for the configuration", + SerializedName = @"configurationProtectedSettings", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesConfigurationProtectedSettings) })] + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesConfigurationProtectedSettings ConfigurationProtectedSetting { get => _fluxConfigurationBody.ConfigurationProtectedSetting ?? null /* object */; set => _fluxConfigurationBody.ConfigurationProtectedSetting = 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.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// + /// Base64-encoded HTTPS certificate authority contents used to access git private git repositories over HTTPS + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Base64-encoded HTTPS certificate authority contents used to access git private git repositories over HTTPS")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Base64-encoded HTTPS certificate authority contents used to access git private git repositories over HTTPS", + SerializedName = @"httpsCACert", + PossibleTypes = new [] { typeof(string) })] + public string GitRepositoryHttpsCaCert { get => _fluxConfigurationBody.GitRepositoryHttpsCaCert ?? null; set => _fluxConfigurationBody.GitRepositoryHttpsCaCert = value; } + + /// Plaintext HTTPS username used to access private git repositories over HTTPS + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Plaintext HTTPS username used to access private git repositories over HTTPS")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Plaintext HTTPS username used to access private git repositories over HTTPS", + SerializedName = @"httpsUser", + PossibleTypes = new [] { typeof(string) })] + public string GitRepositoryHttpsUser { get => _fluxConfigurationBody.GitRepositoryHttpsUser ?? null; set => _fluxConfigurationBody.GitRepositoryHttpsUser = value; } + + /// + /// Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided + /// configuration secrets. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided configuration secrets.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided configuration secrets.", + SerializedName = @"localAuthRef", + PossibleTypes = new [] { typeof(string) })] + public string GitRepositoryLocalAuthRef { get => _fluxConfigurationBody.GitRepositoryLocalAuthRef ?? null; set => _fluxConfigurationBody.GitRepositoryLocalAuthRef = value; } + + /// + /// Base64-encoded known_hosts value containing public SSH keys required to access private git repositories over SSH + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Base64-encoded known_hosts value containing public SSH keys required to access private git repositories over SSH")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Base64-encoded known_hosts value containing public SSH keys required to access private git repositories over SSH", + SerializedName = @"sshKnownHosts", + PossibleTypes = new [] { typeof(string) })] + public string GitRepositorySshKnownHost { get => _fluxConfigurationBody.GitRepositorySshKnownHost ?? null; set => _fluxConfigurationBody.GitRepositorySshKnownHost = value; } + + /// + /// The interval at which to re-reconcile the cluster git repository source with the remote. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The interval at which to re-reconcile the cluster git repository source with the remote.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The interval at which to re-reconcile the cluster git repository source with the remote.", + SerializedName = @"syncIntervalInSeconds", + PossibleTypes = new [] { typeof(long) })] + public long GitRepositorySyncIntervalInSecond { get => _fluxConfigurationBody.GitRepositorySyncIntervalInSecond ?? default(long); set => _fluxConfigurationBody.GitRepositorySyncIntervalInSecond = value; } + + /// + /// The maximum time to attempt to reconcile the cluster git repository source with the remote. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The maximum time to attempt to reconcile the cluster git repository source with the remote.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The maximum time to attempt to reconcile the cluster git repository source with the remote.", + SerializedName = @"timeoutInSeconds", + PossibleTypes = new [] { typeof(long) })] + public long GitRepositoryTimeoutInSecond { get => _fluxConfigurationBody.GitRepositoryTimeoutInSecond ?? default(long); set => _fluxConfigurationBody.GitRepositoryTimeoutInSecond = value; } + + /// The URL to sync for the flux configuration git repository. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The URL to sync for the flux configuration git repository.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The URL to sync for the flux configuration git repository.", + SerializedName = @"url", + PossibleTypes = new [] { typeof(string) })] + public string GitRepositoryUrl { get => _fluxConfigurationBody.GitRepositoryUrl ?? null; set => _fluxConfigurationBody.GitRepositoryUrl = value; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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; } } + + /// + /// Array of kustomizations used to reconcile the artifact pulled by the source type on the cluster. + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ExportAs(typeof(global::System.Collections.Hashtable))] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Array of kustomizations used to reconcile the artifact pulled by the source type on the cluster.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Array of kustomizations used to reconcile the artifact pulled by the source type on the cluster.", + SerializedName = @"kustomizations", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesKustomizations) })] + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesKustomizations Kustomization { get => _fluxConfigurationBody.Kustomization ?? null /* object */; set => _fluxConfigurationBody.Kustomization = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// Name of the Flux Configuration. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Flux Configuration.")] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Flux Configuration.", + SerializedName = @"fluxConfigurationName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("FluxConfigurationName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The namespace to which this configuration is installed to. Maximum of 253 lower case alphanumeric characters, hyphen and + /// period only. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The namespace to which this configuration is installed to. Maximum of 253 lower case alphanumeric characters, hyphen and period only.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The namespace to which this configuration is installed to. Maximum of 253 lower case alphanumeric characters, hyphen and period only.", + SerializedName = @"namespace", + PossibleTypes = new [] { typeof(string) })] + public string Namespace { get => _fluxConfigurationBody.Namespace ?? null; set => _fluxConfigurationBody.Namespace = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// The git repository branch name to checkout. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The git repository branch name to checkout.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The git repository branch name to checkout.", + SerializedName = @"branch", + PossibleTypes = new [] { typeof(string) })] + public string RepositoryRefBranch { get => _fluxConfigurationBody.RepositoryRefBranch ?? null; set => _fluxConfigurationBody.RepositoryRefBranch = value; } + + /// + /// The commit SHA to checkout. This value must be combined with the branch name to be valid. This takes precedence over semver. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The commit SHA to checkout. This value must be combined with the branch name to be valid. This takes precedence over semver.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The commit SHA to checkout. This value must be combined with the branch name to be valid. This takes precedence over semver.", + SerializedName = @"commit", + PossibleTypes = new [] { typeof(string) })] + public string RepositoryRefCommit { get => _fluxConfigurationBody.RepositoryRefCommit ?? null; set => _fluxConfigurationBody.RepositoryRefCommit = value; } + + /// + /// The semver range used to match against git repository tags. This takes precedence over tag. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The semver range used to match against git repository tags. This takes precedence over tag.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The semver range used to match against git repository tags. This takes precedence over tag.", + SerializedName = @"semver", + PossibleTypes = new [] { typeof(string) })] + public string RepositoryRefSemver { get => _fluxConfigurationBody.RepositoryRefSemver ?? null; set => _fluxConfigurationBody.RepositoryRefSemver = value; } + + /// The git repository tag name to checkout. This takes precedence over branch. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The git repository tag name to checkout. This takes precedence over branch.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The git repository tag name to checkout. This takes precedence over branch.", + SerializedName = @"tag", + PossibleTypes = new [] { typeof(string) })] + public string RepositoryRefTag { get => _fluxConfigurationBody.RepositoryRefTag ?? null; set => _fluxConfigurationBody.RepositoryRefTag = value; } + + /// 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.KubernetesConfiguration.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.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Scope at which the operator will be installed. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Scope at which the operator will be installed.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Scope at which the operator will be installed.", + SerializedName = @"scope", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ScopeType) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ScopeType))] + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ScopeType Scope { get => _fluxConfigurationBody.Scope ?? ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ScopeType)""); set => _fluxConfigurationBody.Scope = value; } + + /// Source Kind to pull the configuration data from. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Source Kind to pull the configuration data from.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Source Kind to pull the configuration data from.", + SerializedName = @"sourceKind", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType))] + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType SourceKind { get => _fluxConfigurationBody.SourceKind ?? ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType)""); set => _fluxConfigurationBody.SourceKind = 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.KubernetesConfiguration.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// Whether this configuration should suspend its reconciliation of its kustomizations and sources. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Whether this configuration should suspend its reconciliation of its kustomizations and sources.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Whether this configuration should suspend its reconciliation of its kustomizations and sources.", + SerializedName = @"suspend", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter Suspend { get => _fluxConfigurationBody.Suspend ?? default(global::System.Management.Automation.SwitchParameter); set => _fluxConfigurationBody.Suspend = value; } + + /// + /// overrideOnBadRequest will be called before the regular onBadRequest has been processed, allowing customization + /// of what happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onBadRequest method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnBadRequest(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfiguration + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of SetAzKubernetesConfigurationFlux_UpdateExpanded + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Cmdlets.SetAzKubernetesConfigurationFlux_UpdateExpanded Clone() + { + var clone = new SetAzKubernetesConfigurationFlux_UpdateExpanded(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._fluxConfigurationBody = this._fluxConfigurationBody; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.ClusterRp = this.ClusterRp; + clone.ClusterType = this.ClusterType; + clone.ClusterName = this.ClusterName; + clone.Name = this.Name; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// 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.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'FluxConfigurationsCreateOrUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.FluxConfigurationsCreateOrUpdate(SubscriptionId, ResourceGroupName, ClusterRp, ClusterType, ClusterName, Name, _fluxConfigurationBody, onOk, onBadRequest, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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,ClusterRp=ClusterRp,ClusterType=ClusterType,ClusterName=ClusterName,Name=Name,body=_fluxConfigurationBody}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public SetAzKubernetesConfigurationFlux_UpdateExpanded() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// a delegate that is called when the remote service returns 400 (BadRequest). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onBadRequest(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnBadRequest(responseMessage, response, ref _returnNow); + // if overrideOnBadRequest has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onBadRequest - response for 400 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponse + WriteObject((await response)); + } + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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, ClusterRp=ClusterRp, ClusterType=ClusterType, ClusterName=ClusterName, Name=Name, body=_fluxConfigurationBody }) + { + 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, ClusterRp=ClusterRp, ClusterType=ClusterType, ClusterName=ClusterName, Name=Name, body=_fluxConfigurationBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfiguration + /// 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.KubernetesConfiguration.Models.Api20220301.IFluxConfiguration + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/src/KubernetesConfiguration/generated/cmdlets/UpdateAzKubernetesConfigurationFlux_UpdateExpanded.cs b/src/KubernetesConfiguration/generated/cmdlets/UpdateAzKubernetesConfigurationFlux_UpdateExpanded.cs new file mode 100644 index 000000000000..7992256c02f2 --- /dev/null +++ b/src/KubernetesConfiguration/generated/cmdlets/UpdateAzKubernetesConfigurationFlux_UpdateExpanded.cs @@ -0,0 +1,798 @@ +// 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.KubernetesConfiguration.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; + using System; + + /// Update an existing Kubernetes Flux Configuration. + /// + /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/{fluxConfigurationName}" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzKubernetesConfigurationFlux_UpdateExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.Alias("Update-AzK8sConfigurationFlux")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfiguration))] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Description(@"Update an existing Kubernetes Flux Configuration.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Generated] + public partial class UpdateAzKubernetesConfigurationFlux_UpdateExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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(); + + /// The Flux Configuration Patch Request object. + private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatch _fluxConfigurationPatchBody = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.FluxConfigurationPatch(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Plaintext access key used to securely access the S3 bucket + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Plaintext access key used to securely access the S3 bucket")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Plaintext access key used to securely access the S3 bucket", + SerializedName = @"accessKey", + PossibleTypes = new [] { typeof(System.Security.SecureString) })] + public System.Security.SecureString BucketAccessKey { get => _fluxConfigurationPatchBody.BucketAccessKey ?? null; set => _fluxConfigurationPatchBody.BucketAccessKey = value; } + + /// + /// Specify whether to use insecure communication when puling data from the S3 bucket. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Specify whether to use insecure communication when puling data from the S3 bucket.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Specify whether to use insecure communication when puling data from the S3 bucket.", + SerializedName = @"insecure", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter BucketInsecure { get => _fluxConfigurationPatchBody.BucketInsecure ?? default(global::System.Management.Automation.SwitchParameter); set => _fluxConfigurationPatchBody.BucketInsecure = value; } + + /// + /// Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided + /// configuration secrets. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided configuration secrets.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided configuration secrets.", + SerializedName = @"localAuthRef", + PossibleTypes = new [] { typeof(string) })] + public string BucketLocalAuthRef { get => _fluxConfigurationPatchBody.BucketLocalAuthRef ?? null; set => _fluxConfigurationPatchBody.BucketLocalAuthRef = value; } + + /// The bucket name to sync from the url endpoint for the flux configuration. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The bucket name to sync from the url endpoint for the flux configuration.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The bucket name to sync from the url endpoint for the flux configuration.", + SerializedName = @"bucketName", + PossibleTypes = new [] { typeof(string) })] + public string BucketName { get => _fluxConfigurationPatchBody.BucketName ?? null; set => _fluxConfigurationPatchBody.BucketName = value; } + + /// + /// The interval at which to re-reconcile the cluster git repository source with the remote. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The interval at which to re-reconcile the cluster git repository source with the remote.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The interval at which to re-reconcile the cluster git repository source with the remote.", + SerializedName = @"syncIntervalInSeconds", + PossibleTypes = new [] { typeof(long) })] + public long BucketSyncIntervalInSecond { get => _fluxConfigurationPatchBody.BucketSyncIntervalInSecond ?? default(long); set => _fluxConfigurationPatchBody.BucketSyncIntervalInSecond = value; } + + /// + /// The maximum time to attempt to reconcile the cluster git repository source with the remote. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The maximum time to attempt to reconcile the cluster git repository source with the remote.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The maximum time to attempt to reconcile the cluster git repository source with the remote.", + SerializedName = @"timeoutInSeconds", + PossibleTypes = new [] { typeof(long) })] + public long BucketTimeoutInSecond { get => _fluxConfigurationPatchBody.BucketTimeoutInSecond ?? default(long); set => _fluxConfigurationPatchBody.BucketTimeoutInSecond = value; } + + /// The URL to sync for the flux configuration S3 bucket. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The URL to sync for the flux configuration S3 bucket.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The URL to sync for the flux configuration S3 bucket.", + SerializedName = @"url", + PossibleTypes = new [] { typeof(string) })] + public string BucketUrl { get => _fluxConfigurationPatchBody.BucketUrl ?? null; set => _fluxConfigurationPatchBody.BucketUrl = value; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.KubernetesConfiguration Client => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.ClientAPI; + + /// Backing field for property. + private string _clusterName; + + /// The name of the kubernetes cluster. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the kubernetes cluster.")] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the kubernetes cluster.", + SerializedName = @"clusterName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] + public string ClusterName { get => this._clusterName; set => this._clusterName = value; } + + /// Backing field for property. + private string _clusterRp; + + /// + /// The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService.")] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService.", + SerializedName = @"clusterRp", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] + public string ClusterRp { get => this._clusterRp; set => this._clusterRp = value; } + + /// Backing field for property. + private string _clusterType; + + /// + /// The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters.")] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters.", + SerializedName = @"clusterResourceName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] + public string ClusterType { get => this._clusterType; set => this._clusterType = value; } + + /// Key-value pairs of protected configuration settings for the configuration + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ExportAs(typeof(global::System.Collections.Hashtable))] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Key-value pairs of protected configuration settings for the configuration")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Key-value pairs of protected configuration settings for the configuration", + SerializedName = @"configurationProtectedSettings", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesConfigurationProtectedSettings) })] + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesConfigurationProtectedSettings ConfigurationProtectedSetting { get => _fluxConfigurationPatchBody.ConfigurationProtectedSetting ?? null /* object */; set => _fluxConfigurationPatchBody.ConfigurationProtectedSetting = 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.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// + /// Base64-encoded HTTPS certificate authority contents used to access git private git repositories over HTTPS + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Base64-encoded HTTPS certificate authority contents used to access git private git repositories over HTTPS")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Base64-encoded HTTPS certificate authority contents used to access git private git repositories over HTTPS", + SerializedName = @"httpsCACert", + PossibleTypes = new [] { typeof(string) })] + public string GitRepositoryHttpsCaCert { get => _fluxConfigurationPatchBody.GitRepositoryHttpsCaCert ?? null; set => _fluxConfigurationPatchBody.GitRepositoryHttpsCaCert = value; } + + /// Plaintext HTTPS username used to access private git repositories over HTTPS + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Plaintext HTTPS username used to access private git repositories over HTTPS")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Plaintext HTTPS username used to access private git repositories over HTTPS", + SerializedName = @"httpsUser", + PossibleTypes = new [] { typeof(string) })] + public string GitRepositoryHttpsUser { get => _fluxConfigurationPatchBody.GitRepositoryHttpsUser ?? null; set => _fluxConfigurationPatchBody.GitRepositoryHttpsUser = value; } + + /// + /// Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided + /// configuration secrets. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided configuration secrets.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided configuration secrets.", + SerializedName = @"localAuthRef", + PossibleTypes = new [] { typeof(string) })] + public string GitRepositoryLocalAuthRef { get => _fluxConfigurationPatchBody.GitRepositoryLocalAuthRef ?? null; set => _fluxConfigurationPatchBody.GitRepositoryLocalAuthRef = value; } + + /// + /// Base64-encoded known_hosts value containing public SSH keys required to access private git repositories over SSH + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Base64-encoded known_hosts value containing public SSH keys required to access private git repositories over SSH")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Base64-encoded known_hosts value containing public SSH keys required to access private git repositories over SSH", + SerializedName = @"sshKnownHosts", + PossibleTypes = new [] { typeof(string) })] + public string GitRepositorySshKnownHost { get => _fluxConfigurationPatchBody.GitRepositorySshKnownHost ?? null; set => _fluxConfigurationPatchBody.GitRepositorySshKnownHost = value; } + + /// + /// The interval at which to re-reconcile the cluster git repository source with the remote. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The interval at which to re-reconcile the cluster git repository source with the remote.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The interval at which to re-reconcile the cluster git repository source with the remote.", + SerializedName = @"syncIntervalInSeconds", + PossibleTypes = new [] { typeof(long) })] + public long GitRepositorySyncIntervalInSecond { get => _fluxConfigurationPatchBody.GitRepositorySyncIntervalInSecond ?? default(long); set => _fluxConfigurationPatchBody.GitRepositorySyncIntervalInSecond = value; } + + /// + /// The maximum time to attempt to reconcile the cluster git repository source with the remote. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The maximum time to attempt to reconcile the cluster git repository source with the remote.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The maximum time to attempt to reconcile the cluster git repository source with the remote.", + SerializedName = @"timeoutInSeconds", + PossibleTypes = new [] { typeof(long) })] + public long GitRepositoryTimeoutInSecond { get => _fluxConfigurationPatchBody.GitRepositoryTimeoutInSecond ?? default(long); set => _fluxConfigurationPatchBody.GitRepositoryTimeoutInSecond = value; } + + /// The URL to sync for the flux configuration git repository. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The URL to sync for the flux configuration git repository.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The URL to sync for the flux configuration git repository.", + SerializedName = @"url", + PossibleTypes = new [] { typeof(string) })] + public string GitRepositoryUrl { get => _fluxConfigurationPatchBody.GitRepositoryUrl ?? null; set => _fluxConfigurationPatchBody.GitRepositoryUrl = value; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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; } } + + /// + /// Array of kustomizations used to reconcile the artifact pulled by the source type on the cluster. + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ExportAs(typeof(global::System.Collections.Hashtable))] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Array of kustomizations used to reconcile the artifact pulled by the source type on the cluster.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Array of kustomizations used to reconcile the artifact pulled by the source type on the cluster.", + SerializedName = @"kustomizations", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesKustomizations) })] + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesKustomizations Kustomization { get => _fluxConfigurationPatchBody.Kustomization ?? null /* object */; set => _fluxConfigurationPatchBody.Kustomization = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// Name of the Flux Configuration. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Flux Configuration.")] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Flux Configuration.", + SerializedName = @"fluxConfigurationName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("FluxConfigurationName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// The git repository branch name to checkout. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The git repository branch name to checkout.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The git repository branch name to checkout.", + SerializedName = @"branch", + PossibleTypes = new [] { typeof(string) })] + public string RepositoryRefBranch { get => _fluxConfigurationPatchBody.RepositoryRefBranch ?? null; set => _fluxConfigurationPatchBody.RepositoryRefBranch = value; } + + /// + /// The commit SHA to checkout. This value must be combined with the branch name to be valid. This takes precedence over semver. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The commit SHA to checkout. This value must be combined with the branch name to be valid. This takes precedence over semver.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The commit SHA to checkout. This value must be combined with the branch name to be valid. This takes precedence over semver.", + SerializedName = @"commit", + PossibleTypes = new [] { typeof(string) })] + public string RepositoryRefCommit { get => _fluxConfigurationPatchBody.RepositoryRefCommit ?? null; set => _fluxConfigurationPatchBody.RepositoryRefCommit = value; } + + /// + /// The semver range used to match against git repository tags. This takes precedence over tag. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The semver range used to match against git repository tags. This takes precedence over tag.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The semver range used to match against git repository tags. This takes precedence over tag.", + SerializedName = @"semver", + PossibleTypes = new [] { typeof(string) })] + public string RepositoryRefSemver { get => _fluxConfigurationPatchBody.RepositoryRefSemver ?? null; set => _fluxConfigurationPatchBody.RepositoryRefSemver = value; } + + /// The git repository tag name to checkout. This takes precedence over branch. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The git repository tag name to checkout. This takes precedence over branch.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The git repository tag name to checkout. This takes precedence over branch.", + SerializedName = @"tag", + PossibleTypes = new [] { typeof(string) })] + public string RepositoryRefTag { get => _fluxConfigurationPatchBody.RepositoryRefTag ?? null; set => _fluxConfigurationPatchBody.RepositoryRefTag = value; } + + /// 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.KubernetesConfiguration.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.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Source Kind to pull the configuration data from. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Source Kind to pull the configuration data from.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Source Kind to pull the configuration data from.", + SerializedName = @"sourceKind", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType))] + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType SourceKind { get => _fluxConfigurationPatchBody.SourceKind ?? ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType)""); set => _fluxConfigurationPatchBody.SourceKind = 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.KubernetesConfiguration.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// Whether this configuration should suspend its reconciliation of its kustomizations and sources. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Whether this configuration should suspend its reconciliation of its kustomizations and sources.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Whether this configuration should suspend its reconciliation of its kustomizations and sources.", + SerializedName = @"suspend", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter Suspend { get => _fluxConfigurationPatchBody.Suspend ?? default(global::System.Management.Automation.SwitchParameter); set => _fluxConfigurationPatchBody.Suspend = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfiguration + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of UpdateAzKubernetesConfigurationFlux_UpdateExpanded + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Cmdlets.UpdateAzKubernetesConfigurationFlux_UpdateExpanded Clone() + { + var clone = new UpdateAzKubernetesConfigurationFlux_UpdateExpanded(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._fluxConfigurationPatchBody = this._fluxConfigurationPatchBody; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.ClusterRp = this.ClusterRp; + clone.ClusterType = this.ClusterType; + clone.ClusterName = this.ClusterName; + clone.Name = this.Name; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// 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.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'FluxConfigurationsUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.FluxConfigurationsUpdate(SubscriptionId, ResourceGroupName, ClusterRp, ClusterType, ClusterName, Name, _fluxConfigurationPatchBody, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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,ClusterRp=ClusterRp,ClusterType=ClusterType,ClusterName=ClusterName,Name=Name,body=_fluxConfigurationPatchBody}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public UpdateAzKubernetesConfigurationFlux_UpdateExpanded() + { + + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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, ClusterRp=ClusterRp, ClusterType=ClusterType, ClusterName=ClusterName, Name=Name, body=_fluxConfigurationPatchBody }) + { + 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, ClusterRp=ClusterRp, ClusterType=ClusterType, ClusterName=ClusterName, Name=Name, body=_fluxConfigurationPatchBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfiguration + /// 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.KubernetesConfiguration.Models.Api20220301.IFluxConfiguration + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/src/KubernetesConfiguration/generated/cmdlets/UpdateAzKubernetesConfigurationFlux_UpdateViaIdentityExpanded.cs b/src/KubernetesConfiguration/generated/cmdlets/UpdateAzKubernetesConfigurationFlux_UpdateViaIdentityExpanded.cs new file mode 100644 index 000000000000..532175350c33 --- /dev/null +++ b/src/KubernetesConfiguration/generated/cmdlets/UpdateAzKubernetesConfigurationFlux_UpdateViaIdentityExpanded.cs @@ -0,0 +1,741 @@ +// 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.KubernetesConfiguration.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Extensions; + using System; + + /// Update an existing Kubernetes Flux Configuration. + /// + /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/{fluxConfigurationName}" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzKubernetesConfigurationFlux_UpdateViaIdentityExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.Alias("Update-AzK8sConfigurationFlux")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfiguration))] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Description(@"Update an existing Kubernetes Flux Configuration.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Generated] + public partial class UpdateAzKubernetesConfigurationFlux_UpdateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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(); + + /// The Flux Configuration Patch Request object. + private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatch _fluxConfigurationPatchBody = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.FluxConfigurationPatch(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Plaintext access key used to securely access the S3 bucket + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Plaintext access key used to securely access the S3 bucket")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Plaintext access key used to securely access the S3 bucket", + SerializedName = @"accessKey", + PossibleTypes = new [] { typeof(System.Security.SecureString) })] + public System.Security.SecureString BucketAccessKey { get => _fluxConfigurationPatchBody.BucketAccessKey ?? null; set => _fluxConfigurationPatchBody.BucketAccessKey = value; } + + /// + /// Specify whether to use insecure communication when puling data from the S3 bucket. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Specify whether to use insecure communication when puling data from the S3 bucket.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Specify whether to use insecure communication when puling data from the S3 bucket.", + SerializedName = @"insecure", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter BucketInsecure { get => _fluxConfigurationPatchBody.BucketInsecure ?? default(global::System.Management.Automation.SwitchParameter); set => _fluxConfigurationPatchBody.BucketInsecure = value; } + + /// + /// Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided + /// configuration secrets. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided configuration secrets.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided configuration secrets.", + SerializedName = @"localAuthRef", + PossibleTypes = new [] { typeof(string) })] + public string BucketLocalAuthRef { get => _fluxConfigurationPatchBody.BucketLocalAuthRef ?? null; set => _fluxConfigurationPatchBody.BucketLocalAuthRef = value; } + + /// The bucket name to sync from the url endpoint for the flux configuration. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The bucket name to sync from the url endpoint for the flux configuration.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The bucket name to sync from the url endpoint for the flux configuration.", + SerializedName = @"bucketName", + PossibleTypes = new [] { typeof(string) })] + public string BucketName { get => _fluxConfigurationPatchBody.BucketName ?? null; set => _fluxConfigurationPatchBody.BucketName = value; } + + /// + /// The interval at which to re-reconcile the cluster git repository source with the remote. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The interval at which to re-reconcile the cluster git repository source with the remote.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The interval at which to re-reconcile the cluster git repository source with the remote.", + SerializedName = @"syncIntervalInSeconds", + PossibleTypes = new [] { typeof(long) })] + public long BucketSyncIntervalInSecond { get => _fluxConfigurationPatchBody.BucketSyncIntervalInSecond ?? default(long); set => _fluxConfigurationPatchBody.BucketSyncIntervalInSecond = value; } + + /// + /// The maximum time to attempt to reconcile the cluster git repository source with the remote. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The maximum time to attempt to reconcile the cluster git repository source with the remote.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The maximum time to attempt to reconcile the cluster git repository source with the remote.", + SerializedName = @"timeoutInSeconds", + PossibleTypes = new [] { typeof(long) })] + public long BucketTimeoutInSecond { get => _fluxConfigurationPatchBody.BucketTimeoutInSecond ?? default(long); set => _fluxConfigurationPatchBody.BucketTimeoutInSecond = value; } + + /// The URL to sync for the flux configuration S3 bucket. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The URL to sync for the flux configuration S3 bucket.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The URL to sync for the flux configuration S3 bucket.", + SerializedName = @"url", + PossibleTypes = new [] { typeof(string) })] + public string BucketUrl { get => _fluxConfigurationPatchBody.BucketUrl ?? null; set => _fluxConfigurationPatchBody.BucketUrl = value; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.KubernetesConfiguration Client => Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.ClientAPI; + + /// Key-value pairs of protected configuration settings for the configuration + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ExportAs(typeof(global::System.Collections.Hashtable))] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Key-value pairs of protected configuration settings for the configuration")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Key-value pairs of protected configuration settings for the configuration", + SerializedName = @"configurationProtectedSettings", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesConfigurationProtectedSettings) })] + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesConfigurationProtectedSettings ConfigurationProtectedSetting { get => _fluxConfigurationPatchBody.ConfigurationProtectedSetting ?? null /* object */; set => _fluxConfigurationPatchBody.ConfigurationProtectedSetting = 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.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// + /// Base64-encoded HTTPS certificate authority contents used to access git private git repositories over HTTPS + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Base64-encoded HTTPS certificate authority contents used to access git private git repositories over HTTPS")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Base64-encoded HTTPS certificate authority contents used to access git private git repositories over HTTPS", + SerializedName = @"httpsCACert", + PossibleTypes = new [] { typeof(string) })] + public string GitRepositoryHttpsCaCert { get => _fluxConfigurationPatchBody.GitRepositoryHttpsCaCert ?? null; set => _fluxConfigurationPatchBody.GitRepositoryHttpsCaCert = value; } + + /// Plaintext HTTPS username used to access private git repositories over HTTPS + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Plaintext HTTPS username used to access private git repositories over HTTPS")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Plaintext HTTPS username used to access private git repositories over HTTPS", + SerializedName = @"httpsUser", + PossibleTypes = new [] { typeof(string) })] + public string GitRepositoryHttpsUser { get => _fluxConfigurationPatchBody.GitRepositoryHttpsUser ?? null; set => _fluxConfigurationPatchBody.GitRepositoryHttpsUser = value; } + + /// + /// Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided + /// configuration secrets. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided configuration secrets.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided configuration secrets.", + SerializedName = @"localAuthRef", + PossibleTypes = new [] { typeof(string) })] + public string GitRepositoryLocalAuthRef { get => _fluxConfigurationPatchBody.GitRepositoryLocalAuthRef ?? null; set => _fluxConfigurationPatchBody.GitRepositoryLocalAuthRef = value; } + + /// + /// Base64-encoded known_hosts value containing public SSH keys required to access private git repositories over SSH + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Base64-encoded known_hosts value containing public SSH keys required to access private git repositories over SSH")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Base64-encoded known_hosts value containing public SSH keys required to access private git repositories over SSH", + SerializedName = @"sshKnownHosts", + PossibleTypes = new [] { typeof(string) })] + public string GitRepositorySshKnownHost { get => _fluxConfigurationPatchBody.GitRepositorySshKnownHost ?? null; set => _fluxConfigurationPatchBody.GitRepositorySshKnownHost = value; } + + /// + /// The interval at which to re-reconcile the cluster git repository source with the remote. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The interval at which to re-reconcile the cluster git repository source with the remote.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The interval at which to re-reconcile the cluster git repository source with the remote.", + SerializedName = @"syncIntervalInSeconds", + PossibleTypes = new [] { typeof(long) })] + public long GitRepositorySyncIntervalInSecond { get => _fluxConfigurationPatchBody.GitRepositorySyncIntervalInSecond ?? default(long); set => _fluxConfigurationPatchBody.GitRepositorySyncIntervalInSecond = value; } + + /// + /// The maximum time to attempt to reconcile the cluster git repository source with the remote. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The maximum time to attempt to reconcile the cluster git repository source with the remote.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The maximum time to attempt to reconcile the cluster git repository source with the remote.", + SerializedName = @"timeoutInSeconds", + PossibleTypes = new [] { typeof(long) })] + public long GitRepositoryTimeoutInSecond { get => _fluxConfigurationPatchBody.GitRepositoryTimeoutInSecond ?? default(long); set => _fluxConfigurationPatchBody.GitRepositoryTimeoutInSecond = value; } + + /// The URL to sync for the flux configuration git repository. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The URL to sync for the flux configuration git repository.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The URL to sync for the flux configuration git repository.", + SerializedName = @"url", + PossibleTypes = new [] { typeof(string) })] + public string GitRepositoryUrl { get => _fluxConfigurationPatchBody.GitRepositoryUrl ?? null; set => _fluxConfigurationPatchBody.GitRepositoryUrl = value; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentity 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; } } + + /// + /// Array of kustomizations used to reconcile the artifact pulled by the source type on the cluster. + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ExportAs(typeof(global::System.Collections.Hashtable))] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Array of kustomizations used to reconcile the artifact pulled by the source type on the cluster.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Array of kustomizations used to reconcile the artifact pulled by the source type on the cluster.", + SerializedName = @"kustomizations", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesKustomizations) })] + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesKustomizations Kustomization { get => _fluxConfigurationPatchBody.Kustomization ?? null /* object */; set => _fluxConfigurationPatchBody.Kustomization = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// The git repository branch name to checkout. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The git repository branch name to checkout.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The git repository branch name to checkout.", + SerializedName = @"branch", + PossibleTypes = new [] { typeof(string) })] + public string RepositoryRefBranch { get => _fluxConfigurationPatchBody.RepositoryRefBranch ?? null; set => _fluxConfigurationPatchBody.RepositoryRefBranch = value; } + + /// + /// The commit SHA to checkout. This value must be combined with the branch name to be valid. This takes precedence over semver. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The commit SHA to checkout. This value must be combined with the branch name to be valid. This takes precedence over semver.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The commit SHA to checkout. This value must be combined with the branch name to be valid. This takes precedence over semver.", + SerializedName = @"commit", + PossibleTypes = new [] { typeof(string) })] + public string RepositoryRefCommit { get => _fluxConfigurationPatchBody.RepositoryRefCommit ?? null; set => _fluxConfigurationPatchBody.RepositoryRefCommit = value; } + + /// + /// The semver range used to match against git repository tags. This takes precedence over tag. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The semver range used to match against git repository tags. This takes precedence over tag.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The semver range used to match against git repository tags. This takes precedence over tag.", + SerializedName = @"semver", + PossibleTypes = new [] { typeof(string) })] + public string RepositoryRefSemver { get => _fluxConfigurationPatchBody.RepositoryRefSemver ?? null; set => _fluxConfigurationPatchBody.RepositoryRefSemver = value; } + + /// The git repository tag name to checkout. This takes precedence over branch. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The git repository tag name to checkout. This takes precedence over branch.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The git repository tag name to checkout. This takes precedence over branch.", + SerializedName = @"tag", + PossibleTypes = new [] { typeof(string) })] + public string RepositoryRefTag { get => _fluxConfigurationPatchBody.RepositoryRefTag ?? null; set => _fluxConfigurationPatchBody.RepositoryRefTag = value; } + + /// Source Kind to pull the configuration data from. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Source Kind to pull the configuration data from.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Source Kind to pull the configuration data from.", + SerializedName = @"sourceKind", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType))] + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType SourceKind { get => _fluxConfigurationPatchBody.SourceKind ?? ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType)""); set => _fluxConfigurationPatchBody.SourceKind = value; } + + /// + /// Whether this configuration should suspend its reconciliation of its kustomizations and sources. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Whether this configuration should suspend its reconciliation of its kustomizations and sources.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Whether this configuration should suspend its reconciliation of its kustomizations and sources.", + SerializedName = @"suspend", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter Suspend { get => _fluxConfigurationPatchBody.Suspend ?? default(global::System.Management.Automation.SwitchParameter); set => _fluxConfigurationPatchBody.Suspend = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfiguration + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// + /// a duplicate instance of UpdateAzKubernetesConfigurationFlux_UpdateViaIdentityExpanded + /// + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Cmdlets.UpdateAzKubernetesConfigurationFlux_UpdateViaIdentityExpanded Clone() + { + var clone = new UpdateAzKubernetesConfigurationFlux_UpdateViaIdentityExpanded(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._fluxConfigurationPatchBody = this._fluxConfigurationPatchBody; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// 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.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'FluxConfigurationsUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.FluxConfigurationsUpdateViaIdentity(InputObject.Id, _fluxConfigurationPatchBody, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ClusterRp) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ClusterRp"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ClusterResourceName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ClusterResourceName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ClusterName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ClusterName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.FluxConfigurationName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.FluxConfigurationName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.FluxConfigurationsUpdate(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.ClusterRp ?? null, InputObject.ClusterResourceName ?? null, InputObject.ClusterName ?? null, InputObject.FluxConfigurationName ?? null, _fluxConfigurationPatchBody, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_fluxConfigurationPatchBody}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public UpdateAzKubernetesConfigurationFlux_UpdateViaIdentityExpanded() + { + + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_fluxConfigurationPatchBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_fluxConfigurationPatchBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfiguration + /// 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.KubernetesConfiguration.Models.Api20220301.IFluxConfiguration + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/src/KubernetesConfiguration/generated/cmdlets/UpdateAzKubernetesExtension_UpdateExpanded.cs b/src/KubernetesConfiguration/generated/cmdlets/UpdateAzKubernetesExtension_UpdateExpanded.cs index 637f337f8073..da90a82e1196 100644 --- a/src/KubernetesConfiguration/generated/cmdlets/UpdateAzKubernetesExtension_UpdateExpanded.cs +++ b/src/KubernetesConfiguration/generated/cmdlets/UpdateAzKubernetesExtension_UpdateExpanded.cs @@ -15,7 +15,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Cmdlets [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzKubernetesExtension_UpdateExpanded", SupportsShouldProcess = true)] [global::System.Management.Automation.Alias("Update-AzK8sExtension")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtension))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtension))] [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Description(@"Patch an existing Kubernetes Cluster Extension.")] [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Generated] public partial class UpdateAzKubernetesExtension_UpdateExpanded : global::System.Management.Automation.PSCmdlet, @@ -35,6 +35,9 @@ public partial class UpdateAzKubernetesExtension_UpdateExpanded : global::System /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// The Extension Patch Request object. + private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtension _patchExtensionBody = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.PatchExtension(); + /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] @@ -51,7 +54,7 @@ public partial class UpdateAzKubernetesExtension_UpdateExpanded : global::System Description = @"Flag to note if this extension participates in auto upgrade of minor version, or not.", SerializedName = @"autoUpgradeMinorVersion", PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] - public global::System.Management.Automation.SwitchParameter AutoUpgradeMinorVersion { get => PatchExtensionBody.AutoUpgradeMinorVersion ?? default(global::System.Management.Automation.SwitchParameter); set => PatchExtensionBody.AutoUpgradeMinorVersion = value; } + public global::System.Management.Automation.SwitchParameter AutoUpgradeMinorVersion { get => _patchExtensionBody.AutoUpgradeMinorVersion ?? default(global::System.Management.Automation.SwitchParameter); set => _patchExtensionBody.AutoUpgradeMinorVersion = value; } /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] @@ -79,14 +82,13 @@ public partial class UpdateAzKubernetesExtension_UpdateExpanded : global::System private string _clusterRp; /// - /// The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or Microsoft.Kubernetes (for OnPrem K8S - /// clusters). + /// The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. /// - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or Microsoft.Kubernetes (for OnPrem K8S clusters).")] + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService.")] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = true, ReadOnly = false, - Description = @"The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or Microsoft.Kubernetes (for OnPrem K8S clusters).", + Description = @"The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService.", SerializedName = @"clusterRp", PossibleTypes = new [] { typeof(string) })] [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] @@ -96,14 +98,13 @@ public partial class UpdateAzKubernetesExtension_UpdateExpanded : global::System private string _clusterType; /// - /// The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or connectedClusters (for OnPrem K8S - /// clusters). + /// The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. /// - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or connectedClusters (for OnPrem K8S clusters).")] + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters.")] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = true, ReadOnly = false, - Description = @"The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or connectedClusters (for OnPrem K8S clusters).", + Description = @"The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters.", SerializedName = @"clusterResourceName", PossibleTypes = new [] { typeof(string) })] [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Path)] @@ -120,8 +121,8 @@ public partial class UpdateAzKubernetesExtension_UpdateExpanded : global::System ReadOnly = false, Description = @"Configuration settings that are sensitive, as name-value pairs for configuring this extension.", SerializedName = @"configurationProtectedSettings", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtensionPropertiesConfigurationProtectedSettings) })] - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtensionPropertiesConfigurationProtectedSettings ConfigurationProtectedSetting { get => PatchExtensionBody.ConfigurationProtectedSetting ?? null /* object */; set => PatchExtensionBody.ConfigurationProtectedSetting = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtensionPropertiesConfigurationProtectedSettings) })] + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtensionPropertiesConfigurationProtectedSettings ConfigurationProtectedSetting { get => _patchExtensionBody.ConfigurationProtectedSetting ?? null /* object */; set => _patchExtensionBody.ConfigurationProtectedSetting = value; } /// Configuration settings, as name-value pairs for configuring this extension. [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ExportAs(typeof(global::System.Collections.Hashtable))] @@ -132,8 +133,8 @@ public partial class UpdateAzKubernetesExtension_UpdateExpanded : global::System ReadOnly = false, Description = @"Configuration settings, as name-value pairs for configuring this extension.", SerializedName = @"configurationSettings", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtensionPropertiesConfigurationSettings) })] - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtensionPropertiesConfigurationSettings ConfigurationSetting { get => PatchExtensionBody.ConfigurationSetting ?? null /* object */; set => PatchExtensionBody.ConfigurationSetting = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtensionPropertiesConfigurationSettings) })] + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtensionPropertiesConfigurationSettings ConfigurationSetting { get => _patchExtensionBody.ConfigurationSetting ?? null /* object */; set => _patchExtensionBody.ConfigurationSetting = value; } /// /// The credentials, account, tenant, and subscription used for communication with Azure @@ -160,11 +161,11 @@ public partial class UpdateAzKubernetesExtension_UpdateExpanded : global::System public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } /// - /// cancellation delegate. Stops the cmdlet when called. + /// cancellation delegate. Stops the cmdlet when called. /// global::System.Action Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - /// cancellation token. + /// cancellation token. global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener.Token => _cancellationTokenSource.Token; /// Backing field for property. @@ -190,12 +191,6 @@ public partial class UpdateAzKubernetesExtension_UpdateExpanded : global::System [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter NoWait { get; set; } - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtension _patchExtensionBody= new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.PatchExtension(); - - /// The Extension Patch Request object. - private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtension PatchExtensionBody { get => this._patchExtensionBody; set => this._patchExtensionBody = value; } - /// /// The instance of the that the remote call will use. /// @@ -229,7 +224,7 @@ public partial class UpdateAzKubernetesExtension_UpdateExpanded : global::System Description = @"ReleaseTrain this extension participates in for auto-upgrade (e.g. Stable, Preview, etc.) - only if autoUpgradeMinorVersion is 'true'.", SerializedName = @"releaseTrain", PossibleTypes = new [] { typeof(string) })] - public string ReleaseTrain { get => PatchExtensionBody.ReleaseTrain ?? null; set => PatchExtensionBody.ReleaseTrain = value; } + public string ReleaseTrain { get => _patchExtensionBody.ReleaseTrain ?? null; set => _patchExtensionBody.ReleaseTrain = value; } /// Backing field for property. private string _resourceGroupName; @@ -248,14 +243,12 @@ public partial class UpdateAzKubernetesExtension_UpdateExpanded : global::System /// Backing field for property. private string _subscriptionId; - /// - /// The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000) - /// - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000)")] + /// The ID of the target subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info( Required = true, ReadOnly = false, - Description = @"The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000)", + Description = @"The ID of the target subscription.", SerializedName = @"subscriptionId", PossibleTypes = new [] { typeof(string) })] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.DefaultInfo( @@ -277,49 +270,54 @@ public partial class UpdateAzKubernetesExtension_UpdateExpanded : global::System Description = @"Version of the extension for this extension, if it is 'pinned' to a specific version. autoUpgradeMinorVersion must be 'false'.", SerializedName = @"version", PossibleTypes = new [] { typeof(string) })] - public string Version { get => PatchExtensionBody.Version ?? null; set => PatchExtensionBody.Version = value; } + public string Version { get => _patchExtensionBody.Version ?? null; set => _patchExtensionBody.Version = value; } /// /// overrideOnConflict will be called before the regular onConflict 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 + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponse + /// from the remote call /// /// Determines if the rest of the onConflict method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnConflict(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnConflict(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponse + /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtension + /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) /// protected override void BeginProcessing() { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); if (Break) { @@ -345,7 +343,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Cmdlets.Update clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; clone.HttpPipelinePrepend = this.HttpPipelinePrepend; clone.HttpPipelineAppend = this.HttpPipelineAppend; - clone.PatchExtensionBody = this.PatchExtensionBody; + clone._patchExtensionBody = this._patchExtensionBody; clone.SubscriptionId = this.SubscriptionId; clone.ResourceGroupName = this.ResourceGroupName; clone.ClusterRp = this.ClusterRp; @@ -358,7 +356,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Cmdlets.Update /// Performs clean-up after the command execution protected override void EndProcessing() { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletEndProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } /// Handles/Dispatches events during the call to the REST service. @@ -491,7 +489,6 @@ protected override void ProcessRecord() { using( NoSynchronizationContext ) { - await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletProcessRecordAsyncStart); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } Pipeline = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); if (null != HttpPipelinePrepend) @@ -506,12 +503,12 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.ExtensionsUpdate(SubscriptionId, ResourceGroupName, ClusterRp, ClusterType, ClusterName, Name, PatchExtensionBody, onOk, onConflict, onDefault, this, Pipeline); + await this.Client.ExtensionsUpdate(SubscriptionId, ResourceGroupName, ClusterRp, ClusterType, ClusterName, Name, _patchExtensionBody, onOk, onConflict, onDefault, this, Pipeline); await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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,ClusterRp=ClusterRp,ClusterType=ClusterType,ClusterName=ClusterName,Name=Name,body=PatchExtensionBody}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,ClusterRp=ClusterRp,ClusterType=ClusterType,ClusterName=ClusterName,Name=Name,body=_patchExtensionBody}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -540,12 +537,12 @@ public UpdateAzKubernetesExtension_UpdateExpanded() /// a delegate that is called when the remote service returns 409 (Conflict). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponse + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onConflict(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onConflict(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -557,7 +554,7 @@ public UpdateAzKubernetesExtension_UpdateExpanded() return ; } // onConflict - response for 409 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponseAutoGenerated + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponse WriteObject((await response)); } } @@ -566,12 +563,12 @@ public UpdateAzKubernetesExtension_UpdateExpanded() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponse + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -588,15 +585,15 @@ public UpdateAzKubernetesExtension_UpdateExpanded() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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, ClusterRp=ClusterRp, ClusterType=ClusterType, ClusterName=ClusterName, Name=Name, body=PatchExtensionBody }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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, ClusterRp=ClusterRp, ClusterType=ClusterType, ClusterName=ClusterName, Name=Name, body=_patchExtensionBody }) { 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, ClusterRp=ClusterRp, ClusterType=ClusterType, ClusterName=ClusterName, Name=Name, body=PatchExtensionBody }) + 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, ClusterRp=ClusterRp, ClusterType=ClusterType, ClusterName=ClusterName, Name=Name, body=_patchExtensionBody }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -606,12 +603,12 @@ public UpdateAzKubernetesExtension_UpdateExpanded() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtension + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -623,7 +620,7 @@ public UpdateAzKubernetesExtension_UpdateExpanded() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtension + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtension WriteObject((await response)); } } diff --git a/src/KubernetesConfiguration/generated/cmdlets/UpdateAzKubernetesExtension_UpdateViaIdentityExpanded.cs b/src/KubernetesConfiguration/generated/cmdlets/UpdateAzKubernetesExtension_UpdateViaIdentityExpanded.cs index 231e2352c59f..92181f53a967 100644 --- a/src/KubernetesConfiguration/generated/cmdlets/UpdateAzKubernetesExtension_UpdateViaIdentityExpanded.cs +++ b/src/KubernetesConfiguration/generated/cmdlets/UpdateAzKubernetesExtension_UpdateViaIdentityExpanded.cs @@ -15,7 +15,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Cmdlets [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzKubernetesExtension_UpdateViaIdentityExpanded", SupportsShouldProcess = true)] [global::System.Management.Automation.Alias("Update-AzK8sExtension")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtension))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtension))] [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Description(@"Patch an existing Kubernetes Cluster Extension.")] [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Generated] public partial class UpdateAzKubernetesExtension_UpdateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, @@ -35,6 +35,9 @@ public partial class UpdateAzKubernetesExtension_UpdateViaIdentityExpanded : glo /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// The Extension Patch Request object. + private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtension _patchExtensionBody = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.PatchExtension(); + /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] @@ -51,7 +54,7 @@ public partial class UpdateAzKubernetesExtension_UpdateViaIdentityExpanded : glo Description = @"Flag to note if this extension participates in auto upgrade of minor version, or not.", SerializedName = @"autoUpgradeMinorVersion", PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] - public global::System.Management.Automation.SwitchParameter AutoUpgradeMinorVersion { get => PatchExtensionBody.AutoUpgradeMinorVersion ?? default(global::System.Management.Automation.SwitchParameter); set => PatchExtensionBody.AutoUpgradeMinorVersion = value; } + public global::System.Management.Automation.SwitchParameter AutoUpgradeMinorVersion { get => _patchExtensionBody.AutoUpgradeMinorVersion ?? default(global::System.Management.Automation.SwitchParameter); set => _patchExtensionBody.AutoUpgradeMinorVersion = value; } /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] @@ -72,8 +75,8 @@ public partial class UpdateAzKubernetesExtension_UpdateViaIdentityExpanded : glo ReadOnly = false, Description = @"Configuration settings that are sensitive, as name-value pairs for configuring this extension.", SerializedName = @"configurationProtectedSettings", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtensionPropertiesConfigurationProtectedSettings) })] - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtensionPropertiesConfigurationProtectedSettings ConfigurationProtectedSetting { get => PatchExtensionBody.ConfigurationProtectedSetting ?? null /* object */; set => PatchExtensionBody.ConfigurationProtectedSetting = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtensionPropertiesConfigurationProtectedSettings) })] + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtensionPropertiesConfigurationProtectedSettings ConfigurationProtectedSetting { get => _patchExtensionBody.ConfigurationProtectedSetting ?? null /* object */; set => _patchExtensionBody.ConfigurationProtectedSetting = value; } /// Configuration settings, as name-value pairs for configuring this extension. [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ExportAs(typeof(global::System.Collections.Hashtable))] @@ -84,8 +87,8 @@ public partial class UpdateAzKubernetesExtension_UpdateViaIdentityExpanded : glo ReadOnly = false, Description = @"Configuration settings, as name-value pairs for configuring this extension.", SerializedName = @"configurationSettings", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtensionPropertiesConfigurationSettings) })] - public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtensionPropertiesConfigurationSettings ConfigurationSetting { get => PatchExtensionBody.ConfigurationSetting ?? null /* object */; set => PatchExtensionBody.ConfigurationSetting = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtensionPropertiesConfigurationSettings) })] + public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtensionPropertiesConfigurationSettings ConfigurationSetting { get => _patchExtensionBody.ConfigurationSetting ?? null /* object */; set => _patchExtensionBody.ConfigurationSetting = value; } /// /// The credentials, account, tenant, and subscription used for communication with Azure @@ -120,11 +123,11 @@ public partial class UpdateAzKubernetesExtension_UpdateViaIdentityExpanded : glo public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } /// - /// cancellation delegate. Stops the cmdlet when called. + /// cancellation delegate. Stops the cmdlet when called. /// global::System.Action Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - /// cancellation token. + /// cancellation token. global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener.Token => _cancellationTokenSource.Token; /// @@ -135,12 +138,6 @@ public partial class UpdateAzKubernetesExtension_UpdateViaIdentityExpanded : glo [global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter NoWait { get; set; } - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtension _patchExtensionBody= new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.PatchExtension(); - - /// The Extension Patch Request object. - private Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtension PatchExtensionBody { get => this._patchExtensionBody; set => this._patchExtensionBody = value; } - /// /// The instance of the that the remote call will use. /// @@ -174,7 +171,7 @@ public partial class UpdateAzKubernetesExtension_UpdateViaIdentityExpanded : glo Description = @"ReleaseTrain this extension participates in for auto-upgrade (e.g. Stable, Preview, etc.) - only if autoUpgradeMinorVersion is 'true'.", SerializedName = @"releaseTrain", PossibleTypes = new [] { typeof(string) })] - public string ReleaseTrain { get => PatchExtensionBody.ReleaseTrain ?? null; set => PatchExtensionBody.ReleaseTrain = value; } + public string ReleaseTrain { get => _patchExtensionBody.ReleaseTrain ?? null; set => _patchExtensionBody.ReleaseTrain = value; } /// /// Version of the extension for this extension, if it is 'pinned' to a specific version. autoUpgradeMinorVersion must be @@ -188,49 +185,54 @@ public partial class UpdateAzKubernetesExtension_UpdateViaIdentityExpanded : glo Description = @"Version of the extension for this extension, if it is 'pinned' to a specific version. autoUpgradeMinorVersion must be 'false'.", SerializedName = @"version", PossibleTypes = new [] { typeof(string) })] - public string Version { get => PatchExtensionBody.Version ?? null; set => PatchExtensionBody.Version = value; } + public string Version { get => _patchExtensionBody.Version ?? null; set => _patchExtensionBody.Version = value; } /// /// overrideOnConflict will be called before the regular onConflict 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 + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponse + /// from the remote call /// /// Determines if the rest of the onConflict method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnConflict(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnConflict(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponse + /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtension + /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) /// protected override void BeginProcessing() { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); if (Break) { @@ -256,14 +258,14 @@ public Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Cmdlets.Update clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; clone.HttpPipelinePrepend = this.HttpPipelinePrepend; clone.HttpPipelineAppend = this.HttpPipelineAppend; - clone.PatchExtensionBody = this.PatchExtensionBody; + clone._patchExtensionBody = this._patchExtensionBody; return clone; } /// Performs clean-up after the command execution protected override void EndProcessing() { - ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletEndProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } /// Handles/Dispatches events during the call to the REST service. @@ -396,7 +398,6 @@ protected override void ProcessRecord() { using( NoSynchronizationContext ) { - await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletProcessRecordAsyncStart); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } Pipeline = Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); if (null != HttpPipelinePrepend) @@ -413,7 +414,7 @@ protected override void ProcessRecord() await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } if (InputObject?.Id != null) { - await this.Client.ExtensionsUpdateViaIdentity(InputObject.Id, PatchExtensionBody, onOk, onConflict, onDefault, this, Pipeline); + await this.Client.ExtensionsUpdateViaIdentity(InputObject.Id, _patchExtensionBody, onOk, onConflict, onDefault, this, Pipeline); } else { @@ -442,13 +443,13 @@ protected override void ProcessRecord() { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ExtensionName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); } - await this.Client.ExtensionsUpdate(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.ClusterRp ?? null, InputObject.ClusterResourceName ?? null, InputObject.ClusterName ?? null, InputObject.ExtensionName ?? null, PatchExtensionBody, onOk, onConflict, onDefault, this, Pipeline); + await this.Client.ExtensionsUpdate(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.ClusterRp ?? null, InputObject.ClusterResourceName ?? null, InputObject.ClusterName ?? null, InputObject.ExtensionName ?? null, _patchExtensionBody, onOk, onConflict, onDefault, this, Pipeline); } await ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=PatchExtensionBody}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_patchExtensionBody}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -477,12 +478,12 @@ public UpdateAzKubernetesExtension_UpdateViaIdentityExpanded() /// a delegate that is called when the remote service returns 409 (Conflict). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponse + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onConflict(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onConflict(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -494,7 +495,7 @@ public UpdateAzKubernetesExtension_UpdateViaIdentityExpanded() return ; } // onConflict - response for 409 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponseAutoGenerated + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponse WriteObject((await response)); } } @@ -503,12 +504,12 @@ public UpdateAzKubernetesExtension_UpdateViaIdentityExpanded() /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20.IErrorResponse + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -525,15 +526,15 @@ public UpdateAzKubernetesExtension_UpdateViaIdentityExpanded() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=PatchExtensionBody }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_patchExtensionBody }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=PatchExtensionBody }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_patchExtensionBody }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -543,12 +544,12 @@ public UpdateAzKubernetesExtension_UpdateViaIdentityExpanded() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtension + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -560,7 +561,7 @@ public UpdateAzKubernetesExtension_UpdateViaIdentityExpanded() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtension + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtension WriteObject((await response)); } } diff --git a/src/KubernetesConfiguration/generated/runtime/AsyncOperationResponse.cs b/src/KubernetesConfiguration/generated/runtime/AsyncOperationResponse.cs index f2341d21343a..210c95e9fc41 100644 --- a/src/KubernetesConfiguration/generated/runtime/AsyncOperationResponse.cs +++ b/src/KubernetesConfiguration/generated/runtime/AsyncOperationResponse.cs @@ -31,10 +31,10 @@ public static AsyncOperationResponse FromJson(Microsoft.Azure.PowerShell.Cmdlets /// - /// Creates a new instance of , deserializing the content from a json string. + /// Creates a new instance of , deserializing the content from a json string. /// /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. + /// an instance of the model class. public static AsyncOperationResponse FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Json.JsonNode.Parse(jsonText)); } @@ -43,19 +43,19 @@ public partial class AsyncOperationResponseTypeConverter : System.Management.Aut { /// - /// Determines if the converter can convert the parameter to the + /// 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 + /// 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 + /// Determines if the converter can convert the parameter to a type /// parameter. /// /// the instance to check if it can be converted to the - /// Determines if the parameter can be converted to the parameter + /// 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 + /// 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 + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -128,8 +128,7 @@ public static bool CanConvertFrom(dynamic sourceValue) 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 + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// diff --git a/src/KubernetesConfiguration/generated/runtime/BuildTime/Cmdlets/ExportPsd1.cs b/src/KubernetesConfiguration/generated/runtime/BuildTime/Cmdlets/ExportPsd1.cs index d1b0a5d83e5b..f1bc67544807 100644 --- a/src/KubernetesConfiguration/generated/runtime/BuildTime/Cmdlets/ExportPsd1.cs +++ b/src/KubernetesConfiguration/generated/runtime/BuildTime/Cmdlets/ExportPsd1.cs @@ -51,7 +51,7 @@ protected override void ProcessRecord() throw new ArgumentException($"Custom folder '{CustomFolder}' does not exist"); } - string version = Convert.ToString(@"0.1.0"); + string version = Convert.ToString(@"0.2.0"); // Validate the module version should be semantic version // Following regex is official from https://semver.org/ Regex rx = new Regex(@"^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$", RegexOptions.Compiled); diff --git a/src/KubernetesConfiguration/generated/runtime/BuildTime/Models/PsHelpMarkdownOutputs.cs b/src/KubernetesConfiguration/generated/runtime/BuildTime/Models/PsHelpMarkdownOutputs.cs index 1cd9c1159e36..ddd10af708fd 100644 --- a/src/KubernetesConfiguration/generated/runtime/BuildTime/Models/PsHelpMarkdownOutputs.cs +++ b/src/KubernetesConfiguration/generated/runtime/BuildTime/Models/PsHelpMarkdownOutputs.cs @@ -52,6 +52,17 @@ public override string ToString() internal class HelpExampleOutput { + private string ExampleTemplate = + "{0}{1}" + Environment.NewLine + + "{2}" + Environment.NewLine + "{3}" + Environment.NewLine + "{4}" + Environment.NewLine + Environment.NewLine + + "{5}" + Environment.NewLine + Environment.NewLine; + + private string ExampleTemplateWithOutput = + "{0}{1}" + Environment.NewLine + + "{2}" + Environment.NewLine + "{3}" + Environment.NewLine + "{4}" + Environment.NewLine + Environment.NewLine + + "{5}" + Environment.NewLine + "{6}" + Environment.NewLine + "{7}" + Environment.NewLine + Environment.NewLine + + "{8}" + Environment.NewLine + Environment.NewLine; + public MarkdownExampleHelpInfo ExampleInfo { get; } public HelpExampleOutput(MarkdownExampleHelpInfo exampleInfo) @@ -59,17 +70,26 @@ public HelpExampleOutput(MarkdownExampleHelpInfo exampleInfo) ExampleInfo = exampleInfo; } - public override string ToString() => $@"{ExampleNameHeader}{ExampleInfo.Name} -{ExampleCodeHeader} -{ExampleInfo.Code} -{ExampleCodeFooter} - -{ExampleInfo.Description.ToDescriptionFormat()} - -"; + public override string ToString() + { + if (string.IsNullOrEmpty(ExampleInfo.Output)) + { + return string.Format(ExampleTemplate, + ExampleNameHeader, ExampleInfo.Name, + ExampleCodeHeader, ExampleInfo.Code, ExampleCodeFooter, + ExampleInfo.Description.ToDescriptionFormat()); + } + else + { + return string.Format(ExampleTemplateWithOutput, + ExampleNameHeader, ExampleInfo.Name, + ExampleCodeHeader, ExampleInfo.Code, ExampleCodeFooter, + ExampleOutputHeader, ExampleInfo.Output, ExampleOutputFooter, + ExampleInfo.Description.ToDescriptionFormat()); ; + } + } } - - + internal class HelpParameterOutput { public MarkdownParameterHelpInfo ParameterInfo { get; } @@ -141,7 +161,7 @@ public ModulePageCmdletOutput(MarkdownHelpInfo helpInfo) } public override string ToString() => $@"### [{HelpInfo.CmdletName}]({HelpInfo.CmdletName}.md) -{HelpInfo.Description.ToDescriptionFormat()} +{HelpInfo.Synopsis.ToDescriptionFormat()} "; } @@ -161,6 +181,8 @@ public static string ToDescriptionFormat(this string text, bool escapeAngleBrack public const string ExampleNameHeader = "### "; public const string ExampleCodeHeader = "```powershell"; public const string ExampleCodeFooter = "```"; + public const string ExampleOutputHeader = "```output"; + public const string ExampleOutputFooter = "```"; public static HelpMetadataOutput ToHelpMetadataOutput(this MarkdownHelpInfo helpInfo) => new HelpMetadataOutput(helpInfo); diff --git a/src/KubernetesConfiguration/generated/runtime/BuildTime/Models/PsHelpTypes.cs b/src/KubernetesConfiguration/generated/runtime/BuildTime/Models/PsHelpTypes.cs index efc057f5414b..bcd8ebbc26e5 100644 --- a/src/KubernetesConfiguration/generated/runtime/BuildTime/Models/PsHelpTypes.cs +++ b/src/KubernetesConfiguration/generated/runtime/BuildTime/Models/PsHelpTypes.cs @@ -109,18 +109,21 @@ internal class PsHelpExampleInfo { public string Title { get; } public string Code { get; } + public string Output { get; } public string Remarks { get; } public PsHelpExampleInfo(PSObject exampleObject) { Title = exampleObject.GetProperty("title"); Code = exampleObject.GetProperty("code"); + Output = exampleObject.GetProperty("output"); Remarks = exampleObject.GetProperty("remarks").EmptyIfNull().ToDescriptionText(); } public PsHelpExampleInfo(MarkdownExampleHelpInfo markdownExample) { Title = markdownExample.Name; Code = markdownExample.Code; + Output = markdownExample.Output; Remarks = markdownExample.Description; } diff --git a/src/KubernetesConfiguration/generated/runtime/BuildTime/Models/PsMarkdownTypes.cs b/src/KubernetesConfiguration/generated/runtime/BuildTime/Models/PsMarkdownTypes.cs index 095ad67695d1..84b9e16f8207 100644 --- a/src/KubernetesConfiguration/generated/runtime/BuildTime/Models/PsMarkdownTypes.cs +++ b/src/KubernetesConfiguration/generated/runtime/BuildTime/Models/PsMarkdownTypes.cs @@ -39,7 +39,7 @@ internal class MarkdownHelpInfo public MarkdownHelpInfo(VariantGroup variantGroup, string examplesFolder, string externalHelpFilename = "") { ExternalHelpFilename = externalHelpFilename; - ModuleName = variantGroup.ModuleName; + ModuleName = variantGroup.RootModuleName != "" ? variantGroup.RootModuleName : variantGroup.ModuleName; var helpInfo = variantGroup.HelpInfo; var commentInfo = variantGroup.CommentInfo; Schema = Version.Parse("2.0.0"); @@ -91,12 +91,17 @@ private MarkdownExampleHelpInfo[] GetExamplesFromMarkdown(string examplesFolder) var code = codeStartIndex.HasValue && codeEndIndex.HasValue ? String.Join(Environment.NewLine, eg.Skip(codeStartIndex.Value + 1).Take(codeEndIndex.Value - (codeStartIndex.Value + 1))) : String.Empty; - var descriptionStartIndex = (codeEndIndex ?? 0) + 1; + var outputStartIndex = eg.Select((l, i) => l.StartsWith(ExampleOutputHeader) ? (int?)i : null).FirstOrDefault(i => i.HasValue); + var outputEndIndex = eg.Select((l, i) => l.StartsWith(ExampleOutputFooter) ? (int?)i : null).FirstOrDefault(i => i.HasValue && i > outputStartIndex); + var output = outputStartIndex.HasValue && outputEndIndex.HasValue + ? String.Join(Environment.NewLine, eg.Skip(outputStartIndex.Value + 1).Take(outputEndIndex.Value - (outputStartIndex.Value + 1))) + : String.Empty; + var descriptionStartIndex = (outputEndIndex ?? (codeEndIndex ?? 0)) + 1; descriptionStartIndex = String.IsNullOrWhiteSpace(eg[descriptionStartIndex]) ? descriptionStartIndex + 1 : descriptionStartIndex; var descriptionEndIndex = eg.Length - 1; descriptionEndIndex = String.IsNullOrWhiteSpace(eg[descriptionEndIndex]) ? descriptionEndIndex - 1 : descriptionEndIndex; var description = String.Join(Environment.NewLine, eg.Skip(descriptionStartIndex).Take((descriptionEndIndex + 1) - descriptionStartIndex)); - return new MarkdownExampleHelpInfo(name, code, description); + return new MarkdownExampleHelpInfo(name, code, output, description); }).ToArray(); } } @@ -154,12 +159,14 @@ internal class MarkdownExampleHelpInfo { public string Name { get; } public string Code { get; } + public string Output { get; } public string Description { get; } - public MarkdownExampleHelpInfo(string name, string code, string description) + public MarkdownExampleHelpInfo(string name, string code, string output, string description) { Name = name; Code = code; + Output = output; Description = description; } } @@ -213,12 +220,12 @@ public MarkdownParameterHelpInfo(PsParameterHelpInfo[] parameterHelpInfos, Param internal static class MarkdownTypesExtensions { - public static MarkdownExampleHelpInfo ToExampleHelpInfo(this PsHelpExampleInfo exampleInfo) => new MarkdownExampleHelpInfo(exampleInfo.Title, exampleInfo.Code, exampleInfo.Remarks); + public static MarkdownExampleHelpInfo ToExampleHelpInfo(this PsHelpExampleInfo exampleInfo) => new MarkdownExampleHelpInfo(exampleInfo.Title, exampleInfo.Code, exampleInfo.Output, exampleInfo.Remarks); public static MarkdownExampleHelpInfo[] DefaultExampleHelpInfos = { - new MarkdownExampleHelpInfo("Example 1: {{ Add title here }}", $@"PS C:\> {{{{ Add code here }}}}{Environment.NewLine}{Environment.NewLine}{{{{ Add output here }}}}", @"{{ Add description here }}"), - new MarkdownExampleHelpInfo("Example 2: {{ Add title here }}", $@"PS C:\> {{{{ Add code here }}}}{Environment.NewLine}{Environment.NewLine}{{{{ Add output here }}}}", @"{{ Add description here }}") + new MarkdownExampleHelpInfo("Example 1: {{ Add title here }}", $@"{{{{ Add code here }}}}", $@"{{{{ Add output here }}}}", @"{{ Add description here }}"), + new MarkdownExampleHelpInfo("Example 2: {{ Add title here }}", $@"{{{{ Add code here }}}}", $@"{{{{ Add output here }}}}", @"{{ Add description here }}"), }; public static MarkdownParameterHelpInfo[] SupportsShouldProcessParameters = diff --git a/src/KubernetesConfiguration/generated/runtime/BuildTime/Models/PsProxyOutputs.cs b/src/KubernetesConfiguration/generated/runtime/BuildTime/Models/PsProxyOutputs.cs index 2831a307ba7d..8e1e75698fdd 100644 --- a/src/KubernetesConfiguration/generated/runtime/BuildTime/Models/PsProxyOutputs.cs +++ b/src/KubernetesConfiguration/generated/runtime/BuildTime/Models/PsProxyOutputs.cs @@ -168,19 +168,56 @@ public ParameterNameOutput(string parameterName, bool isLast) public override string ToString() => $"{Indent}${{{ParameterName}}}{(IsLast ? String.Empty : $",{Environment.NewLine}")}{Environment.NewLine}"; } - internal class BeginOutput + internal class BaseOutput { public VariantGroup VariantGroup { get; } - public BeginOutput(VariantGroup variantGroup) + protected static readonly bool IsAzure = Convert.ToBoolean(@"true"); + public BaseOutput(VariantGroup variantGroup) { VariantGroup = variantGroup; } + public string ClearTelemetryContext() + { + return (!VariantGroup.IsInternal && IsAzure) ? $@"{Indent}{Indent}[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()" : ""; + } + } + + internal class BeginOutput : BaseOutput + { + public BeginOutput(VariantGroup variantGroup) : base(variantGroup) + { + } public string GetProcessCustomAttributesAtRuntime() { return VariantGroup.IsInternal ? "" : $@"{Indent}{Indent}$cmdInfo = Get-Command -Name $mapping[$parameterSet]{Environment.NewLine}{Indent}{Indent}[Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)"; } + private string GetTelemetry() + { + if (!VariantGroup.IsInternal && IsAzure) + { + return $@" +{Indent}{Indent}if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {{ +{Indent}{Indent}{Indent}[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() +{Indent}{Indent}}} +{Indent}{Indent}$preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId +{Indent}{Indent}if ($preTelemetryId -eq '') {{ +{Indent}{Indent}{Indent}[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() +{Indent}{Indent}{Indent}[Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) +{Indent}{Indent}}} else {{ +{Indent}{Indent}{Indent}$internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets +{Indent}{Indent}{Indent}if ($internalCalledCmdlets -eq '') {{ +{Indent}{Indent}{Indent}{Indent}[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name +{Indent}{Indent}{Indent}}} else {{ +{Indent}{Indent}{Indent}{Indent}[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name +{Indent}{Indent}{Indent}}} +{Indent}{Indent}{Indent}[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' +{Indent}{Indent}}} +"; + } + return ""; + } public override string ToString() => $@"begin {{ {Indent}try {{ {Indent}{Indent}$outBuffer = $null @@ -188,6 +225,7 @@ public override string ToString() => $@"begin {{ {Indent}{Indent}{Indent}$PSBoundParameters['OutBuffer'] = 1 {Indent}{Indent}}} {Indent}{Indent}$parameterSet = $PSCmdlet.ParameterSetName +{GetTelemetry()} {GetParameterSetToCmdletMapping()}{GetDefaultValuesStatements()} {GetProcessCustomAttributesAtRuntime()} {Indent}{Indent}$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) @@ -195,6 +233,7 @@ public override string ToString() => $@"begin {{ {Indent}{Indent}$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) {Indent}{Indent}$steppablePipeline.Begin($PSCmdlet) {Indent}}} catch {{ +{ClearTelemetryContext()} {Indent}{Indent}throw {Indent}}} }} @@ -231,28 +270,69 @@ private string GetDefaultValuesStatements() } } - internal class ProcessOutput + internal class ProcessOutput : BaseOutput { + public ProcessOutput(VariantGroup variantGroup) : base(variantGroup) + { + } + + private string GetFinally() + { + if (IsAzure && !VariantGroup.IsInternal) + { + return $@" +{Indent}finally {{ +{Indent}{Indent}$backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId +{Indent}{Indent}$backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets +{Indent}{Indent}[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() +{Indent}}} +"; + } + return ""; + } public override string ToString() => $@"process {{ {Indent}try {{ {Indent}{Indent}$steppablePipeline.Process($_) {Indent}}} catch {{ +{ClearTelemetryContext()} {Indent}{Indent}throw {Indent}}} +{GetFinally()} }} - "; } - internal class EndOutput + internal class EndOutput : BaseOutput { + public EndOutput(VariantGroup variantGroup) : base(variantGroup) + { + } + + private string GetTelemetry() + { + if (!VariantGroup.IsInternal && IsAzure) + { + return $@" +{Indent}{Indent}[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId +{Indent}{Indent}[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets +{Indent}{Indent}if ($preTelemetryId -eq '') {{ +{Indent}{Indent}{Indent}[Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) +{Indent}{Indent}{Indent}[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() +{Indent}{Indent}}} +{Indent}{Indent}[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId +"; + } + return ""; + } public override string ToString() => $@"end {{ {Indent}try {{ {Indent}{Indent}$steppablePipeline.End() +{GetTelemetry()} {Indent}}} catch {{ +{ClearTelemetryContext()} {Indent}{Indent}throw {Indent}}} -}} +}} "; } @@ -493,9 +573,9 @@ public static string ToSyntaxTypeName(this Type type) public static BeginOutput ToBeginOutput(this VariantGroup variantGroup) => new BeginOutput(variantGroup); - public static ProcessOutput ToProcessOutput(this VariantGroup variantGroup) => new ProcessOutput(); + public static ProcessOutput ToProcessOutput(this VariantGroup variantGroup) => new ProcessOutput(variantGroup); - public static EndOutput ToEndOutput(this VariantGroup variantGroup) => new EndOutput(); + public static EndOutput ToEndOutput(this VariantGroup variantGroup) => new EndOutput(variantGroup); public static HelpCommentOutput ToHelpCommentOutput(this VariantGroup variantGroup) => new HelpCommentOutput(variantGroup); diff --git a/src/KubernetesConfiguration/generated/runtime/BuildTime/Models/PsProxyTypes.cs b/src/KubernetesConfiguration/generated/runtime/BuildTime/Models/PsProxyTypes.cs index 972b35e19915..9e1f8f90d2f5 100644 --- a/src/KubernetesConfiguration/generated/runtime/BuildTime/Models/PsProxyTypes.cs +++ b/src/KubernetesConfiguration/generated/runtime/BuildTime/Models/PsProxyTypes.cs @@ -30,6 +30,8 @@ public ProfileGroup(Variant[] variants, string profileName = NoProfiles) internal class VariantGroup { public string ModuleName { get; } + + public string RootModuleName {get => @"";} public string CmdletName { get; } public string CmdletVerb { get; } public string CmdletNoun { get; } @@ -385,7 +387,9 @@ public CommentInfo(VariantGroup variantGroup) helpInfo.OutputTypes.Where(it => it.Name.NullIfWhiteSpace() != null).Select(ot => ot.Name).ToArray()) .Where(o => o != "None").Distinct().OrderBy(o => o).ToArray(); - OnlineVersion = helpInfo.OnlineVersion?.Uri.NullIfEmpty() ?? $@"{HelpLinkPrefix}{variantGroup.ModuleName.ToLowerInvariant()}/{variantGroup.CmdletName.ToLowerInvariant()}"; + // Use root module name in the help link + var moduleName = variantGroup.RootModuleName == "" ? variantGroup.ModuleName.ToLowerInvariant() : variantGroup.RootModuleName.ToLowerInvariant(); + OnlineVersion = helpInfo.OnlineVersion?.Uri.NullIfEmpty() ?? $@"{HelpLinkPrefix}{moduleName}/{variantGroup.CmdletName.ToLowerInvariant()}"; RelatedLinks = helpInfo.RelatedLinks.Select(rl => rl.Text).ToArray(); } } diff --git a/src/KubernetesConfiguration/generated/runtime/Customizations/IJsonSerializable.cs b/src/KubernetesConfiguration/generated/runtime/Customizations/IJsonSerializable.cs index 7d656ba8937f..6696dadde523 100644 --- a/src/KubernetesConfiguration/generated/runtime/Customizations/IJsonSerializable.cs +++ b/src/KubernetesConfiguration/generated/runtime/Customizations/IJsonSerializable.cs @@ -75,12 +75,18 @@ private static JsonNode ToJsonValue(ValueType vValue) return new JsonBoolean(bValue); } - // dates + // dates if (vValue is DateTime dtValue) { return new JsonDate(dtValue); } + // DictionaryEntity struct type + if (vValue is System.Collections.DictionaryEntry deValue) + { + return new JsonObject { { deValue.Key.ToString(), ToJsonValue(deValue.Value) } }; + } + // sorry, no idea. return null; } @@ -113,7 +119,7 @@ private static JsonNode TryToJsonValue(dynamic oValue) // if we got something out, let's use it. if (null != jsonValue) { - // JsonNumber is really a literal json value. Just don't try to cast that back to an actual number, ok? + // JsonNumber is really a literal json value. Just don't try to cast that back to an actual number, ok? return new JsonNumber(jsonValue.ToString()); } @@ -123,11 +129,11 @@ private static JsonNode TryToJsonValue(dynamic oValue) /// /// Serialize an object by using a variety of methods. /// - /// the object to be serialized. + /// the object to be serialized. /// the serialized JsonNode (if successful), otherwise, null internal static JsonNode ToJsonValue(object value) { - // things that implement our interface are preferred. + // things that implement our interface are preferred. if (value is Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.IJsonSerializable jsonSerializable) { return jsonSerializable.ToJson(); @@ -139,7 +145,7 @@ internal static JsonNode ToJsonValue(object value) return new JsonString(value.ToString()); } - // value types are fairly straightforward (fallback to ToJson()/ToJsonString() or literal JsonString ) + // value types are fairly straightforward (fallback to ToJson()/ToJsonString() or literal JsonString ) if (value is System.ValueType vValue) { return ToJsonValue(vValue) ?? TryToJsonValue(vValue) ?? new JsonString(vValue.ToString()); @@ -159,7 +165,7 @@ internal static JsonNode ToJsonValue(object value) return Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.JsonSerializable.ToJson(dict, null); } - // enumerable collections are handled like arrays (again, fallback to ToJson()/ToJsonString() or literal JsonString) + // enumerable collections are handled like arrays (again, fallback to ToJson()/ToJsonString() or literal JsonString) if (value is System.Collections.IEnumerable enumerableValue) { // some kind of enumerable value @@ -185,7 +191,7 @@ internal static JsonObject ToJson(System.Collections.Generic.IDictionary /// PowerShell-specific data on top of the llc# EventData /// @@ -16,6 +15,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime /// Obviously, this code would need to be duplcated on both modules. /// This is preferable to sharing a common library, as versioning makes that problematic. /// + [System.ComponentModel.TypeConverter(typeof(EventDataConverter))] public partial class EventData : EventArgs { } diff --git a/src/KubernetesConfiguration/generated/runtime/ISendAsync.cs b/src/KubernetesConfiguration/generated/runtime/ISendAsync.cs index 3d3d10c59c62..f6ea1c5fb353 100644 --- a/src/KubernetesConfiguration/generated/runtime/ISendAsync.cs +++ b/src/KubernetesConfiguration/generated/runtime/ISendAsync.cs @@ -238,6 +238,8 @@ internal static Task CloneWithContentAndDispose(this HttpReq /// Clones an HttpRequestMessage (without the content) /// /// Original HttpRequestMessage (Will be diposed before returning) + /// + /// /// A clone of the HttpRequestMessage internal static HttpRequestMessage Clone(this HttpRequestMessage original, System.Uri requestUri = null, System.Net.Http.HttpMethod method = null) { @@ -252,9 +254,9 @@ internal static HttpRequestMessage Clone(this HttpRequestMessage original, Syste { clone.Properties.Add(prop); } - + foreach (KeyValuePair> header in original.Headers) - { + { /* **temporarily skip cloning telemetry related headers** clone.Headers.TryAddWithoutValidation(header.Key, header.Value); @@ -264,7 +266,7 @@ internal static HttpRequestMessage Clone(this HttpRequestMessage original, Syste clone.Headers.TryAddWithoutValidation(header.Key, header.Value); } } - + return clone; } @@ -272,6 +274,8 @@ internal static HttpRequestMessage Clone(this HttpRequestMessage original, Syste /// Clones an HttpRequestMessage (including the content stream and content headers) /// /// Original HttpRequestMessage (Will be diposed before returning) + /// + /// /// A clone of the HttpRequestMessage internal static async Task CloneWithContent(this HttpRequestMessage original, System.Uri requestUri = null, System.Net.Http.HttpMethod method = null) { diff --git a/src/KubernetesConfiguration/generated/runtime/MessageAttribute.cs b/src/KubernetesConfiguration/generated/runtime/MessageAttribute.cs index 75f3fece6884..60a8e784d54e 100644 --- a/src/KubernetesConfiguration/generated/runtime/MessageAttribute.cs +++ b/src/KubernetesConfiguration/generated/runtime/MessageAttribute.cs @@ -276,7 +276,7 @@ protected override string GetAttributeSpecificMessage() /// then the attribbute is applicable /// If the invocationInfo is null we return true /// - /// + /// /// bool public override bool IsApplicableToInvocation(InvocationInfo invocationInfo) { diff --git a/src/KubernetesConfiguration/generated/runtime/TypeConverterExtensions.cs b/src/KubernetesConfiguration/generated/runtime/TypeConverterExtensions.cs index a064f1b1d960..179f7b497c77 100644 --- a/src/KubernetesConfiguration/generated/runtime/TypeConverterExtensions.cs +++ b/src/KubernetesConfiguration/generated/runtime/TypeConverterExtensions.cs @@ -32,10 +32,10 @@ internal static T[] SelectToArray(object source, System.Func System.Console.Error.WriteLine($"{E.GetType().Name}/{E.Message}/{E.StackTrace}"); } #else - catch + catch { // silent conversion fail - } + } #endif return new T[0]; // empty result if couldn't convert. } @@ -53,10 +53,10 @@ internal static T[] SelectToArray(object source, System.Func System.Console.Error.WriteLine($"{E.GetType().Name}/{E.Message}/{E.StackTrace}"); } #else - catch + catch { // silent conversion fail - } + } #endif } return result.ToArray(); @@ -141,9 +141,9 @@ internal static T GetValueForProperty(this System.Collections.Generic.I System.Console.Error.WriteLine($"{E.GetType().Name}/{E.Message}/{E.StackTrace}"); } #else - catch + catch { - } + } #endif return defaultValue; } @@ -160,9 +160,9 @@ internal static T GetValueForProperty(this System.Collections.IDictionary dic System.Console.Error.WriteLine($"{E.GetType().Name}/{E.Message}/{E.StackTrace}"); } #else - catch + catch { - } + } #endif return defaultValue; } @@ -180,11 +180,32 @@ internal static T GetValueForProperty(this System.Management.Automation.PSObj System.Console.Error.WriteLine($"{E.GetType().Name}/{E.Message}/{E.StackTrace}"); } #else - catch + catch { - } + } #endif return defaultValue; } + + internal static bool Contains(this System.Management.Automation.PSObject psObject, string propertyName) + { + bool result = false; + try + { + var property = System.Linq.Enumerable.FirstOrDefault(psObject.Properties, each => System.String.Equals(each.Name.ToString(), propertyName, System.StringComparison.CurrentCultureIgnoreCase)); + result = property == null ? false : true; + } +#if DEBUG + catch (System.Exception E) + { + System.Console.Error.WriteLine($"{E.GetType().Name}/{E.Message}/{E.StackTrace}"); + } +#else + catch + { + } +#endif + return result; + } } } diff --git a/src/KubernetesConfiguration/generated/runtime/UndeclaredResponseException.cs b/src/KubernetesConfiguration/generated/runtime/UndeclaredResponseException.cs index a0fa521bfa44..0da8ffd9e8e1 100644 --- a/src/KubernetesConfiguration/generated/runtime/UndeclaredResponseException.cs +++ b/src/KubernetesConfiguration/generated/runtime/UndeclaredResponseException.cs @@ -63,7 +63,10 @@ public RestException(System.Net.Http.HttpResponseMessage response) catch { // couldn't get the code/message from the body response. - // we'll create one below. + // In this case, we will assume the response is the expected error message + if(!string.IsNullOrEmpty(ResponseBody)) { + message = ResponseBody; + } } #endif if (string.IsNullOrEmpty(message)) diff --git a/src/KubernetesConfiguration/help/Az.KubernetesConfiguration.md b/src/KubernetesConfiguration/help/Az.KubernetesConfiguration.md index d629f4a2885d..775e69ffd347 100644 --- a/src/KubernetesConfiguration/help/Az.KubernetesConfiguration.md +++ b/src/KubernetesConfiguration/help/Az.KubernetesConfiguration.md @@ -11,25 +11,40 @@ Locale: en-US Microsoft Azure PowerShell: KubernetesConfiguration cmdlets ## Az.KubernetesConfiguration Cmdlets +### [Get-AzKubernetesConfigFluxOperationStatus](Get-AzKubernetesConfigFluxOperationStatus.md) +Get Async Operation status + ### [Get-AzKubernetesConfiguration](Get-AzKubernetesConfiguration.md) Gets details of the Source Control Configuration. +### [Get-AzKubernetesConfigurationFlux](Get-AzKubernetesConfigurationFlux.md) +Gets details of the Flux Configuration. + ### [Get-AzKubernetesExtension](Get-AzKubernetesExtension.md) Gets Kubernetes Cluster Extension. ### [New-AzKubernetesConfiguration](New-AzKubernetesConfiguration.md) Create a new Kubernetes Source Control Configuration. +### [New-AzKubernetesConfigurationFlux](New-AzKubernetesConfigurationFlux.md) +Create a new Kubernetes Flux Configuration. + ### [New-AzKubernetesExtension](New-AzKubernetesExtension.md) Create a new Kubernetes Cluster Extension. ### [Remove-AzKubernetesConfiguration](Remove-AzKubernetesConfiguration.md) This will delete the YAML file used to set up the Source control configuration, thus stopping future sync from the source repo. +### [Remove-AzKubernetesConfigurationFlux](Remove-AzKubernetesConfigurationFlux.md) +This will delete the YAML file used to set up the Flux Configuration, thus stopping future sync from the source repo. + ### [Remove-AzKubernetesExtension](Remove-AzKubernetesExtension.md) Delete a Kubernetes Cluster Extension. This will cause the Agent to Uninstall the extension from the cluster. +### [Update-AzKubernetesConfigurationFlux](Update-AzKubernetesConfigurationFlux.md) +Update an existing Kubernetes Flux Configuration. + ### [Update-AzKubernetesExtension](Update-AzKubernetesExtension.md) Patch an existing Kubernetes Cluster Extension. diff --git a/src/KubernetesConfiguration/help/Get-AzKubernetesConfigFluxOperationStatus.md b/src/KubernetesConfiguration/help/Get-AzKubernetesConfigFluxOperationStatus.md new file mode 100644 index 000000000000..5fde701864e0 --- /dev/null +++ b/src/KubernetesConfiguration/help/Get-AzKubernetesConfigFluxOperationStatus.md @@ -0,0 +1,204 @@ +--- +external help file: +Module Name: Az.KubernetesConfiguration +online version: https://docs.microsoft.com/powershell/module/az.kubernetesconfiguration/get-azkubernetesconfigfluxoperationstatus +schema: 2.0.0 +--- + +# Get-AzKubernetesConfigFluxOperationStatus + +## SYNOPSIS +Get Async Operation status + +## SYNTAX + +### Get (Default) +``` +Get-AzKubernetesConfigFluxOperationStatus -ClusterName -ClusterType + -FluxConfigurationName -OperationId -ResourceGroupName + [-SubscriptionId ] [-DefaultProfile ] [] +``` + +### GetViaIdentity +``` +Get-AzKubernetesConfigFluxOperationStatus -InputObject + [-DefaultProfile ] [] +``` + +## DESCRIPTION +Get Async Operation status + +## EXAMPLES + +### Example 1: Get Async Operation status +```powershell +PS C:\> Get-AzKubernetesConfigFluxOperationStatus -ClusterName azpstest_cluster_arc -ClusterType ConnectedClusters -FluxConfigurationName azpstestflux-k8s -ResourceGroupName azpstest_gp -OperationId e9871335-7ba8-4100-8cb4-73b3464eb863 + +Name ResourceGroupName Status +---- ----------------- ------ +e9871335-7ba8-4100-8cb4-73b3464eb863 azpstest_gp Succeeded +``` + +Get Async Operation status + +## PARAMETERS + +### -ClusterName +The name of the kubernetes cluster. + +```yaml +Type: System.String +Parameter Sets: Get +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ClusterType +The Kubernetes cluster resource name - i.e. +managedClusters, connectedClusters, provisionedClusters. + +```yaml +Type: System.String +Parameter Sets: Get +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The credentials, account, tenant, and subscription used for communication with Azure. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -FluxConfigurationName +Name of the Flux Configuration. + +```yaml +Type: System.String +Parameter Sets: Get +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentity +Parameter Sets: GetViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -OperationId +operation Id + +```yaml +Type: System.String +Parameter Sets: Get +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: Get +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. + +```yaml +Type: System.String[] +Parameter Sets: Get +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResult + +## NOTES + +ALIASES + +Get-AzK8sConfigFluxOperationStatus + +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. + - `[ClusterResourceName ]`: The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. + - `[ClusterRp ]`: The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. + - `[ExtensionName ]`: Name of the Extension. + - `[FluxConfigurationName ]`: Name of the Flux Configuration. + - `[Id ]`: Resource identity path + - `[OperationId ]`: operation Id + - `[ResourceGroupName ]`: The name of the resource group. The name is case insensitive. + - `[SourceControlConfigurationName ]`: Name of the Source Control Configuration. + - `[SubscriptionId ]`: The ID of the target subscription. + +## RELATED LINKS + diff --git a/src/KubernetesConfiguration/help/Get-AzKubernetesConfiguration.md b/src/KubernetesConfiguration/help/Get-AzKubernetesConfiguration.md index cf36df6fd2f7..1e5fe03d6b0d 100644 --- a/src/KubernetesConfiguration/help/Get-AzKubernetesConfiguration.md +++ b/src/KubernetesConfiguration/help/Get-AzKubernetesConfiguration.md @@ -37,27 +37,23 @@ Gets details of the Source Control Configuration. ### Example 1: List details of the Source Control Configuration. ```powershell -Get-AzKubernetesConfiguration -ResourceGroupName azps_test_group -ClusterName azps_test_cluster -ClusterType ConnectedClusters -``` +PS C:\> Get-AzKubernetesConfiguration -ResourceGroupName azpstest_gp -ClusterName azpstest_cluster_arc -ClusterType ConnectedClusters -```output -Name Type ----- ---- -azpstestk8s01 Microsoft.KubernetesConfiguration/sourceControlConfigurations -azpstestk8s02 Microsoft.KubernetesConfiguration/sourceControlConfigurations +Name RepositoryUrl ResourceGroupName +---- ------------- ----------------- +azpstestk8s http://github.com/xxxx azpstest_gp +azpstestk8s-operator http://github.com/xxxx azpstest_gp ``` List details of the Source Control Configuration. ### Example 2: Gets details of the Source Control Configuration. ```powershell -Get-AzKubernetesConfiguration -ResourceGroupName azps_test_group -ClusterName azps_test_cluster -ClusterType ConnectedClusters -Name azpstestk8s01 -``` +PS C:\> Get-AzKubernetesConfiguration -ResourceGroupName azpstest_gp -ClusterName azpstest_cluster_arc -ClusterType ConnectedClusters -Name azpstestk8s -```output -Name Type ----- ---- -azpstestk8s01 Microsoft.KubernetesConfiguration/sourceControlConfigurations +Name RepositoryUrl ResourceGroupName +---- ------------- ----------------- +azpstestk8s http://github.com/xxxx azpstest_gp ``` Gets details of the Source Control Configuration. @@ -80,7 +76,8 @@ Accept wildcard characters: False ``` ### -ClusterType -The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or connectedClusters (for OnPrem K8S clusters). +The Kubernetes cluster resource name - i.e. +managedClusters, connectedClusters, provisionedClusters. ```yaml Type: System.String @@ -142,6 +139,7 @@ Accept wildcard characters: False ### -ResourceGroupName The name of the resource group. +The name is case insensitive. ```yaml Type: System.String @@ -156,9 +154,7 @@ Accept wildcard characters: False ``` ### -SubscriptionId -The Azure subscription ID. -This is a GUID-formatted string (e.g. -00000000-0000-0000-0000-000000000000) +The ID of the target subscription. ```yaml Type: System.String[] @@ -181,7 +177,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfiguration +### Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfiguration ## NOTES @@ -196,14 +192,15 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter - `[ClusterName ]`: The name of the kubernetes cluster. - - `[ClusterResourceName ]`: The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or connectedClusters (for OnPrem K8S clusters). - - `[ClusterRp ]`: The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or Microsoft.Kubernetes (for OnPrem K8S clusters). + - `[ClusterResourceName ]`: The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. + - `[ClusterRp ]`: The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. - `[ExtensionName ]`: Name of the Extension. + - `[FluxConfigurationName ]`: Name of the Flux Configuration. - `[Id ]`: Resource identity path - `[OperationId ]`: operation Id - - `[ResourceGroupName ]`: The name of the resource group. + - `[ResourceGroupName ]`: The name of the resource group. The name is case insensitive. - `[SourceControlConfigurationName ]`: Name of the Source Control Configuration. - - `[SubscriptionId ]`: The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000) + - `[SubscriptionId ]`: The ID of the target subscription. ## RELATED LINKS diff --git a/src/KubernetesConfiguration/help/Get-AzKubernetesConfigurationFlux.md b/src/KubernetesConfiguration/help/Get-AzKubernetesConfigurationFlux.md new file mode 100644 index 000000000000..8df6ba2ed760 --- /dev/null +++ b/src/KubernetesConfiguration/help/Get-AzKubernetesConfigurationFlux.md @@ -0,0 +1,205 @@ +--- +external help file: +Module Name: Az.KubernetesConfiguration +online version: https://docs.microsoft.com/powershell/module/az.kubernetesconfiguration/get-azkubernetesconfigurationflux +schema: 2.0.0 +--- + +# Get-AzKubernetesConfigurationFlux + +## SYNOPSIS +Gets details of the Flux Configuration. + +## SYNTAX + +### List (Default) +``` +Get-AzKubernetesConfigurationFlux -ClusterName -ClusterType -ResourceGroupName + [-SubscriptionId ] [-DefaultProfile ] [] +``` + +### Get +``` +Get-AzKubernetesConfigurationFlux -ClusterName -ClusterType -Name + -ResourceGroupName [-SubscriptionId ] [-DefaultProfile ] [] +``` + +### GetViaIdentity +``` +Get-AzKubernetesConfigurationFlux -InputObject [-DefaultProfile ] + [] +``` + +## DESCRIPTION +Gets details of the Flux Configuration. + +## EXAMPLES + +### Example 1: List details of the Flux Configuration. +```powershell +PS C:\> Get-AzKubernetesConfigurationFlux -ClusterName azpstest_cluster_arc -ClusterType ConnectedClusters -ResourceGroupName azpstest_gp + +Name ResourceGroupName +---- ----------------- +azpstestflux-k8s azpstest_gp +``` + +List details of the Flux Configuration. + +### Example 2: Gets details of the Flux Configuration. +```powershell +PS C:\> Get-AzKubernetesConfigurationFlux -ClusterName azpstest_cluster_arc -ClusterType ConnectedClusters -Name azpstestflux-k8s -ResourceGroupName azpstest_gp + +Name ResourceGroupName +---- ----------------- +azpstestflux-k8s azpstest_gp +``` + +Gets details of the Flux Configuration. + +## PARAMETERS + +### -ClusterName +The name of the kubernetes cluster. + +```yaml +Type: System.String +Parameter Sets: Get, List +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ClusterType +The Kubernetes cluster resource name - i.e. +managedClusters, connectedClusters, provisionedClusters. + +```yaml +Type: System.String +Parameter Sets: Get, List +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The credentials, account, tenant, and subscription used for communication with Azure. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentity +Parameter Sets: GetViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Name +Name of the Flux Configuration. + +```yaml +Type: System.String +Parameter Sets: Get +Aliases: FluxConfigurationName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: Get, List +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. + +```yaml +Type: System.String[] +Parameter Sets: Get, List +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfiguration + +## NOTES + +ALIASES + +Get-AzK8sConfigurationFlux + +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. + - `[ClusterResourceName ]`: The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. + - `[ClusterRp ]`: The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. + - `[ExtensionName ]`: Name of the Extension. + - `[FluxConfigurationName ]`: Name of the Flux Configuration. + - `[Id ]`: Resource identity path + - `[OperationId ]`: operation Id + - `[ResourceGroupName ]`: The name of the resource group. The name is case insensitive. + - `[SourceControlConfigurationName ]`: Name of the Source Control Configuration. + - `[SubscriptionId ]`: The ID of the target subscription. + +## RELATED LINKS + diff --git a/src/KubernetesConfiguration/help/Get-AzKubernetesExtension.md b/src/KubernetesConfiguration/help/Get-AzKubernetesExtension.md index 05d0b4715f0d..6a623eb92a84 100644 --- a/src/KubernetesConfiguration/help/Get-AzKubernetesExtension.md +++ b/src/KubernetesConfiguration/help/Get-AzKubernetesExtension.md @@ -37,26 +37,23 @@ Gets Kubernetes Cluster Extension. ### Example 1: Gets Kubernetes Cluster Extension. ```powershell -Get-AzKubernetesExtension -ClusterName azps_test_cluster -ClusterType ConnectedClusters -Name azps_test_extension -ResourceGroupName azps_test_group -``` +PS C:\> Get-AzKubernetesExtension -ClusterName azpstest_cluster_arc -ClusterType ConnectedClusters -Name azpstest-extension -ResourceGroupName azpstest_gp -```output -Name ExtensionType Version ProvisioningState AutoUpgradeMinorVersion ReleaseTrain ResourceGroupName ----- ------------- ------- ----------------- ----------------------- ------------ ----------------- -azps_test_extension microsoft.arcdataservices 1.0.16701001 Succeeded True Stable azps_test_group +Name ExtensionType Version ProvisioningState AutoUpgradeMinorVersion ReleaseTrain +---- ------------- ------- ----------------- ----------------------- ------------ +azpstest-extension azuremonitor-containers 2.9.2 Succeeded True Stable ``` Gets Kubernetes Cluster Extension. ### Example 2: List Kubernetes Cluster Extension. ```powershell -Get-AzKubernetesExtension -ClusterName azps_test_cluster -ClusterType ConnectedClusters -ResourceGroupName azps_test_group -``` +PS C:\> Get-AzKubernetesExtension -ClusterName azpstest_cluster_arc -ClusterType ConnectedClusters -ResourceGroupName azpstest_gp -```output -Name ExtensionType Version ProvisioningState AutoUpgradeMinorVersion ReleaseTrain ResourceGroupName ----- ------------- ------- ----------------- ----------------------- ------------ ----------------- -azps_test_extension microsoft.arcdataservices 1.0.16701001 Succeeded True Stable azps_test_group +Name ExtensionType Version ProvisioningState AutoUpgradeMinorVersion ReleaseTrain +---- ------------- ------- ----------------- ----------------------- ------------ +azpstest-extension azuremonitor-containers 2.9.2 Succeeded True Stable +flux microsoft.flux 1.0.0 Succeeded True Stable ``` List Kubernetes Cluster Extension. @@ -79,7 +76,8 @@ Accept wildcard characters: False ``` ### -ClusterType -The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or connectedClusters (for OnPrem K8S clusters). +The Kubernetes cluster resource name - i.e. +managedClusters, connectedClusters, provisionedClusters. ```yaml Type: System.String @@ -156,9 +154,7 @@ Accept wildcard characters: False ``` ### -SubscriptionId -The Azure subscription ID. -This is a GUID-formatted string (e.g. -00000000-0000-0000-0000-000000000000) +The ID of the target subscription. ```yaml Type: System.String[] @@ -181,7 +177,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtension +### Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtension ## NOTES @@ -196,14 +192,15 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter - `[ClusterName ]`: The name of the kubernetes cluster. - - `[ClusterResourceName ]`: The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or connectedClusters (for OnPrem K8S clusters). - - `[ClusterRp ]`: The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or Microsoft.Kubernetes (for OnPrem K8S clusters). + - `[ClusterResourceName ]`: The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. + - `[ClusterRp ]`: The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. - `[ExtensionName ]`: Name of the Extension. + - `[FluxConfigurationName ]`: Name of the Flux Configuration. - `[Id ]`: Resource identity path - `[OperationId ]`: operation Id - - `[ResourceGroupName ]`: The name of the resource group. + - `[ResourceGroupName ]`: The name of the resource group. The name is case insensitive. - `[SourceControlConfigurationName ]`: Name of the Source Control Configuration. - - `[SubscriptionId ]`: The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000) + - `[SubscriptionId ]`: The ID of the target subscription. ## RELATED LINKS diff --git a/src/KubernetesConfiguration/help/New-AzKubernetesConfiguration.md b/src/KubernetesConfiguration/help/New-AzKubernetesConfiguration.md index c8040cd25761..204d5ad2195f 100644 --- a/src/KubernetesConfiguration/help/New-AzKubernetesConfiguration.md +++ b/src/KubernetesConfiguration/help/New-AzKubernetesConfiguration.md @@ -13,12 +13,12 @@ Create a new Kubernetes Source Control Configuration. ## SYNTAX ``` -New-AzKubernetesConfiguration -ClusterName -Name -ResourceGroupName - -RepositoryUrl [-ClusterType ] [-SubscriptionId ] [-ClusterScoped] +New-AzKubernetesConfiguration -ClusterName -ClusterType -Name + -ResourceGroupName [-SubscriptionId ] [-ClusterScoped] [-ConfigurationProtectedSetting ] [-EnableHelmOperator] [-HelmOperatorChartValue ] [-HelmOperatorChartVersion ] [-OperatorInstanceName ] [-OperatorNamespace ] - [-OperatorParameter ] [-SshKnownHost ] [-DefaultProfile ] [-Confirm] [-WhatIf] - [] + [-OperatorParam ] [-RepositoryUrl ] [-SshKnownHost ] [-DefaultProfile ] + [-Confirm] [-WhatIf] [] ``` ## DESCRIPTION @@ -26,31 +26,29 @@ Create a new Kubernetes Source Control Configuration. ## EXAMPLES -### Example 1: Create a configuration for kubernetes cluster +### Example 1: Create a configuration for Kubernetes Cluster ```powershell -New-AzKubernetesConfiguration -ResourceGroupName azps_test_group -ClusterName azps_test_cluster -Name azpstestk8s01 -RepositoryUrl http://github.com/xxxx -``` +PS C:\> New-AzConnectedKubernetes -ClusterName azpstest_cluster_arc -ResourceGroupName azpstest_gp -Location eastus +PS C:\> New-AzKubernetesConfiguration -ResourceGroupName azpstest_gp -ClusterName azpstest_cluster_arc -Name azpstestk8s -RepositoryUrl http://github.com/xxxx -ClusterType ConnectedClusters -```output -Name Type ----- ---- -azpstestk8s01 Microsoft.KubernetesConfiguration/sourceControlConfigurations +Name RepositoryUrl ResourceGroupName +---- ------------- ----------------- +azpstestk8s http://github.com/xxxx azpstest_gp ``` -This command creates a configuration for kubernetes cluster. +This command creates a configuration for Kubernetes Cluster. -### Example 2: Create a configuration for kubernetes cluster with specify paramter OperatorNamespace +### Example 2: Create a configuration for Kubernetes Cluster with specify paramter OperatorNamespace ```powershell -New-AzKubernetesConfiguration -ResourceGroupName azps_test_group -ClusterName azps_test_cluster -Name azpstestk8s02 -RepositoryUrl http://github.com/xxxx -OperatorNamespace namespace-t01 -``` +PS C:\> New-AzConnectedKubernetes -ClusterName azpstest_cluster_arc -ResourceGroupName azpstest_gp -Location eastus +PS C:\> New-AzKubernetesConfiguration -ResourceGroupName azpstest_gp -ClusterName azpstest_cluster_arc -Name azpstestk8s-operator -RepositoryUrl http://github.com/xxxx -OperatorNamespace namespace-t01 -ClusterType ConnectedClusters -```output -Name Type ----- ---- -azpstestk8s02 Microsoft.KubernetesConfiguration/sourceControlConfigurations +Name RepositoryUrl ResourceGroupName +---- ------------- ----------------- +azpstestk8s-operator http://github.com/xxxx azpstest_gp ``` -This command creates a configuration in the new operator namespace for kubernetes cluster. +This command creates a configuration in the new operator namespace for Kubernetes Cluster. Note, Unable to create a configuration in an existing operator namespace. ## PARAMETERS @@ -86,14 +84,15 @@ Accept wildcard characters: False ``` ### -ClusterType -The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or connectedClusters (for OnPrem K8S clusters). +The Kubernetes cluster resource name - i.e. +managedClusters, connectedClusters, provisionedClusters. ```yaml Type: System.String Parameter Sets: (All) Aliases: -Required: False +Required: True Position: Named Default value: None Accept pipeline input: False @@ -221,7 +220,7 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -OperatorParameter +### -OperatorParam Any Parameters for the Operator instance in string format. ```yaml @@ -244,7 +243,7 @@ Type: System.String Parameter Sets: (All) Aliases: -Required: True +Required: False Position: Named Default value: None Accept pipeline input: False @@ -253,6 +252,7 @@ Accept wildcard characters: False ### -ResourceGroupName The name of the resource group. +The name is case insensitive. ```yaml Type: System.String @@ -267,7 +267,7 @@ Accept wildcard characters: False ``` ### -SshKnownHost -If passed set the scope of the Configuration to Cluster (default is nameSpace). +Base64-encoded known_hosts contents containing public SSH keys required to access private Git instances ```yaml Type: System.String @@ -282,7 +282,7 @@ Accept wildcard characters: False ``` ### -SubscriptionId -The Azure subscription ID. +The ID of the target subscription. ```yaml Type: System.String @@ -334,7 +334,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfiguration +### Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfiguration ## NOTES diff --git a/src/KubernetesConfiguration/help/New-AzKubernetesConfigurationFlux.md b/src/KubernetesConfiguration/help/New-AzKubernetesConfigurationFlux.md new file mode 100644 index 000000000000..daf6d7e1221f --- /dev/null +++ b/src/KubernetesConfiguration/help/New-AzKubernetesConfigurationFlux.md @@ -0,0 +1,594 @@ +--- +external help file: +Module Name: Az.KubernetesConfiguration +online version: https://docs.microsoft.com/powershell/module/az.kubernetesconfiguration/new-azkubernetesconfigurationflux +schema: 2.0.0 +--- + +# New-AzKubernetesConfigurationFlux + +## SYNOPSIS +Create a new Kubernetes Flux Configuration. + +## SYNTAX + +``` +New-AzKubernetesConfigurationFlux -ClusterName -ClusterType -Name + -ResourceGroupName [-SubscriptionId ] [-BucketAccessKey ] [-BucketInsecure] + [-BucketLocalAuthRef ] [-BucketName ] [-BucketSyncIntervalInSecond ] + [-BucketTimeoutInSecond ] [-BucketUrl ] [-ConfigurationProtectedSetting ] + [-GitRepositoryHttpsCaCert ] [-GitRepositoryHttpsUser ] [-GitRepositoryLocalAuthRef ] + [-GitRepositorySshKnownHost ] [-GitRepositorySyncIntervalInSecond ] + [-GitRepositoryTimeoutInSecond ] [-GitRepositoryUrl ] [-Kustomization ] + [-Namespace ] [-RepositoryRefBranch ] [-RepositoryRefCommit ] + [-RepositoryRefSemver ] [-RepositoryRefTag ] [-Scope ] + [-SourceKind ] [-Suspend] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] + [-WhatIf] [] +``` + +## DESCRIPTION +Create a new Kubernetes Flux Configuration. + +## EXAMPLES + +### Example 1: Create a new Kubernetes Flux Configuration. +```powershell +PS C:\> $kustomizations = @{ + infra=@{ + Name = "infra" + Path = "./infrastructure" + Prune = "true" + }; + apps=@{ + Name = "apps" + Path = "./apps/staging" + Prune = "true" + DependsOn = @("infra") + } +} +PS C:\> New-AzKubernetesConfigurationFlux -ClusterName azpstest_cluster_arc -ClusterType ConnectedClusters -Name azpstestflux-k8s -ResourceGroupName azpstest_gp -Namespace namespace-t01 -Scope 'cluster' -GitRepositoryUrl https://github.com/Azure/gitops-flux2-kustomize-helm-mt -RepositoryRefBranch main -SourceKind 'GitRepository' -GitRepositorySyncIntervalInSecond 600 -GitRepositoryTimeoutInSecond 600 -Suspend:$false -Kustomization $kustomizations + +Name ResourceGroupName +---- ----------------- +azpstestflux-k8s azpstest_gp +``` + +Create a new Kubernetes Flux Configuration. + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -BucketAccessKey +Plaintext access key used to securely access the S3 bucket + +```yaml +Type: System.Security.SecureString +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -BucketInsecure +Specify whether to use insecure communication when puling data from the S3 bucket. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -BucketLocalAuthRef +Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided configuration secrets. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -BucketName +The bucket name to sync from the url endpoint for the flux configuration. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -BucketSyncIntervalInSecond +The interval at which to re-reconcile the cluster git repository source with the remote. + +```yaml +Type: System.Int64 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -BucketTimeoutInSecond +The maximum time to attempt to reconcile the cluster git repository source with the remote. + +```yaml +Type: System.Int64 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -BucketUrl +The URL to sync for the flux configuration S3 bucket. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ClusterName +The name of the kubernetes cluster. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ClusterType +The Kubernetes cluster resource name - i.e. +managedClusters, connectedClusters, provisionedClusters. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ConfigurationProtectedSetting +Key-value pairs of protected configuration settings for the configuration + +```yaml +Type: System.Collections.Hashtable +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The credentials, account, tenant, and subscription used for communication with Azure. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -GitRepositoryHttpsCaCert +Base64-encoded HTTPS certificate authority contents used to access git private git repositories over HTTPS + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -GitRepositoryHttpsUser +Plaintext HTTPS username used to access private git repositories over HTTPS + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -GitRepositoryLocalAuthRef +Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided configuration secrets. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -GitRepositorySshKnownHost +Base64-encoded known_hosts value containing public SSH keys required to access private git repositories over SSH + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -GitRepositorySyncIntervalInSecond +The interval at which to re-reconcile the cluster git repository source with the remote. + +```yaml +Type: System.Int64 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -GitRepositoryTimeoutInSecond +The maximum time to attempt to reconcile the cluster git repository source with the remote. + +```yaml +Type: System.Int64 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -GitRepositoryUrl +The URL to sync for the flux configuration git repository. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Kustomization +Array of kustomizations used to reconcile the artifact pulled by the source type on the cluster. + +```yaml +Type: System.Collections.Hashtable +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Name +Name of the Flux Configuration. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: FluxConfigurationName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Namespace +The namespace to which this configuration is installed to. +Maximum of 253 lower case alphanumeric characters, hyphen and period only. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -RepositoryRefBranch +The git repository branch name to checkout. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -RepositoryRefCommit +The commit SHA to checkout. +This value must be combined with the branch name to be valid. +This takes precedence over semver. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -RepositoryRefSemver +The semver range used to match against git repository tags. +This takes precedence over tag. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -RepositoryRefTag +The git repository tag name to checkout. +This takes precedence over branch. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Scope +Scope at which the operator will be installed. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ScopeType +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SourceKind +Source Kind to pull the configuration data from. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Suspend +Whether this configuration should suspend its reconciliation of its kustomizations and sources. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfiguration + +## NOTES + +ALIASES + +New-AzK8sConfigurationFlux + +## RELATED LINKS + diff --git a/src/KubernetesConfiguration/help/New-AzKubernetesExtension.md b/src/KubernetesConfiguration/help/New-AzKubernetesExtension.md index 34271671e390..c516da4ad01b 100644 --- a/src/KubernetesConfiguration/help/New-AzKubernetesExtension.md +++ b/src/KubernetesConfiguration/help/New-AzKubernetesExtension.md @@ -15,11 +15,10 @@ Create a new Kubernetes Cluster Extension. ``` New-AzKubernetesExtension -ClusterName -ClusterType -Name -ResourceGroupName -ExtensionType [-SubscriptionId ] - [-AkAssignedIdentityType ] [-AutoUpgradeMinorVersion] - [-ClusterReleaseNamespace ] [-ConfigurationProtectedSetting ] - [-ConfigurationSetting ] [-IdentityType ] - [-NamespaceTargetNamespace ] [-ReleaseTrain ] [-Version ] - [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] + [-AkAssignedIdentityType ] [-AutoUpgradeMinorVersion] [-ClusterReleaseNamespace ] + [-ConfigurationProtectedSetting ] [-ConfigurationSetting ] + [-IdentityType ] [-NamespaceTargetNamespace ] [-ReleaseTrain ] + [-Version ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] ``` ## DESCRIPTION @@ -29,24 +28,33 @@ Create a new Kubernetes Cluster Extension. ### Example 1: Create a new Kubernetes Cluster Extension. ```powershell -New-AzKubernetesExtension -ClusterName azps_test_cluster -ClusterType ConnectedClusters -Name azps_test_extension -ResourceGroupName azps_test_group -ExtensionType Microsoft.Arcdataservices -``` +PS C:\> New-AzKubernetesExtension -ClusterName azpstest_cluster_arc -ClusterType ConnectedClusters -Name azpstest-extension -ResourceGroupName azpstest_gp -ExtensionType azuremonitor-containers -```output -Name ExtensionType Version ProvisioningState AutoUpgradeMinorVersion ReleaseTrain ResourceGroupName ----- ------------- ------- ----------------- ----------------------- ------------ ----------------- -azps_test_extension microsoft.arcdataservices 1.0.16701001 Succeeded True Stable azps_test_group +Name ExtensionType Version ProvisioningState AutoUpgradeMinorVersion ReleaseTrain +---- ------------- ------- ----------------- ----------------------- ------------ +azpstest-extension azuremonitor-containers 2.9.2 Succeeded True Stable ``` Create a new Kubernetes Cluster Extension. +### Example 2: Create a Flux Cluster Extension. +```powershell +PS C:\> New-AzKubernetesExtension -ClusterName azpstest_cluster_arc -ClusterType ConnectedClusters -Name flux -ResourceGroupName azpstest_gp -ExtensionType microsoft.flux -AutoUpgradeMinorVersion -ClusterReleaseNamespace flux-system -IdentityType 'SystemAssigned' + +Name ExtensionType Version ProvisioningState AutoUpgradeMinorVersion ReleaseTrain +---- ------------- ------- ----------------- ----------------------- ------------ +flux microsoft.flux 1.0.0 Succeeded True Stable +``` + +Create a Flux Cluster Extension. + ## PARAMETERS ### -AkAssignedIdentityType The identity type. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ResourceIdentityType +Type: Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.AksIdentityType Parameter Sets: (All) Aliases: @@ -119,7 +127,8 @@ Accept wildcard characters: False ``` ### -ClusterType -The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or connectedClusters (for OnPrem K8S clusters). +The Kubernetes cluster resource name - i.e. +managedClusters, connectedClusters, provisionedClusters. ```yaml Type: System.String @@ -288,9 +297,7 @@ Accept wildcard characters: False ``` ### -SubscriptionId -The Azure subscription ID. -This is a GUID-formatted string (e.g. -00000000-0000-0000-0000-000000000000) +The ID of the target subscription. ```yaml Type: System.String @@ -305,8 +312,8 @@ Accept wildcard characters: False ``` ### -Version -Version of the extension for this extension, if it is 'pinned' to a specific version. -autoUpgradeMinorVersion must be 'false'. +User-specified version of the extension for this extension to 'pin'. +To use 'version', autoUpgradeMinorVersion must be 'false'. ```yaml Type: System.String @@ -358,7 +365,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtension +### Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtension ## NOTES diff --git a/src/KubernetesConfiguration/help/Remove-AzKubernetesConfiguration.md b/src/KubernetesConfiguration/help/Remove-AzKubernetesConfiguration.md index fb32ebd55486..8d87e35f41fc 100644 --- a/src/KubernetesConfiguration/help/Remove-AzKubernetesConfiguration.md +++ b/src/KubernetesConfiguration/help/Remove-AzKubernetesConfiguration.md @@ -30,20 +30,22 @@ This will delete the YAML file used to set up the Source control configuration, ## EXAMPLES -### Example 1: Remove a configuation of kubernetes cluster by name +### Example 1: Remove a configuation of Kubernetes Cluster by name ```powershell -Remove-AzKubernetesConfiguration -ResourceGroupName azps_test_group -ClusterName azps_test_cluster -Name azpstestk8s01 -ClusterType ConnectedClusters +PS C:\> Remove-AzKubernetesConfiguration -ResourceGroupName azpstest_gp -ClusterName azpstest_cluster_arc -Name azpstestk8s -ClusterType ConnectedClusters + ``` -This command removes a configuation of kubernetes cluster by name. +This command removes a configuation of Kubernetes Cluster by name. -### Example 2: Remove a configuation of kubernetes cluster by object +### Example 2: Remove a configuation of Kubernetes Cluster by object ```powershell -$kubConf = Get-AzKubernetesConfiguration -ClusterName azps_test_cluster -ClusterType ConnectedClusters -ResourceGroupName azps_test_group -Name azpstestk8s02 +PS C:\> $kubConf = Get-AzKubernetesConfiguration -ClusterName azpstest_cluster_arc -ClusterType ConnectedClusters -ResourceGroupName azpstest_gp -Name azpstestk8s-operator Remove-AzKubernetesConfiguration -InputObject $kubConf + ``` -This command removes a configuation of kubernetes cluster by object. +This command removes a configuation of Kubernetes Cluster by object. ## PARAMETERS @@ -78,7 +80,8 @@ Accept wildcard characters: False ``` ### -ClusterType -The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or connectedClusters (for OnPrem K8S clusters). +The Kubernetes cluster resource name - i.e. +managedClusters, connectedClusters, provisionedClusters. ```yaml Type: System.String @@ -170,6 +173,7 @@ Accept wildcard characters: False ### -ResourceGroupName The name of the resource group. +The name is case insensitive. ```yaml Type: System.String @@ -184,7 +188,7 @@ Accept wildcard characters: False ``` ### -SubscriptionId -The Azure subscription ID. +The ID of the target subscription. ```yaml Type: System.String @@ -253,14 +257,15 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter - `[ClusterName ]`: The name of the kubernetes cluster. - - `[ClusterResourceName ]`: The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or connectedClusters (for OnPrem K8S clusters). - - `[ClusterRp ]`: The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or Microsoft.Kubernetes (for OnPrem K8S clusters). + - `[ClusterResourceName ]`: The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. + - `[ClusterRp ]`: The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. - `[ExtensionName ]`: Name of the Extension. + - `[FluxConfigurationName ]`: Name of the Flux Configuration. - `[Id ]`: Resource identity path - `[OperationId ]`: operation Id - - `[ResourceGroupName ]`: The name of the resource group. + - `[ResourceGroupName ]`: The name of the resource group. The name is case insensitive. - `[SourceControlConfigurationName ]`: Name of the Source Control Configuration. - - `[SubscriptionId ]`: The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000) + - `[SubscriptionId ]`: The ID of the target subscription. ## RELATED LINKS diff --git a/src/KubernetesConfiguration/help/Remove-AzKubernetesConfigurationFlux.md b/src/KubernetesConfiguration/help/Remove-AzKubernetesConfigurationFlux.md new file mode 100644 index 000000000000..a1607b0660bd --- /dev/null +++ b/src/KubernetesConfiguration/help/Remove-AzKubernetesConfigurationFlux.md @@ -0,0 +1,285 @@ +--- +external help file: +Module Name: Az.KubernetesConfiguration +online version: https://docs.microsoft.com/powershell/module/az.kubernetesconfiguration/remove-azkubernetesconfigurationflux +schema: 2.0.0 +--- + +# Remove-AzKubernetesConfigurationFlux + +## SYNOPSIS +This will delete the YAML file used to set up the Flux Configuration, thus stopping future sync from the source repo. + +## SYNTAX + +### Delete (Default) +``` +Remove-AzKubernetesConfigurationFlux -ClusterName -ClusterType -Name + -ResourceGroupName [-SubscriptionId ] [-ForceDelete] [-DefaultProfile ] [-AsJob] + [-NoWait] [-PassThru] [-Confirm] [-WhatIf] [] +``` + +### DeleteViaIdentity +``` +Remove-AzKubernetesConfigurationFlux -InputObject [-ForceDelete] + [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +This will delete the YAML file used to set up the Flux Configuration, thus stopping future sync from the source repo. + +## EXAMPLES + +### Example 1: This will delete the YAML file used to set up the Flux Configuration, thus stopping future sync from the source repo. +```powershell +PS C:\> Remove-AzKubernetesConfigurationFlux -ClusterName azpstest_cluster_arc -ClusterType ConnectedClusters -Name azpstestflux-k8s -ResourceGroupName azpstest_gp + +``` + +This will delete the YAML file used to set up the Flux Configuration, thus stopping future sync from the source repo. + +### Example 2: This will delete the YAML file used to set up the Flux Configuration, thus stopping future sync from the source repo. +```powershell +PS C:\> Get-AzKubernetesConfigurationFlux -ClusterName azpstest_cluster_arc -ClusterType ConnectedClusters -Name azpstestflux-k8s -ResourceGroupName azpstest_gp | Remove-AzKubernetesConfigurationFlux + +``` + +This will delete the YAML file used to set up the Flux Configuration, thus stopping future sync from the source repo. + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ClusterName +The name of the kubernetes cluster. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ClusterType +The Kubernetes cluster resource name - i.e. +managedClusters, connectedClusters, provisionedClusters. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The credentials, account, tenant, and subscription used for communication with Azure. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ForceDelete +Delete the extension resource in Azure - not the normal asynchronous delete. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentity +Parameter Sets: DeleteViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Name +Name of the Flux Configuration. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: FluxConfigurationName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PassThru +Returns true when the command succeeds + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentity + +## OUTPUTS + +### System.Boolean + +## NOTES + +ALIASES + +Remove-AzK8sConfigurationFlux + +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. + - `[ClusterResourceName ]`: The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. + - `[ClusterRp ]`: The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. + - `[ExtensionName ]`: Name of the Extension. + - `[FluxConfigurationName ]`: Name of the Flux Configuration. + - `[Id ]`: Resource identity path + - `[OperationId ]`: operation Id + - `[ResourceGroupName ]`: The name of the resource group. The name is case insensitive. + - `[SourceControlConfigurationName ]`: Name of the Source Control Configuration. + - `[SubscriptionId ]`: The ID of the target subscription. + +## RELATED LINKS + diff --git a/src/KubernetesConfiguration/help/Remove-AzKubernetesExtension.md b/src/KubernetesConfiguration/help/Remove-AzKubernetesExtension.md index 39c83c7f4ab7..9154e6bf0990 100644 --- a/src/KubernetesConfiguration/help/Remove-AzKubernetesExtension.md +++ b/src/KubernetesConfiguration/help/Remove-AzKubernetesExtension.md @@ -34,7 +34,8 @@ This will cause the Agent to Uninstall the extension from the cluster. ### Example 1: Delete a Kubernetes Cluster Extension. ```powershell -Remove-AzKubernetesExtension -ClusterName azps_test_cluster -ClusterType ConnectedClusters -Name azps_test_extension -ResourceGroupName azps_test_group +PS C:\> Remove-AzKubernetesExtension -ClusterName azpstest_cluster_arc -ClusterType ConnectedClusters -Name azpstest-extension -ResourceGroupName azpstest_gp + ``` Delete a Kubernetes Cluster Extension. @@ -72,7 +73,8 @@ Accept wildcard characters: False ``` ### -ClusterType -The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or connectedClusters (for OnPrem K8S clusters). +The Kubernetes cluster resource name - i.e. +managedClusters, connectedClusters, provisionedClusters. ```yaml Type: System.String @@ -194,9 +196,7 @@ Accept wildcard characters: False ``` ### -SubscriptionId -The Azure subscription ID. -This is a GUID-formatted string (e.g. -00000000-0000-0000-0000-000000000000) +The ID of the target subscription. ```yaml Type: System.String @@ -265,14 +265,15 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter - `[ClusterName ]`: The name of the kubernetes cluster. - - `[ClusterResourceName ]`: The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or connectedClusters (for OnPrem K8S clusters). - - `[ClusterRp ]`: The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or Microsoft.Kubernetes (for OnPrem K8S clusters). + - `[ClusterResourceName ]`: The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. + - `[ClusterRp ]`: The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. - `[ExtensionName ]`: Name of the Extension. + - `[FluxConfigurationName ]`: Name of the Flux Configuration. - `[Id ]`: Resource identity path - `[OperationId ]`: operation Id - - `[ResourceGroupName ]`: The name of the resource group. + - `[ResourceGroupName ]`: The name of the resource group. The name is case insensitive. - `[SourceControlConfigurationName ]`: Name of the Source Control Configuration. - - `[SubscriptionId ]`: The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000) + - `[SubscriptionId ]`: The ID of the target subscription. ## RELATED LINKS diff --git a/src/KubernetesConfiguration/help/Update-AzKubernetesConfigurationFlux.md b/src/KubernetesConfiguration/help/Update-AzKubernetesConfigurationFlux.md new file mode 100644 index 000000000000..8856bb9003af --- /dev/null +++ b/src/KubernetesConfiguration/help/Update-AzKubernetesConfigurationFlux.md @@ -0,0 +1,610 @@ +--- +external help file: +Module Name: Az.KubernetesConfiguration +online version: https://docs.microsoft.com/powershell/module/az.kubernetesconfiguration/update-azkubernetesconfigurationflux +schema: 2.0.0 +--- + +# Update-AzKubernetesConfigurationFlux + +## SYNOPSIS +Update an existing Kubernetes Flux Configuration. + +## SYNTAX + +### UpdateExpanded (Default) +``` +Update-AzKubernetesConfigurationFlux -ClusterName -ClusterType -Name + -ResourceGroupName [-SubscriptionId ] [-BucketAccessKey ] [-BucketInsecure] + [-BucketLocalAuthRef ] [-BucketName ] [-BucketSyncIntervalInSecond ] + [-BucketTimeoutInSecond ] [-BucketUrl ] [-ConfigurationProtectedSetting ] + [-GitRepositoryHttpsCaCert ] [-GitRepositoryHttpsUser ] [-GitRepositoryLocalAuthRef ] + [-GitRepositorySshKnownHost ] [-GitRepositorySyncIntervalInSecond ] + [-GitRepositoryTimeoutInSecond ] [-GitRepositoryUrl ] [-Kustomization ] + [-RepositoryRefBranch ] [-RepositoryRefCommit ] [-RepositoryRefSemver ] + [-RepositoryRefTag ] [-SourceKind ] [-Suspend] [-DefaultProfile ] [-AsJob] + [-NoWait] [-Confirm] [-WhatIf] [] +``` + +### UpdateViaIdentityExpanded +``` +Update-AzKubernetesConfigurationFlux -InputObject + [-BucketAccessKey ] [-BucketInsecure] [-BucketLocalAuthRef ] [-BucketName ] + [-BucketSyncIntervalInSecond ] [-BucketTimeoutInSecond ] [-BucketUrl ] + [-ConfigurationProtectedSetting ] [-GitRepositoryHttpsCaCert ] + [-GitRepositoryHttpsUser ] [-GitRepositoryLocalAuthRef ] + [-GitRepositorySshKnownHost ] [-GitRepositorySyncIntervalInSecond ] + [-GitRepositoryTimeoutInSecond ] [-GitRepositoryUrl ] [-Kustomization ] + [-RepositoryRefBranch ] [-RepositoryRefCommit ] [-RepositoryRefSemver ] + [-RepositoryRefTag ] [-SourceKind ] [-Suspend] [-DefaultProfile ] [-AsJob] + [-NoWait] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Update an existing Kubernetes Flux Configuration. + +## EXAMPLES + +### Example 1: Update an existing Kubernetes Flux Configuration. +```powershell +PS C:\> Update-AzKubernetesConfigurationFlux -ClusterName azpstest_cluster_arc -ClusterType ConnectedClusters -Name azpstestflux-k8s -ResourceGroupName azpstest_gp -GitRepositoryUrl https://github.com/fluxcd/flux2-kustomize-helm-example -RepositoryRefBranch main -SourceKind 'GitRepository' -GitRepositorySyncIntervalInSecond 600 -GitRepositoryTimeoutInSecond 600 -Suspend:$false + +Name ResourceGroupName +---- ----------------- +azpstestflux-k8s azpstest_gp +``` + +Update an existing Kubernetes Flux Configuration. + +### Example 2: Update an existing Kubernetes Flux Configuration. +```powershell +PS C:\> Get-AzKubernetesConfigurationFlux -ClusterName azpstest_cluster_arc -ClusterType ConnectedClusters -Name azpstestflux-k8s -ResourceGroupName azpstest_gp | Update-AzKubernetesConfigurationFlux -GitRepositoryUrl https://github.com/fluxcd/flux2-kustomize-helm-example -RepositoryRefBranch main -SourceKind 'GitRepository' -GitRepositorySyncIntervalInSecond 600 -GitRepositoryTimeoutInSecond 600 -Suspend:$false + +Name ResourceGroupName +---- ----------------- +azpstestflux-k8s azpstest_gp +``` + +Update an existing Kubernetes Flux Configuration. + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -BucketAccessKey +Plaintext access key used to securely access the S3 bucket + +```yaml +Type: System.Security.SecureString +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -BucketInsecure +Specify whether to use insecure communication when puling data from the S3 bucket. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -BucketLocalAuthRef +Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided configuration secrets. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -BucketName +The bucket name to sync from the url endpoint for the flux configuration. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -BucketSyncIntervalInSecond +The interval at which to re-reconcile the cluster git repository source with the remote. + +```yaml +Type: System.Int64 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -BucketTimeoutInSecond +The maximum time to attempt to reconcile the cluster git repository source with the remote. + +```yaml +Type: System.Int64 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -BucketUrl +The URL to sync for the flux configuration S3 bucket. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ClusterName +The name of the kubernetes cluster. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ClusterType +The Kubernetes cluster resource name - i.e. +managedClusters, connectedClusters, provisionedClusters. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ConfigurationProtectedSetting +Key-value pairs of protected configuration settings for the configuration + +```yaml +Type: System.Collections.Hashtable +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The credentials, account, tenant, and subscription used for communication with Azure. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -GitRepositoryHttpsCaCert +Base64-encoded HTTPS certificate authority contents used to access git private git repositories over HTTPS + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -GitRepositoryHttpsUser +Plaintext HTTPS username used to access private git repositories over HTTPS + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -GitRepositoryLocalAuthRef +Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided configuration secrets. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -GitRepositorySshKnownHost +Base64-encoded known_hosts value containing public SSH keys required to access private git repositories over SSH + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -GitRepositorySyncIntervalInSecond +The interval at which to re-reconcile the cluster git repository source with the remote. + +```yaml +Type: System.Int64 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -GitRepositoryTimeoutInSecond +The maximum time to attempt to reconcile the cluster git repository source with the remote. + +```yaml +Type: System.Int64 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -GitRepositoryUrl +The URL to sync for the flux configuration git repository. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentity +Parameter Sets: UpdateViaIdentityExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Kustomization +Array of kustomizations used to reconcile the artifact pulled by the source type on the cluster. + +```yaml +Type: System.Collections.Hashtable +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Name +Name of the Flux Configuration. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded +Aliases: FluxConfigurationName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -RepositoryRefBranch +The git repository branch name to checkout. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -RepositoryRefCommit +The commit SHA to checkout. +This value must be combined with the branch name to be valid. +This takes precedence over semver. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -RepositoryRefSemver +The semver range used to match against git repository tags. +This takes precedence over tag. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -RepositoryRefTag +The git repository tag name to checkout. +This takes precedence over branch. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SourceKind +Source Kind to pull the configuration data from. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Suspend +Whether this configuration should suspend its reconciliation of its kustomizations and sources. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentity + +## OUTPUTS + +### System.Boolean + +## NOTES + +ALIASES + +Update-AzK8sConfigurationFlux + +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. + - `[ClusterResourceName ]`: The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. + - `[ClusterRp ]`: The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. + - `[ExtensionName ]`: Name of the Extension. + - `[FluxConfigurationName ]`: Name of the Flux Configuration. + - `[Id ]`: Resource identity path + - `[OperationId ]`: operation Id + - `[ResourceGroupName ]`: The name of the resource group. The name is case insensitive. + - `[SourceControlConfigurationName ]`: Name of the Source Control Configuration. + - `[SubscriptionId ]`: The ID of the target subscription. + +## RELATED LINKS + diff --git a/src/KubernetesConfiguration/help/Update-AzKubernetesExtension.md b/src/KubernetesConfiguration/help/Update-AzKubernetesExtension.md index f331f0e60fba..03d2c36c856e 100644 --- a/src/KubernetesConfiguration/help/Update-AzKubernetesExtension.md +++ b/src/KubernetesConfiguration/help/Update-AzKubernetesExtension.md @@ -34,13 +34,11 @@ Patch an existing Kubernetes Cluster Extension. ### Example 1: Update an existing Kubernetes Cluster Extension. ```powershell -Update-AzKubernetesExtension -ClusterName azps_test_cluster -ClusterType ConnectedClusters -Name azps_test_extension -ResourceGroupName azps_test_group -ConfigurationProtectedSetting @{"aa"="bb"} -``` +PS C:\> Update-AzKubernetesExtension -ClusterName azpstest_cluster_arc -ClusterType ConnectedClusters -Name azpstest-extension -ResourceGroupName azpstest_gp -ConfigurationProtectedSetting @{"aa"="bb"} -```output -Name ExtensionType Version ProvisioningState AutoUpgradeMinorVersion ReleaseTrain ResourceGroupName ----- ------------- ------- ----------------- ----------------------- ------------ ----------------- -azps_test_extension microsoft.arcdataservices 1.0.16701001 Succeeded True Stable azps_test_group +Name ExtensionType Version ProvisioningState AutoUpgradeMinorVersion ReleaseTrain +---- ------------- ------- ----------------- ----------------------- ------------ +azpstest-extension azuremonitor-containers 2.9.2 Succeeded True Stable ``` Update an existing Kubernetes Cluster Extension. @@ -93,7 +91,8 @@ Accept wildcard characters: False ``` ### -ClusterType -The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or connectedClusters (for OnPrem K8S clusters). +The Kubernetes cluster resource name - i.e. +managedClusters, connectedClusters, provisionedClusters. ```yaml Type: System.String @@ -231,9 +230,7 @@ Accept wildcard characters: False ``` ### -SubscriptionId -The Azure subscription ID. -This is a GUID-formatted string (e.g. -00000000-0000-0000-0000-000000000000) +The ID of the target subscription. ```yaml Type: System.String @@ -303,7 +300,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtension +### Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtension ## NOTES @@ -318,14 +315,15 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter - `[ClusterName ]`: The name of the kubernetes cluster. - - `[ClusterResourceName ]`: The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or connectedClusters (for OnPrem K8S clusters). - - `[ClusterRp ]`: The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or Microsoft.Kubernetes (for OnPrem K8S clusters). + - `[ClusterResourceName ]`: The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. + - `[ClusterRp ]`: The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. - `[ExtensionName ]`: Name of the Extension. + - `[FluxConfigurationName ]`: Name of the Flux Configuration. - `[Id ]`: Resource identity path - `[OperationId ]`: operation Id - - `[ResourceGroupName ]`: The name of the resource group. + - `[ResourceGroupName ]`: The name of the resource group. The name is case insensitive. - `[SourceControlConfigurationName ]`: Name of the Source Control Configuration. - - `[SubscriptionId ]`: The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000) + - `[SubscriptionId ]`: The ID of the target subscription. ## RELATED LINKS diff --git a/src/KubernetesConfiguration/internal/Get-AzKubernetesConfigFluxOperationStatus.ps1 b/src/KubernetesConfiguration/internal/Get-AzKubernetesConfigFluxOperationStatus.ps1 new file mode 100644 index 000000000000..db3911772bff --- /dev/null +++ b/src/KubernetesConfiguration/internal/Get-AzKubernetesConfigFluxOperationStatus.ps1 @@ -0,0 +1,202 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Get Async Operation status +.Description +Get Async Operation status +.Example +PS C:\> Get-AzKubernetesConfigFluxOperationStatus -ClusterName azpstest_cluster_arc -ClusterType ConnectedClusters -FluxConfigurationName azpstestflux-k8s -ResourceGroupName azpstest_gp -OperationId e9871335-7ba8-4100-8cb4-73b3464eb863 + +Name ResourceGroupName Status +---- ----------------- ------ +e9871335-7ba8-4100-8cb4-73b3464eb863 azpstest_gp Succeeded + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResult +.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. + [ClusterResourceName ]: The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. + [ClusterRp ]: The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. + [ExtensionName ]: Name of the Extension. + [FluxConfigurationName ]: Name of the Flux Configuration. + [Id ]: Resource identity path + [OperationId ]: operation Id + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SourceControlConfigurationName ]: Name of the Source Control Configuration. + [SubscriptionId ]: The ID of the target subscription. +.Link +https://docs.microsoft.com/powershell/module/az.kubernetesconfiguration/get-azkubernetesconfigfluxoperationstatus +#> +function Get-AzKubernetesConfigFluxOperationStatus { +[Alias('Get-AzK8sConfigFluxOperationStatus')] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResult])] +[CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [System.String] + # The name of the kubernetes cluster. + ${ClusterName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [System.String] + # The Kubernetes cluster RP - i.e. + # Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. + ${ClusterRp}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [System.String] + # The Kubernetes cluster resource name - i.e. + # managedClusters, connectedClusters, provisionedClusters. + ${ClusterType}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [System.String] + # Name of the Flux Configuration. + ${FluxConfigurationName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [System.String] + # operation Id + ${OperationId}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Get')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentity] + # 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.KubernetesConfiguration.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.private\Get-AzKubernetesConfigFluxOperationStatus_Get'; + GetViaIdentity = 'Az.KubernetesConfiguration.private\Get-AzKubernetesConfigFluxOperationStatus_GetViaIdentity'; + } + if (('Get') -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/KubernetesConfiguration/internal/Get-AzKubernetesConfiguration.ps1 b/src/KubernetesConfiguration/internal/Get-AzKubernetesConfiguration.ps1 index 034452978594..7181430f6add 100644 --- a/src/KubernetesConfiguration/internal/Get-AzKubernetesConfiguration.ps1 +++ b/src/KubernetesConfiguration/internal/Get-AzKubernetesConfiguration.ps1 @@ -20,23 +20,23 @@ Gets details of the Source Control Configuration. .Description Gets details of the Source Control Configuration. .Example -PS C:\> Get-AzKubernetesConfiguration -ResourceGroupName azps_test_group -ClusterName azps_test_cluster -ClusterType ConnectedClusters +PS C:\> Get-AzKubernetesConfiguration -ResourceGroupName azpstest_gp -ClusterName azpstest_cluster_arc -ClusterType ConnectedClusters -Name Type ----- ---- -azpstestk8s01 Microsoft.KubernetesConfiguration/sourceControlConfigurations -azpstestk8s02 Microsoft.KubernetesConfiguration/sourceControlConfigurations +Name RepositoryUrl ResourceGroupName +---- ------------- ----------------- +azpstestk8s http://github.com/xxxx azpstest_gp +azpstestk8s-operator http://github.com/xxxx azpstest_gp .Example -PS C:\> Get-AzKubernetesConfiguration -ResourceGroupName azps_test_group -ClusterName azps_test_cluster -ClusterType ConnectedClusters -Name azpstestk8s01 +PS C:\> Get-AzKubernetesConfiguration -ResourceGroupName azpstest_gp -ClusterName azpstest_cluster_arc -ClusterType ConnectedClusters -Name azpstestk8s -Name Type ----- ---- -azpstestk8s01 Microsoft.KubernetesConfiguration/sourceControlConfigurations +Name RepositoryUrl ResourceGroupName +---- ------------- ----------------- +azpstestk8s http://github.com/xxxx azpstest_gp .Inputs Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfiguration +Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfiguration .Notes COMPLEX PARAMETER PROPERTIES @@ -44,20 +44,21 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ClusterName ]: The name of the kubernetes cluster. - [ClusterResourceName ]: The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or connectedClusters (for OnPrem K8S clusters). - [ClusterRp ]: The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or Microsoft.Kubernetes (for OnPrem K8S clusters). + [ClusterResourceName ]: The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. + [ClusterRp ]: The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. [ExtensionName ]: Name of the Extension. + [FluxConfigurationName ]: Name of the Flux Configuration. [Id ]: Resource identity path [OperationId ]: operation Id - [ResourceGroupName ]: The name of the resource group. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [SourceControlConfigurationName ]: Name of the Source Control Configuration. - [SubscriptionId ]: The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000) + [SubscriptionId ]: The ID of the target subscription. .Link https://docs.microsoft.com/powershell/module/az.kubernetesconfiguration/get-azkubernetesconfiguration #> function Get-AzKubernetesConfiguration { [Alias('Get-AzK8sConfiguration')] -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfiguration])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfiguration])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] @@ -71,14 +72,16 @@ param( [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [System.String] - # The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or Microsoft.Kubernetes (for OnPrem K8S clusters). + # The Kubernetes cluster RP - i.e. + # Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. ${ClusterRp}, [Parameter(ParameterSetName='Get', Mandatory)] [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [System.String] - # The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or connectedClusters (for OnPrem K8S clusters). + # The Kubernetes cluster resource name - i.e. + # managedClusters, connectedClusters, provisionedClusters. ${ClusterType}, [Parameter(ParameterSetName='Get', Mandatory)] @@ -93,6 +96,7 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [System.String] # The name of the resource group. + # The name is case insensitive. ${ResourceGroupName}, [Parameter(ParameterSetName='Get')] @@ -100,9 +104,7 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String[]] - # The Azure subscription ID. - # This is a GUID-formatted string (e.g. - # 00000000-0000-0000-0000-000000000000) + # The ID of the target subscription. ${SubscriptionId}, [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] @@ -167,6 +169,7 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + $mapping = @{ Get = 'Az.KubernetesConfiguration.private\Get-AzKubernetesConfiguration_Get'; GetViaIdentity = 'Az.KubernetesConfiguration.private\Get-AzKubernetesConfiguration_GetViaIdentity'; @@ -181,6 +184,7 @@ begin { $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { + throw } } @@ -189,15 +193,18 @@ process { try { $steppablePipeline.Process($_) } catch { + throw } -} +} end { try { $steppablePipeline.End() + } catch { + throw } -} +} } diff --git a/src/KubernetesConfiguration/internal/Get-AzKubernetesConfigurationFlux.ps1 b/src/KubernetesConfiguration/internal/Get-AzKubernetesConfigurationFlux.ps1 new file mode 100644 index 000000000000..e7aaba870ab5 --- /dev/null +++ b/src/KubernetesConfiguration/internal/Get-AzKubernetesConfigurationFlux.ps1 @@ -0,0 +1,209 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Gets details of the Flux Configuration. +.Description +Gets details of the Flux Configuration. +.Example +PS C:\> Get-AzKubernetesConfigurationFlux -ClusterName azpstest_cluster_arc -ClusterType ConnectedClusters -ResourceGroupName azpstest_gp + +Name ResourceGroupName +---- ----------------- +azpstestflux-k8s azpstest_gp +.Example +PS C:\> Get-AzKubernetesConfigurationFlux -ClusterName azpstest_cluster_arc -ClusterType ConnectedClusters -Name azpstestflux-k8s -ResourceGroupName azpstest_gp + +Name ResourceGroupName +---- ----------------- +azpstestflux-k8s azpstest_gp + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfiguration +.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. + [ClusterResourceName ]: The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. + [ClusterRp ]: The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. + [ExtensionName ]: Name of the Extension. + [FluxConfigurationName ]: Name of the Flux Configuration. + [Id ]: Resource identity path + [OperationId ]: operation Id + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SourceControlConfigurationName ]: Name of the Source Control Configuration. + [SubscriptionId ]: The ID of the target subscription. +.Link +https://docs.microsoft.com/powershell/module/az.kubernetesconfiguration/get-azkubernetesconfigurationflux +#> +function Get-AzKubernetesConfigurationFlux { +[Alias('Get-AzK8sConfigurationFlux')] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfiguration])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [System.String] + # The name of the kubernetes cluster. + ${ClusterName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [System.String] + # The Kubernetes cluster RP - i.e. + # Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. + ${ClusterRp}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [System.String] + # The Kubernetes cluster resource name - i.e. + # managedClusters, connectedClusters, provisionedClusters. + ${ClusterType}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Alias('FluxConfigurationName')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [System.String] + # Name of the Flux Configuration. + ${Name}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentity] + # 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.KubernetesConfiguration.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.private\Get-AzKubernetesConfigurationFlux_Get'; + GetViaIdentity = 'Az.KubernetesConfiguration.private\Get-AzKubernetesConfigurationFlux_GetViaIdentity'; + List = 'Az.KubernetesConfiguration.private\Get-AzKubernetesConfigurationFlux_List'; + } + if (('Get', 'List') -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/KubernetesConfiguration/internal/Get-AzKubernetesExtension.ps1 b/src/KubernetesConfiguration/internal/Get-AzKubernetesExtension.ps1 index cec838653b24..326655de46ff 100644 --- a/src/KubernetesConfiguration/internal/Get-AzKubernetesExtension.ps1 +++ b/src/KubernetesConfiguration/internal/Get-AzKubernetesExtension.ps1 @@ -20,22 +20,23 @@ Gets Kubernetes Cluster Extension. .Description Gets Kubernetes Cluster Extension. .Example -PS C:\> Get-AzKubernetesExtension -ClusterName azps_test_cluster -ClusterType ConnectedClusters -Name azps_test_extension -ResourceGroupName azps_test_group +PS C:\> Get-AzKubernetesExtension -ClusterName azpstest_cluster_arc -ClusterType ConnectedClusters -Name azpstest-extension -ResourceGroupName azpstest_gp -Name ExtensionType Version ProvisioningState AutoUpgradeMinorVersion ReleaseTrain ResourceGroupName ----- ------------- ------- ----------------- ----------------------- ------------ ----------------- -azps_test_extension microsoft.arcdataservices 1.0.16701001 Succeeded True Stable azps_test_group +Name ExtensionType Version ProvisioningState AutoUpgradeMinorVersion ReleaseTrain +---- ------------- ------- ----------------- ----------------------- ------------ +azpstest-extension azuremonitor-containers 2.9.2 Succeeded True Stable .Example -PS C:\> Get-AzKubernetesExtension -ClusterName azps_test_cluster -ClusterType ConnectedClusters -ResourceGroupName azps_test_group +PS C:\> Get-AzKubernetesExtension -ClusterName azpstest_cluster_arc -ClusterType ConnectedClusters -ResourceGroupName azpstest_gp -Name ExtensionType Version ProvisioningState AutoUpgradeMinorVersion ReleaseTrain ResourceGroupName ----- ------------- ------- ----------------- ----------------------- ------------ ----------------- -azps_test_extension microsoft.arcdataservices 1.0.16701001 Succeeded True Stable azps_test_group +Name ExtensionType Version ProvisioningState AutoUpgradeMinorVersion ReleaseTrain +---- ------------- ------- ----------------- ----------------------- ------------ +azpstest-extension azuremonitor-containers 2.9.2 Succeeded True Stable +flux microsoft.flux 1.0.0 Succeeded True Stable .Inputs Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtension +Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtension .Notes COMPLEX PARAMETER PROPERTIES @@ -43,20 +44,21 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ClusterName ]: The name of the kubernetes cluster. - [ClusterResourceName ]: The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or connectedClusters (for OnPrem K8S clusters). - [ClusterRp ]: The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or Microsoft.Kubernetes (for OnPrem K8S clusters). + [ClusterResourceName ]: The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. + [ClusterRp ]: The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. [ExtensionName ]: Name of the Extension. + [FluxConfigurationName ]: Name of the Flux Configuration. [Id ]: Resource identity path [OperationId ]: operation Id - [ResourceGroupName ]: The name of the resource group. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [SourceControlConfigurationName ]: Name of the Source Control Configuration. - [SubscriptionId ]: The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000) + [SubscriptionId ]: The ID of the target subscription. .Link https://docs.microsoft.com/powershell/module/az.kubernetesconfiguration/get-azkubernetesextension #> function Get-AzKubernetesExtension { [Alias('Get-AzK8sExtension')] -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtension])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtension])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] @@ -70,14 +72,16 @@ param( [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [System.String] - # The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or Microsoft.Kubernetes (for OnPrem K8S clusters). + # The Kubernetes cluster RP - i.e. + # Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. ${ClusterRp}, [Parameter(ParameterSetName='Get', Mandatory)] [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [System.String] - # The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or connectedClusters (for OnPrem K8S clusters). + # The Kubernetes cluster resource name - i.e. + # managedClusters, connectedClusters, provisionedClusters. ${ClusterType}, [Parameter(ParameterSetName='Get', Mandatory)] @@ -100,9 +104,7 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String[]] - # The Azure subscription ID. - # This is a GUID-formatted string (e.g. - # 00000000-0000-0000-0000-000000000000) + # The ID of the target subscription. ${SubscriptionId}, [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] @@ -167,6 +169,7 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + $mapping = @{ Get = 'Az.KubernetesConfiguration.private\Get-AzKubernetesExtension_Get'; GetViaIdentity = 'Az.KubernetesConfiguration.private\Get-AzKubernetesExtension_GetViaIdentity'; @@ -181,6 +184,7 @@ begin { $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { + throw } } @@ -189,15 +193,18 @@ process { try { $steppablePipeline.Process($_) } catch { + throw } -} +} end { try { $steppablePipeline.End() + } catch { + throw } -} +} } diff --git a/src/KubernetesConfiguration/internal/Get-AzOperation.ps1 b/src/KubernetesConfiguration/internal/Get-AzOperation.ps1 index 306b0e8514fb..379be18024be 100644 --- a/src/KubernetesConfiguration/internal/Get-AzOperation.ps1 +++ b/src/KubernetesConfiguration/internal/Get-AzOperation.ps1 @@ -20,23 +20,17 @@ List all the available operations the KubernetesConfiguration resource provider .Description List all the available operations the KubernetesConfiguration resource provider supports. .Example -PS C:\> {{ Add code here }} - -{{ Add output here }} +{{ Add code here }} .Example -PS C:\> {{ Add code here }} - -{{ Add output here }} +{{ Add code here }} .Outputs -Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IResourceProviderOperation -.Outputs -Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IResourceProviderOperationAutoGenerated +Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperation .Link https://docs.microsoft.com/powershell/module/az.kubernetesconfiguration/get-azoperation #> function Get-AzOperation { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IResourceProviderOperation], [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IResourceProviderOperationAutoGenerated])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperation])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter()] @@ -94,9 +88,9 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + $mapping = @{ List = 'Az.KubernetesConfiguration.private\Get-AzOperation_List'; - List1 = 'Az.KubernetesConfiguration.private\Get-AzOperation_List1'; } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) @@ -104,6 +98,7 @@ begin { $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { + throw } } @@ -112,15 +107,18 @@ process { try { $steppablePipeline.Process($_) } catch { + throw } -} +} end { try { $steppablePipeline.End() + } catch { + throw } -} +} } diff --git a/src/KubernetesConfiguration/internal/New-AzKubernetesConfiguration.ps1 b/src/KubernetesConfiguration/internal/New-AzKubernetesConfiguration.ps1 index b70e36bd3f4c..ac341bd2e670 100644 --- a/src/KubernetesConfiguration/internal/New-AzKubernetesConfiguration.ps1 +++ b/src/KubernetesConfiguration/internal/New-AzKubernetesConfiguration.ps1 @@ -20,26 +20,28 @@ Create a new Kubernetes Source Control Configuration. .Description Create a new Kubernetes Source Control Configuration. .Example -PS C:\> New-AzKubernetesConfiguration -ResourceGroupName azps_test_group -ClusterName azps_test_cluster -Name azpstestk8s01 -RepositoryUrl http://github.com/xxxx +PS C:\> New-AzConnectedKubernetes -ClusterName azpstest_cluster_arc -ResourceGroupName azpstest_gp -Location eastus +PS C:\> New-AzKubernetesConfiguration -ResourceGroupName azpstest_gp -ClusterName azpstest_cluster_arc -Name azpstestk8s -RepositoryUrl http://github.com/xxxx -ClusterType ConnectedClusters -Name Type ----- ---- -azpstestk8s01 Microsoft.KubernetesConfiguration/sourceControlConfigurations +Name RepositoryUrl ResourceGroupName +---- ------------- ----------------- +azpstestk8s http://github.com/xxxx azpstest_gp .Example -PS C:\> New-AzKubernetesConfiguration -ResourceGroupName azps_test_group -ClusterName azps_test_cluster -Name azpstestk8s02 -RepositoryUrl http://github.com/xxxx -OperatorNamespace namespace-t01 +PS C:\> New-AzConnectedKubernetes -ClusterName azpstest_cluster_arc -ResourceGroupName azpstest_gp -Location eastus +PS C:\> New-AzKubernetesConfiguration -ResourceGroupName azpstest_gp -ClusterName azpstest_cluster_arc -Name azpstestk8s-operator -RepositoryUrl http://github.com/xxxx -OperatorNamespace namespace-t01 -ClusterType ConnectedClusters -Name Type ----- ---- -azpstestk8s02 Microsoft.KubernetesConfiguration/sourceControlConfigurations +Name RepositoryUrl ResourceGroupName +---- ------------- ----------------- +azpstestk8s-operator http://github.com/xxxx azpstest_gp .Outputs -Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfiguration +Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfiguration .Link https://docs.microsoft.com/powershell/module/az.kubernetesconfiguration/new-azkubernetesconfiguration #> function New-AzKubernetesConfiguration { [Alias('New-AzK8sConfiguration')] -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfiguration])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfiguration])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -51,13 +53,15 @@ param( [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [System.String] - # The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or Microsoft.Kubernetes (for OnPrem K8S clusters). + # The Kubernetes cluster RP - i.e. + # Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. ${ClusterRp}, [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [System.String] - # The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or connectedClusters (for OnPrem K8S clusters). + # The Kubernetes cluster resource name - i.e. + # managedClusters, connectedClusters, provisionedClusters. ${ClusterType}, [Parameter(Mandatory)] @@ -71,20 +75,19 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [System.String] # The name of the resource group. + # The name is case insensitive. ${ResourceGroupName}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] - # The Azure subscription ID. - # This is a GUID-formatted string (e.g. - # 00000000-0000-0000-0000-000000000000) + # The ID of the target subscription. ${SubscriptionId}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IConfigurationProtectedSettings]))] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IConfigurationProtectedSettings]))] [System.Collections.Hashtable] # Name-value pairs of protected configuration settings for the configuration ${ConfigurationProtectedSetting}, @@ -207,6 +210,7 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + $mapping = @{ CreateExpanded = 'Az.KubernetesConfiguration.private\New-AzKubernetesConfiguration_CreateExpanded'; } @@ -219,6 +223,7 @@ begin { $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { + throw } } @@ -227,15 +232,18 @@ process { try { $steppablePipeline.Process($_) } catch { + throw } -} +} end { try { $steppablePipeline.End() + } catch { + throw } -} +} } diff --git a/src/KubernetesConfiguration/internal/New-AzKubernetesConfigurationFlux.ps1 b/src/KubernetesConfiguration/internal/New-AzKubernetesConfigurationFlux.ps1 new file mode 100644 index 000000000000..869d34a41ca2 --- /dev/null +++ b/src/KubernetesConfiguration/internal/New-AzKubernetesConfigurationFlux.ps1 @@ -0,0 +1,349 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create a new Kubernetes Flux Configuration. +.Description +Create a new Kubernetes Flux Configuration. +.Example +PS C:\> $kustomizations = @{ + infra=@{ + Name = "infra" + Path = "./infrastructure" + Prune = "true" + }; + apps=@{ + Name = "apps" + Path = "./apps/staging" + Prune = "true" + DependsOn = @("infra") + } +} +PS C:\> New-AzKubernetesConfigurationFlux -ClusterName azpstest_cluster_arc -ClusterType ConnectedClusters -Name azpstestflux-k8s -ResourceGroupName azpstest_gp -Namespace namespace-t01 -Scope 'cluster' -GitRepositoryUrl https://github.com/Azure/gitops-flux2-kustomize-helm-mt -RepositoryRefBranch main -SourceKind 'GitRepository' -GitRepositorySyncIntervalInSecond 600 -GitRepositoryTimeoutInSecond 600 -Suspend:$false -Kustomization $kustomizations + +Name ResourceGroupName +---- ----------------- +azpstestflux-k8s azpstest_gp + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfiguration +.Link +https://docs.microsoft.com/powershell/module/az.kubernetesconfiguration/new-azkubernetesconfigurationflux +#> +function New-AzKubernetesConfigurationFlux { +[Alias('New-AzK8sConfigurationFlux')] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfiguration])] +[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [System.String] + # The name of the kubernetes cluster. + ${ClusterName}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [System.String] + # The Kubernetes cluster RP - i.e. + # Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. + ${ClusterRp}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [System.String] + # The Kubernetes cluster resource name - i.e. + # managedClusters, connectedClusters, provisionedClusters. + ${ClusterType}, + + [Parameter(Mandatory)] + [Alias('FluxConfigurationName')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [System.String] + # Name of the Flux Configuration. + ${Name}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + ${SubscriptionId}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.Security.SecureString] + # Plaintext access key used to securely access the S3 bucket + ${BucketAccessKey}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Specify whether to use insecure communication when puling data from the S3 bucket. + ${BucketInsecure}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided configuration secrets. + ${BucketLocalAuthRef}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # The bucket name to sync from the url endpoint for the flux configuration. + ${BucketName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.Int64] + # The interval at which to re-reconcile the cluster git repository source with the remote. + ${BucketSyncIntervalInSecond}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.Int64] + # The maximum time to attempt to reconcile the cluster git repository source with the remote. + ${BucketTimeoutInSecond}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # The URL to sync for the flux configuration S3 bucket. + ${BucketUrl}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesConfigurationProtectedSettings]))] + [System.Collections.Hashtable] + # Key-value pairs of protected configuration settings for the configuration + ${ConfigurationProtectedSetting}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # Base64-encoded HTTPS certificate authority contents used to access git private git repositories over HTTPS + ${GitRepositoryHttpsCaCert}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # Plaintext HTTPS username used to access private git repositories over HTTPS + ${GitRepositoryHttpsUser}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided configuration secrets. + ${GitRepositoryLocalAuthRef}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # Base64-encoded known_hosts value containing public SSH keys required to access private git repositories over SSH + ${GitRepositorySshKnownHost}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.Int64] + # The interval at which to re-reconcile the cluster git repository source with the remote. + ${GitRepositorySyncIntervalInSecond}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.Int64] + # The maximum time to attempt to reconcile the cluster git repository source with the remote. + ${GitRepositoryTimeoutInSecond}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # The URL to sync for the flux configuration git repository. + ${GitRepositoryUrl}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesKustomizations]))] + [System.Collections.Hashtable] + # Array of kustomizations used to reconcile the artifact pulled by the source type on the cluster. + ${Kustomization}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # The namespace to which this configuration is installed to. + # Maximum of 253 lower case alphanumeric characters, hyphen and period only. + ${Namespace}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # The git repository branch name to checkout. + ${RepositoryRefBranch}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # The commit SHA to checkout. + # This value must be combined with the branch name to be valid. + # This takes precedence over semver. + ${RepositoryRefCommit}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # The semver range used to match against git repository tags. + # This takes precedence over tag. + ${RepositoryRefSemver}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # The git repository tag name to checkout. + # This takes precedence over branch. + ${RepositoryRefTag}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ScopeType])] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ScopeType] + # Scope at which the operator will be installed. + ${Scope}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType])] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType] + # Source Kind to pull the configuration data from. + ${SourceKind}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Whether this configuration should suspend its reconciliation of its kustomizations and sources. + ${Suspend}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.private\New-AzKubernetesConfigurationFlux_CreateExpanded'; + } + 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/KubernetesConfiguration/internal/New-AzKubernetesExtension.ps1 b/src/KubernetesConfiguration/internal/New-AzKubernetesExtension.ps1 index f464611d304b..a5f9fd69eea6 100644 --- a/src/KubernetesConfiguration/internal/New-AzKubernetesExtension.ps1 +++ b/src/KubernetesConfiguration/internal/New-AzKubernetesExtension.ps1 @@ -20,20 +20,26 @@ Create a new Kubernetes Cluster Extension. .Description Create a new Kubernetes Cluster Extension. .Example -PS C:\> New-AzKubernetesExtension -ClusterName azps_test_cluster -ClusterType ConnectedClusters -Name azps_test_extension -ResourceGroupName azps_test_group -ExtensionType Microsoft.Arcdataservices +PS C:\> New-AzKubernetesExtension -ClusterName azpstest_cluster_arc -ClusterType ConnectedClusters -Name azpstest-extension -ResourceGroupName azpstest_gp -ExtensionType azuremonitor-containers -Name ExtensionType Version ProvisioningState AutoUpgradeMinorVersion ReleaseTrain ResourceGroupName ----- ------------- ------- ----------------- ----------------------- ------------ ----------------- -azps_test_extension microsoft.arcdataservices 1.0.16701001 Succeeded True Stable azps_test_group +Name ExtensionType Version ProvisioningState AutoUpgradeMinorVersion ReleaseTrain +---- ------------- ------- ----------------- ----------------------- ------------ +azpstest-extension azuremonitor-containers 2.9.2 Succeeded True Stable +.Example +PS C:\> New-AzKubernetesExtension -ClusterName azpstest_cluster_arc -ClusterType ConnectedClusters -Name flux -ResourceGroupName azpstest_gp -ExtensionType microsoft.flux -AutoUpgradeMinorVersion -ClusterReleaseNamespace flux-system -IdentityType 'SystemAssigned' + +Name ExtensionType Version ProvisioningState AutoUpgradeMinorVersion ReleaseTrain +---- ------------- ------- ----------------- ----------------------- ------------ +flux microsoft.flux 1.0.0 Succeeded True Stable .Outputs -Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtension +Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtension .Link https://docs.microsoft.com/powershell/module/az.kubernetesconfiguration/new-azkubernetesextension #> function New-AzKubernetesExtension { [Alias('New-AzK8sExtension')] -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtension])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtension])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -45,13 +51,15 @@ param( [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [System.String] - # The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or Microsoft.Kubernetes (for OnPrem K8S clusters). + # The Kubernetes cluster RP - i.e. + # Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. ${ClusterRp}, [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [System.String] - # The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or connectedClusters (for OnPrem K8S clusters). + # The Kubernetes cluster resource name - i.e. + # managedClusters, connectedClusters, provisionedClusters. ${ClusterType}, [Parameter(Mandatory)] @@ -72,15 +80,13 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] - # The Azure subscription ID. - # This is a GUID-formatted string (e.g. - # 00000000-0000-0000-0000-000000000000) + # The ID of the target subscription. ${SubscriptionId}, [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ResourceIdentityType])] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.AksIdentityType])] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ResourceIdentityType] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.AksIdentityType] # The identity type. ${AkAssignedIdentityType}, @@ -99,14 +105,14 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesConfigurationProtectedSettings]))] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesConfigurationProtectedSettings]))] [System.Collections.Hashtable] # Configuration settings that are sensitive, as name-value pairs for configuring this extension. ${ConfigurationProtectedSetting}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesConfigurationSettings]))] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesConfigurationSettings]))] [System.Collections.Hashtable] # Configuration settings, as name-value pairs for configuring this extension. ${ConfigurationSetting}, @@ -142,8 +148,8 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] - # Version of the extension for this extension, if it is 'pinned' to a specific version. - # autoUpgradeMinorVersion must be 'false'. + # User-specified version of the extension for this extension to 'pin'. + # To use 'version', autoUpgradeMinorVersion must be 'false'. ${Version}, [Parameter()] @@ -213,6 +219,7 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + $mapping = @{ CreateExpanded = 'Az.KubernetesConfiguration.private\New-AzKubernetesExtension_CreateExpanded'; } @@ -225,6 +232,7 @@ begin { $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { + throw } } @@ -233,15 +241,18 @@ process { try { $steppablePipeline.Process($_) } catch { + throw } -} +} end { try { $steppablePipeline.End() + } catch { + throw } -} +} } diff --git a/src/KubernetesConfiguration/internal/ProxyCmdletDefinitions.ps1 b/src/KubernetesConfiguration/internal/ProxyCmdletDefinitions.ps1 index 30c292a28568..94abc78a218d 100644 --- a/src/KubernetesConfiguration/internal/ProxyCmdletDefinitions.ps1 +++ b/src/KubernetesConfiguration/internal/ProxyCmdletDefinitions.ps1 @@ -16,27 +16,20 @@ <# .Synopsis -Gets details of the Source Control Configuration. +Get Async Operation status .Description -Gets details of the Source Control Configuration. -.Example -PS C:\> Get-AzKubernetesConfiguration -ResourceGroupName azps_test_group -ClusterName azps_test_cluster -ClusterType ConnectedClusters - -Name Type ----- ---- -azpstestk8s01 Microsoft.KubernetesConfiguration/sourceControlConfigurations -azpstestk8s02 Microsoft.KubernetesConfiguration/sourceControlConfigurations +Get Async Operation status .Example -PS C:\> Get-AzKubernetesConfiguration -ResourceGroupName azps_test_group -ClusterName azps_test_cluster -ClusterType ConnectedClusters -Name azpstestk8s01 +PS C:\> Get-AzKubernetesConfigFluxOperationStatus -ClusterName azpstest_cluster_arc -ClusterType ConnectedClusters -FluxConfigurationName azpstestflux-k8s -ResourceGroupName azpstest_gp -OperationId e9871335-7ba8-4100-8cb4-73b3464eb863 -Name Type ----- ---- -azpstestk8s01 Microsoft.KubernetesConfiguration/sourceControlConfigurations +Name ResourceGroupName Status +---- ----------------- ------ +e9871335-7ba8-4100-8cb4-73b3464eb863 azpstest_gp Succeeded .Inputs Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfiguration +Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResult .Notes COMPLEX PARAMETER PROPERTIES @@ -44,65 +37,67 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ClusterName ]: The name of the kubernetes cluster. - [ClusterResourceName ]: The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or connectedClusters (for OnPrem K8S clusters). - [ClusterRp ]: The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or Microsoft.Kubernetes (for OnPrem K8S clusters). + [ClusterResourceName ]: The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. + [ClusterRp ]: The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. [ExtensionName ]: Name of the Extension. + [FluxConfigurationName ]: Name of the Flux Configuration. [Id ]: Resource identity path [OperationId ]: operation Id - [ResourceGroupName ]: The name of the resource group. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [SourceControlConfigurationName ]: Name of the Source Control Configuration. - [SubscriptionId ]: The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000) + [SubscriptionId ]: The ID of the target subscription. .Link -https://docs.microsoft.com/powershell/module/az.kubernetesconfiguration/get-azkubernetesconfiguration +https://docs.microsoft.com/powershell/module/az.kubernetesconfiguration/get-azkubernetesconfigfluxoperationstatus #> -function Get-AzKubernetesConfiguration { -[Alias('Get-AzK8sConfiguration')] -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfiguration])] -[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +function Get-AzKubernetesConfigFluxOperationStatus { +[Alias('Get-AzK8sConfigFluxOperationStatus')] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IOperationStatusResult])] +[CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] - [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [System.String] # The name of the kubernetes cluster. ${ClusterName}, [Parameter(ParameterSetName='Get', Mandatory)] - [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [System.String] - # The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or Microsoft.Kubernetes (for OnPrem K8S clusters). + # The Kubernetes cluster RP - i.e. + # Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. ${ClusterRp}, [Parameter(ParameterSetName='Get', Mandatory)] - [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [System.String] - # The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or connectedClusters (for OnPrem K8S clusters). + # The Kubernetes cluster resource name - i.e. + # managedClusters, connectedClusters, provisionedClusters. ${ClusterType}, [Parameter(ParameterSetName='Get', Mandatory)] - [Alias('SourceControlConfigurationName')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [System.String] - # Name of the Source Control Configuration. - ${Name}, + # Name of the Flux Configuration. + ${FluxConfigurationName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [System.String] + # operation Id + ${OperationId}, [Parameter(ParameterSetName='Get', Mandatory)] - [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [System.String] # The name of the resource group. + # The name is case insensitive. ${ResourceGroupName}, [Parameter(ParameterSetName='Get')] - [Parameter(ParameterSetName='List')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String[]] - # The Azure subscription ID. - # This is a GUID-formatted string (e.g. - # 00000000-0000-0000-0000-000000000000) + # The ID of the target subscription. ${SubscriptionId}, [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] @@ -167,12 +162,12 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + $mapping = @{ - Get = 'Az.KubernetesConfiguration.private\Get-AzKubernetesConfiguration_Get'; - GetViaIdentity = 'Az.KubernetesConfiguration.private\Get-AzKubernetesConfiguration_GetViaIdentity'; - List = 'Az.KubernetesConfiguration.private\Get-AzKubernetesConfiguration_List'; + Get = 'Az.KubernetesConfiguration.private\Get-AzKubernetesConfigFluxOperationStatus_Get'; + GetViaIdentity = 'Az.KubernetesConfiguration.private\Get-AzKubernetesConfigFluxOperationStatus_GetViaIdentity'; } - if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Get') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } @@ -181,6 +176,7 @@ begin { $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { + throw } } @@ -189,41 +185,44 @@ process { try { $steppablePipeline.Process($_) } catch { + throw } -} +} end { try { $steppablePipeline.End() + } catch { + throw } -} +} } <# .Synopsis -Gets Kubernetes Cluster Extension. +Gets details of the Flux Configuration. .Description -Gets Kubernetes Cluster Extension. +Gets details of the Flux Configuration. .Example -PS C:\> Get-AzKubernetesExtension -ClusterName azps_test_cluster -ClusterType ConnectedClusters -Name azps_test_extension -ResourceGroupName azps_test_group +PS C:\> Get-AzKubernetesConfigurationFlux -ClusterName azpstest_cluster_arc -ClusterType ConnectedClusters -ResourceGroupName azpstest_gp -Name ExtensionType Version ProvisioningState AutoUpgradeMinorVersion ReleaseTrain ResourceGroupName ----- ------------- ------- ----------------- ----------------------- ------------ ----------------- -azps_test_extension microsoft.arcdataservices 1.0.16701001 Succeeded True Stable azps_test_group +Name ResourceGroupName +---- ----------------- +azpstestflux-k8s azpstest_gp .Example -PS C:\> Get-AzKubernetesExtension -ClusterName azps_test_cluster -ClusterType ConnectedClusters -ResourceGroupName azps_test_group +PS C:\> Get-AzKubernetesConfigurationFlux -ClusterName azpstest_cluster_arc -ClusterType ConnectedClusters -Name azpstestflux-k8s -ResourceGroupName azpstest_gp -Name ExtensionType Version ProvisioningState AutoUpgradeMinorVersion ReleaseTrain ResourceGroupName ----- ------------- ------- ----------------- ----------------------- ------------ ----------------- -azps_test_extension microsoft.arcdataservices 1.0.16701001 Succeeded True Stable azps_test_group +Name ResourceGroupName +---- ----------------- +azpstestflux-k8s azpstest_gp .Inputs Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtension +Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfiguration .Notes COMPLEX PARAMETER PROPERTIES @@ -231,20 +230,21 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ClusterName ]: The name of the kubernetes cluster. - [ClusterResourceName ]: The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or connectedClusters (for OnPrem K8S clusters). - [ClusterRp ]: The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or Microsoft.Kubernetes (for OnPrem K8S clusters). + [ClusterResourceName ]: The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. + [ClusterRp ]: The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. [ExtensionName ]: Name of the Extension. + [FluxConfigurationName ]: Name of the Flux Configuration. [Id ]: Resource identity path [OperationId ]: operation Id - [ResourceGroupName ]: The name of the resource group. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [SourceControlConfigurationName ]: Name of the Source Control Configuration. - [SubscriptionId ]: The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000) + [SubscriptionId ]: The ID of the target subscription. .Link -https://docs.microsoft.com/powershell/module/az.kubernetesconfiguration/get-azkubernetesextension +https://docs.microsoft.com/powershell/module/az.kubernetesconfiguration/get-azkubernetesconfigurationflux #> -function Get-AzKubernetesExtension { -[Alias('Get-AzK8sExtension')] -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtension])] +function Get-AzKubernetesConfigurationFlux { +[Alias('Get-AzK8sConfigurationFlux')] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfiguration])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] @@ -258,21 +258,23 @@ param( [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [System.String] - # The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or Microsoft.Kubernetes (for OnPrem K8S clusters). + # The Kubernetes cluster RP - i.e. + # Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. ${ClusterRp}, [Parameter(ParameterSetName='Get', Mandatory)] [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [System.String] - # The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or connectedClusters (for OnPrem K8S clusters). + # The Kubernetes cluster resource name - i.e. + # managedClusters, connectedClusters, provisionedClusters. ${ClusterType}, [Parameter(ParameterSetName='Get', Mandatory)] - [Alias('ExtensionName')] + [Alias('FluxConfigurationName')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [System.String] - # Name of the Extension. + # Name of the Flux Configuration. ${Name}, [Parameter(ParameterSetName='Get', Mandatory)] @@ -288,9 +290,7 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String[]] - # The Azure subscription ID. - # This is a GUID-formatted string (e.g. - # 00000000-0000-0000-0000-000000000000) + # The ID of the target subscription. ${SubscriptionId}, [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] @@ -355,10 +355,11 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + $mapping = @{ - Get = 'Az.KubernetesConfiguration.private\Get-AzKubernetesExtension_Get'; - GetViaIdentity = 'Az.KubernetesConfiguration.private\Get-AzKubernetesExtension_GetViaIdentity'; - List = 'Az.KubernetesConfiguration.private\Get-AzKubernetesExtension_List'; + Get = 'Az.KubernetesConfiguration.private\Get-AzKubernetesConfigurationFlux_Get'; + GetViaIdentity = 'Az.KubernetesConfiguration.private\Get-AzKubernetesConfigurationFlux_GetViaIdentity'; + List = 'Az.KubernetesConfiguration.private\Get-AzKubernetesConfigurationFlux_List'; } if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id @@ -369,6 +370,7 @@ begin { $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { + throw } } @@ -377,44 +379,122 @@ process { try { $steppablePipeline.Process($_) } catch { + throw } -} +} end { try { $steppablePipeline.End() + } catch { + throw } -} +} } <# .Synopsis -List all the available operations the KubernetesConfiguration resource provider supports. +Gets details of the Source Control Configuration. .Description -List all the available operations the KubernetesConfiguration resource provider supports. +Gets details of the Source Control Configuration. .Example -PS C:\> {{ Add code here }} +PS C:\> Get-AzKubernetesConfiguration -ResourceGroupName azpstest_gp -ClusterName azpstest_cluster_arc -ClusterType ConnectedClusters -{{ Add output here }} +Name RepositoryUrl ResourceGroupName +---- ------------- ----------------- +azpstestk8s http://github.com/xxxx azpstest_gp +azpstestk8s-operator http://github.com/xxxx azpstest_gp .Example -PS C:\> {{ Add code here }} +PS C:\> Get-AzKubernetesConfiguration -ResourceGroupName azpstest_gp -ClusterName azpstest_cluster_arc -ClusterType ConnectedClusters -Name azpstestk8s -{{ Add output here }} +Name RepositoryUrl ResourceGroupName +---- ------------- ----------------- +azpstestk8s http://github.com/xxxx azpstest_gp +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IResourceProviderOperation -.Outputs -Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IResourceProviderOperationAutoGenerated +Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfiguration +.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. + [ClusterResourceName ]: The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. + [ClusterRp ]: The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. + [ExtensionName ]: Name of the Extension. + [FluxConfigurationName ]: Name of the Flux Configuration. + [Id ]: Resource identity path + [OperationId ]: operation Id + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SourceControlConfigurationName ]: Name of the Source Control Configuration. + [SubscriptionId ]: The ID of the target subscription. .Link -https://docs.microsoft.com/powershell/module/az.kubernetesconfiguration/get-azoperation +https://docs.microsoft.com/powershell/module/az.kubernetesconfiguration/get-azkubernetesconfiguration #> -function Get-AzOperation { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IResourceProviderOperation], [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IResourceProviderOperationAutoGenerated])] +function Get-AzKubernetesConfiguration { +[Alias('Get-AzK8sConfiguration')] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfiguration])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [System.String] + # The name of the kubernetes cluster. + ${ClusterName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [System.String] + # The Kubernetes cluster RP - i.e. + # Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. + ${ClusterRp}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [System.String] + # The Kubernetes cluster resource name - i.e. + # managedClusters, connectedClusters, provisionedClusters. + ${ClusterType}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Alias('SourceControlConfigurationName')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [System.String] + # Name of the Source Control Configuration. + ${Name}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -470,9 +550,14 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + $mapping = @{ - List = 'Az.KubernetesConfiguration.private\Get-AzOperation_List'; - List1 = 'Az.KubernetesConfiguration.private\Get-AzOperation_List1'; + Get = 'Az.KubernetesConfiguration.private\Get-AzKubernetesConfiguration_Get'; + GetViaIdentity = 'Az.KubernetesConfiguration.private\Get-AzKubernetesConfiguration_GetViaIdentity'; + List = 'Az.KubernetesConfiguration.private\Get-AzKubernetesConfiguration_List'; + } + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) @@ -480,6 +565,7 @@ begin { $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { + throw } } @@ -488,157 +574,236 @@ process { try { $steppablePipeline.Process($_) } catch { + throw } -} +} end { try { $steppablePipeline.End() + } catch { + throw } -} +} } <# .Synopsis -Create a new Kubernetes Source Control Configuration. +Gets Kubernetes Cluster Extension. .Description -Create a new Kubernetes Source Control Configuration. +Gets Kubernetes Cluster Extension. .Example -PS C:\> New-AzKubernetesConfiguration -ResourceGroupName azps_test_group -ClusterName azps_test_cluster -Name azpstestk8s01 -RepositoryUrl http://github.com/xxxx +PS C:\> Get-AzKubernetesExtension -ClusterName azpstest_cluster_arc -ClusterType ConnectedClusters -Name azpstest-extension -ResourceGroupName azpstest_gp -Name Type ----- ---- -azpstestk8s01 Microsoft.KubernetesConfiguration/sourceControlConfigurations +Name ExtensionType Version ProvisioningState AutoUpgradeMinorVersion ReleaseTrain +---- ------------- ------- ----------------- ----------------------- ------------ +azpstest-extension azuremonitor-containers 2.9.2 Succeeded True Stable .Example -PS C:\> New-AzKubernetesConfiguration -ResourceGroupName azps_test_group -ClusterName azps_test_cluster -Name azpstestk8s02 -RepositoryUrl http://github.com/xxxx -OperatorNamespace namespace-t01 +PS C:\> Get-AzKubernetesExtension -ClusterName azpstest_cluster_arc -ClusterType ConnectedClusters -ResourceGroupName azpstest_gp -Name Type ----- ---- -azpstestk8s02 Microsoft.KubernetesConfiguration/sourceControlConfigurations +Name ExtensionType Version ProvisioningState AutoUpgradeMinorVersion ReleaseTrain +---- ------------- ------- ----------------- ----------------------- ------------ +azpstest-extension azuremonitor-containers 2.9.2 Succeeded True Stable +flux microsoft.flux 1.0.0 Succeeded True Stable +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfiguration +Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtension +.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. + [ClusterResourceName ]: The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. + [ClusterRp ]: The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. + [ExtensionName ]: Name of the Extension. + [FluxConfigurationName ]: Name of the Flux Configuration. + [Id ]: Resource identity path + [OperationId ]: operation Id + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SourceControlConfigurationName ]: Name of the Source Control Configuration. + [SubscriptionId ]: The ID of the target subscription. .Link -https://docs.microsoft.com/powershell/module/az.kubernetesconfiguration/new-azkubernetesconfiguration +https://docs.microsoft.com/powershell/module/az.kubernetesconfiguration/get-azkubernetesextension #> -function New-AzKubernetesConfiguration { -[Alias('New-AzK8sConfiguration')] -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.ISourceControlConfiguration])] -[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +function Get-AzKubernetesExtension { +[Alias('Get-AzK8sExtension')] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtension])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( - [Parameter(Mandatory)] + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [System.String] # The name of the kubernetes cluster. ${ClusterName}, - [Parameter(Mandatory)] + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [System.String] - # The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or Microsoft.Kubernetes (for OnPrem K8S clusters). + # The Kubernetes cluster RP - i.e. + # Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. ${ClusterRp}, - [Parameter(Mandatory)] + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [System.String] - # The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or connectedClusters (for OnPrem K8S clusters). + # The Kubernetes cluster resource name - i.e. + # managedClusters, connectedClusters, provisionedClusters. ${ClusterType}, - [Parameter(Mandatory)] - [Alias('SourceControlConfigurationName')] + [Parameter(ParameterSetName='Get', Mandatory)] + [Alias('ExtensionName')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [System.String] - # Name of the Source Control Configuration. + # Name of the Extension. ${Name}, - [Parameter(Mandatory)] + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [System.String] # The name of the resource group. + # The name is case insensitive. ${ResourceGroupName}, - [Parameter()] + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='List')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] - [System.String] - # The Azure subscription ID. - # This is a GUID-formatted string (e.g. - # 00000000-0000-0000-0000-000000000000) + [System.String[]] + # The ID of the target subscription. ${SubscriptionId}, - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210301.IConfigurationProtectedSettings]))] - [System.Collections.Hashtable] - # Name-value pairs of protected configuration settings for the configuration - ${ConfigurationProtectedSetting}, + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] [System.Management.Automation.SwitchParameter] - # Option to enable Helm Operator for this git configuration. - ${EnableHelmOperator}, + # Wait for .NET debugger to attach + ${Break}, - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] - [System.String] - # Values override for the operator Helm chart. - ${HelmOperatorChartValue}, + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] - [System.String] - # Version of the operator Helm chart. - ${HelmOperatorChartVersion}, + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] - [System.String] - # Instance name of the operator - identifying the specific configuration. - ${OperatorInstanceName}, + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] - [System.String] - # The namespace to which this operator is installed to. - # Maximum of 253 lower case alphanumeric characters, hyphen and period only. - ${OperatorNamespace}, + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] - [System.String] - # Any Parameters for the Operator instance in string format. - ${OperatorParam}, + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) - [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.OperatorScopeType])] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.OperatorScopeType] - # Scope at which the operator will be installed. - ${OperatorScope}, +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName - [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.OperatorType])] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.OperatorType] - # Type of the operator - ${OperatorType}, + $mapping = @{ + Get = 'Az.KubernetesConfiguration.private\Get-AzKubernetesExtension_Get'; + GetViaIdentity = 'Az.KubernetesConfiguration.private\Get-AzKubernetesExtension_GetViaIdentity'; + List = 'Az.KubernetesConfiguration.private\Get-AzKubernetesExtension_List'; + } + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] - [System.String] - # Url of the SourceControl Repository. - ${RepositoryUrl}, + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] - [System.String] - # Base64-encoded known_hosts contents containing public SSH keys required to access private Git instances - ${SshKnownHost}, + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + + throw + } + +} +end { + try { + $steppablePipeline.End() + + } catch { + + throw + } +} +} + +<# +.Synopsis +List all the available operations the KubernetesConfiguration resource provider supports. +.Description +List all the available operations the KubernetesConfiguration resource provider supports. +.Example +{{ Add code here }} +.Example +{{ Add code here }} +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperation +.Link +https://docs.microsoft.com/powershell/module/az.kubernetesconfiguration/get-azoperation +#> +function Get-AzOperation { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IResourceProviderOperation])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -694,11 +859,9 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + $mapping = @{ - CreateExpanded = 'Az.KubernetesConfiguration.private\New-AzKubernetesConfiguration_CreateExpanded'; - } - if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + List = 'Az.KubernetesConfiguration.private\Get-AzOperation_List'; } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) @@ -706,6 +869,7 @@ begin { $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { + throw } } @@ -714,39 +878,55 @@ process { try { $steppablePipeline.Process($_) } catch { + throw } -} +} end { try { $steppablePipeline.End() + } catch { + throw } -} +} } <# .Synopsis -Create a new Kubernetes Cluster Extension. +Create a new Kubernetes Flux Configuration. .Description -Create a new Kubernetes Cluster Extension. +Create a new Kubernetes Flux Configuration. .Example -PS C:\> New-AzKubernetesExtension -ClusterName azps_test_cluster -ClusterType ConnectedClusters -Name azps_test_extension -ResourceGroupName azps_test_group -ExtensionType Microsoft.Arcdataservices +PS C:\> $kustomizations = @{ + infra=@{ + Name = "infra" + Path = "./infrastructure" + Prune = "true" + }; + apps=@{ + Name = "apps" + Path = "./apps/staging" + Prune = "true" + DependsOn = @("infra") + } +} +PS C:\> New-AzKubernetesConfigurationFlux -ClusterName azpstest_cluster_arc -ClusterType ConnectedClusters -Name azpstestflux-k8s -ResourceGroupName azpstest_gp -Namespace namespace-t01 -Scope 'cluster' -GitRepositoryUrl https://github.com/Azure/gitops-flux2-kustomize-helm-mt -RepositoryRefBranch main -SourceKind 'GitRepository' -GitRepositorySyncIntervalInSecond 600 -GitRepositoryTimeoutInSecond 600 -Suspend:$false -Kustomization $kustomizations -Name ExtensionType Version ProvisioningState AutoUpgradeMinorVersion ReleaseTrain ResourceGroupName ----- ------------- ------- ----------------- ----------------------- ------------ ----------------- -azps_test_extension microsoft.arcdataservices 1.0.16701001 Succeeded True Stable azps_test_group +Name ResourceGroupName +---- ----------------- +azpstestflux-k8s azpstest_gp .Outputs -Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtension +Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfiguration .Link -https://docs.microsoft.com/powershell/module/az.kubernetesconfiguration/new-azkubernetesextension +https://docs.microsoft.com/powershell/module/az.kubernetesconfiguration/new-azkubernetesconfigurationflux #> -function New-AzKubernetesExtension { -[Alias('New-AzK8sExtension')] -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtension])] +function New-AzKubernetesConfigurationFlux { +[Alias('New-AzK8sConfigurationFlux')] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfiguration])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -758,20 +938,22 @@ param( [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [System.String] - # The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or Microsoft.Kubernetes (for OnPrem K8S clusters). + # The Kubernetes cluster RP - i.e. + # Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. ${ClusterRp}, [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [System.String] - # The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or connectedClusters (for OnPrem K8S clusters). + # The Kubernetes cluster resource name - i.e. + # managedClusters, connectedClusters, provisionedClusters. ${ClusterType}, [Parameter(Mandatory)] - [Alias('ExtensionName')] + [Alias('FluxConfigurationName')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [System.String] - # Name of the Extension. + # Name of the Flux Configuration. ${Name}, [Parameter(Mandatory)] @@ -785,79 +967,161 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] - # The Azure subscription ID. - # This is a GUID-formatted string (e.g. - # 00000000-0000-0000-0000-000000000000) + # The ID of the target subscription. ${SubscriptionId}, [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ResourceIdentityType])] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ResourceIdentityType] - # The identity type. - ${AkAssignedIdentityType}, + [System.Security.SecureString] + # Plaintext access key used to securely access the S3 bucket + ${BucketAccessKey}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.Management.Automation.SwitchParameter] - # Flag to note if this extension participates in auto upgrade of minor version, or not. - ${AutoUpgradeMinorVersion}, + # Specify whether to use insecure communication when puling data from the S3 bucket. + ${BucketInsecure}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] - # Namespace where the extension Release must be placed, for a Cluster scoped extension. - # If this namespace does not exist, it will be created - ${ClusterReleaseNamespace}, + # Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided configuration secrets. + ${BucketLocalAuthRef}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # The bucket name to sync from the url endpoint for the flux configuration. + ${BucketName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.Int64] + # The interval at which to re-reconcile the cluster git repository source with the remote. + ${BucketSyncIntervalInSecond}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.Int64] + # The maximum time to attempt to reconcile the cluster git repository source with the remote. + ${BucketTimeoutInSecond}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # The URL to sync for the flux configuration S3 bucket. + ${BucketUrl}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesConfigurationProtectedSettings]))] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesConfigurationProtectedSettings]))] [System.Collections.Hashtable] - # Configuration settings that are sensitive, as name-value pairs for configuring this extension. + # Key-value pairs of protected configuration settings for the configuration ${ConfigurationProtectedSetting}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtensionPropertiesConfigurationSettings]))] + [System.String] + # Base64-encoded HTTPS certificate authority contents used to access git private git repositories over HTTPS + ${GitRepositoryHttpsCaCert}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # Plaintext HTTPS username used to access private git repositories over HTTPS + ${GitRepositoryHttpsUser}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided configuration secrets. + ${GitRepositoryLocalAuthRef}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # Base64-encoded known_hosts value containing public SSH keys required to access private git repositories over SSH + ${GitRepositorySshKnownHost}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.Int64] + # The interval at which to re-reconcile the cluster git repository source with the remote. + ${GitRepositorySyncIntervalInSecond}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.Int64] + # The maximum time to attempt to reconcile the cluster git repository source with the remote. + ${GitRepositoryTimeoutInSecond}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # The URL to sync for the flux configuration git repository. + ${GitRepositoryUrl}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesKustomizations]))] [System.Collections.Hashtable] - # Configuration settings, as name-value pairs for configuring this extension. - ${ConfigurationSetting}, + # Array of kustomizations used to reconcile the artifact pulled by the source type on the cluster. + ${Kustomization}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] - # Type of the Extension, of which this resource is an instance of. - # It must be one of the Extension Types registered with Microsoft.KubernetesConfiguration by the Extension publisher. - ${ExtensionType}, + # The namespace to which this configuration is installed to. + # Maximum of 253 lower case alphanumeric characters, hyphen and period only. + ${Namespace}, [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ResourceIdentityType])] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ResourceIdentityType] - # The identity type. - ${IdentityType}, + [System.String] + # The git repository branch name to checkout. + ${RepositoryRefBranch}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] - # Namespace where the extension will be created for an Namespace scoped extension. - # If this namespace does not exist, it will be created - ${NamespaceTargetNamespace}, + # The commit SHA to checkout. + # This value must be combined with the branch name to be valid. + # This takes precedence over semver. + ${RepositoryRefCommit}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] - # ReleaseTrain this extension participates in for auto-upgrade (e.g. - # Stable, Preview, etc.) - only if autoUpgradeMinorVersion is 'true'. - ${ReleaseTrain}, + # The semver range used to match against git repository tags. + # This takes precedence over tag. + ${RepositoryRefSemver}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] - # Version of the extension for this extension, if it is 'pinned' to a specific version. - # autoUpgradeMinorVersion must be 'false'. - ${Version}, + # The git repository tag name to checkout. + # This takes precedence over branch. + ${RepositoryRefTag}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ScopeType])] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ScopeType] + # Scope at which the operator will be installed. + ${Scope}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType])] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType] + # Source Kind to pull the configuration data from. + ${SourceKind}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Whether this configuration should suspend its reconciliation of its kustomizations and sources. + ${Suspend}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] @@ -926,8 +1190,9 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + $mapping = @{ - CreateExpanded = 'Az.KubernetesConfiguration.private\New-AzKubernetesExtension_CreateExpanded'; + CreateExpanded = 'Az.KubernetesConfiguration.private\New-AzKubernetesConfigurationFlux_CreateExpanded'; } if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id @@ -938,6 +1203,7 @@ begin { $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { + throw } } @@ -946,105 +1212,1323 @@ process { try { $steppablePipeline.Process($_) } catch { + throw } -} +} end { try { $steppablePipeline.End() + } catch { + throw } +} } -} -<# -.Synopsis -This will delete the YAML file used to set up the Source control configuration, thus stopping future sync from the source repo. -.Description -This will delete the YAML file used to set up the Source control configuration, thus stopping future sync from the source repo. -.Example -PS C:\> Remove-AzKubernetesConfiguration -ResourceGroupName azps_test_group -ClusterName azps_test_cluster -Name azpstestk8s01 -ClusterType ConnectedClusters +<# +.Synopsis +Create a new Kubernetes Source Control Configuration. +.Description +Create a new Kubernetes Source Control Configuration. +.Example +PS C:\> New-AzConnectedKubernetes -ClusterName azpstest_cluster_arc -ResourceGroupName azpstest_gp -Location eastus +PS C:\> New-AzKubernetesConfiguration -ResourceGroupName azpstest_gp -ClusterName azpstest_cluster_arc -Name azpstestk8s -RepositoryUrl http://github.com/xxxx -ClusterType ConnectedClusters + +Name RepositoryUrl ResourceGroupName +---- ------------- ----------------- +azpstestk8s http://github.com/xxxx azpstest_gp +.Example +PS C:\> New-AzConnectedKubernetes -ClusterName azpstest_cluster_arc -ResourceGroupName azpstest_gp -Location eastus +PS C:\> New-AzKubernetesConfiguration -ResourceGroupName azpstest_gp -ClusterName azpstest_cluster_arc -Name azpstestk8s-operator -RepositoryUrl http://github.com/xxxx -OperatorNamespace namespace-t01 -ClusterType ConnectedClusters + +Name RepositoryUrl ResourceGroupName +---- ------------- ----------------- +azpstestk8s-operator http://github.com/xxxx azpstest_gp + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfiguration +.Link +https://docs.microsoft.com/powershell/module/az.kubernetesconfiguration/new-azkubernetesconfiguration +#> +function New-AzKubernetesConfiguration { +[Alias('New-AzK8sConfiguration')] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.ISourceControlConfiguration])] +[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [System.String] + # The name of the kubernetes cluster. + ${ClusterName}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [System.String] + # The Kubernetes cluster RP - i.e. + # Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. + ${ClusterRp}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [System.String] + # The Kubernetes cluster resource name - i.e. + # managedClusters, connectedClusters, provisionedClusters. + ${ClusterType}, + + [Parameter(Mandatory)] + [Alias('SourceControlConfigurationName')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [System.String] + # Name of the Source Control Configuration. + ${Name}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + ${SubscriptionId}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IConfigurationProtectedSettings]))] + [System.Collections.Hashtable] + # Name-value pairs of protected configuration settings for the configuration + ${ConfigurationProtectedSetting}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Option to enable Helm Operator for this git configuration. + ${EnableHelmOperator}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # Values override for the operator Helm chart. + ${HelmOperatorChartValue}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # Version of the operator Helm chart. + ${HelmOperatorChartVersion}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # Instance name of the operator - identifying the specific configuration. + ${OperatorInstanceName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # The namespace to which this operator is installed to. + # Maximum of 253 lower case alphanumeric characters, hyphen and period only. + ${OperatorNamespace}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # Any Parameters for the Operator instance in string format. + ${OperatorParam}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.OperatorScopeType])] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.OperatorScopeType] + # Scope at which the operator will be installed. + ${OperatorScope}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.OperatorType])] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.OperatorType] + # Type of the operator + ${OperatorType}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # Url of the SourceControl Repository. + ${RepositoryUrl}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # Base64-encoded known_hosts contents containing public SSH keys required to access private Git instances + ${SshKnownHost}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.private\New-AzKubernetesConfiguration_CreateExpanded'; + } + 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 + } +} +} + +<# +.Synopsis +Create a new Kubernetes Cluster Extension. +.Description +Create a new Kubernetes Cluster Extension. +.Example +PS C:\> New-AzKubernetesExtension -ClusterName azpstest_cluster_arc -ClusterType ConnectedClusters -Name azpstest-extension -ResourceGroupName azpstest_gp -ExtensionType azuremonitor-containers + +Name ExtensionType Version ProvisioningState AutoUpgradeMinorVersion ReleaseTrain +---- ------------- ------- ----------------- ----------------------- ------------ +azpstest-extension azuremonitor-containers 2.9.2 Succeeded True Stable +.Example +PS C:\> New-AzKubernetesExtension -ClusterName azpstest_cluster_arc -ClusterType ConnectedClusters -Name flux -ResourceGroupName azpstest_gp -ExtensionType microsoft.flux -AutoUpgradeMinorVersion -ClusterReleaseNamespace flux-system -IdentityType 'SystemAssigned' + +Name ExtensionType Version ProvisioningState AutoUpgradeMinorVersion ReleaseTrain +---- ------------- ------- ----------------- ----------------------- ------------ +flux microsoft.flux 1.0.0 Succeeded True Stable + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtension +.Link +https://docs.microsoft.com/powershell/module/az.kubernetesconfiguration/new-azkubernetesextension +#> +function New-AzKubernetesExtension { +[Alias('New-AzK8sExtension')] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtension])] +[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [System.String] + # The name of the kubernetes cluster. + ${ClusterName}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [System.String] + # The Kubernetes cluster RP - i.e. + # Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. + ${ClusterRp}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [System.String] + # The Kubernetes cluster resource name - i.e. + # managedClusters, connectedClusters, provisionedClusters. + ${ClusterType}, + + [Parameter(Mandatory)] + [Alias('ExtensionName')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [System.String] + # Name of the Extension. + ${Name}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + ${SubscriptionId}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.AksIdentityType])] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.AksIdentityType] + # The identity type. + ${AkAssignedIdentityType}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Flag to note if this extension participates in auto upgrade of minor version, or not. + ${AutoUpgradeMinorVersion}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # Namespace where the extension Release must be placed, for a Cluster scoped extension. + # If this namespace does not exist, it will be created + ${ClusterReleaseNamespace}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesConfigurationProtectedSettings]))] + [System.Collections.Hashtable] + # Configuration settings that are sensitive, as name-value pairs for configuring this extension. + ${ConfigurationProtectedSetting}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtensionPropertiesConfigurationSettings]))] + [System.Collections.Hashtable] + # Configuration settings, as name-value pairs for configuring this extension. + ${ConfigurationSetting}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # Type of the Extension, of which this resource is an instance of. + # It must be one of the Extension Types registered with Microsoft.KubernetesConfiguration by the Extension publisher. + ${ExtensionType}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ResourceIdentityType])] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ResourceIdentityType] + # The identity type. + ${IdentityType}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # Namespace where the extension will be created for an Namespace scoped extension. + # If this namespace does not exist, it will be created + ${NamespaceTargetNamespace}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # ReleaseTrain this extension participates in for auto-upgrade (e.g. + # Stable, Preview, etc.) - only if autoUpgradeMinorVersion is 'true'. + ${ReleaseTrain}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # User-specified version of the extension for this extension to 'pin'. + # To use 'version', autoUpgradeMinorVersion must be 'false'. + ${Version}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.private\New-AzKubernetesExtension_CreateExpanded'; + } + 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 + } +} +} + +<# +.Synopsis +This will delete the YAML file used to set up the Flux Configuration, thus stopping future sync from the source repo. +.Description +This will delete the YAML file used to set up the Flux Configuration, thus stopping future sync from the source repo. +.Example +PS C:\> Remove-AzKubernetesConfigurationFlux -ClusterName azpstest_cluster_arc -ClusterType ConnectedClusters -Name azpstestflux-k8s -ResourceGroupName azpstest_gp + +.Example +PS C:\> Get-AzKubernetesConfigurationFlux -ClusterName azpstest_cluster_arc -ClusterType ConnectedClusters -Name azpstestflux-k8s -ResourceGroupName azpstest_gp | Remove-AzKubernetesConfigurationFlux + + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentity +.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. + [ClusterResourceName ]: The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. + [ClusterRp ]: The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. + [ExtensionName ]: Name of the Extension. + [FluxConfigurationName ]: Name of the Flux Configuration. + [Id ]: Resource identity path + [OperationId ]: operation Id + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SourceControlConfigurationName ]: Name of the Source Control Configuration. + [SubscriptionId ]: The ID of the target subscription. +.Link +https://docs.microsoft.com/powershell/module/az.kubernetesconfiguration/remove-azkubernetesconfigurationflux +#> +function Remove-AzKubernetesConfigurationFlux { +[Alias('Remove-AzK8sConfigurationFlux')] +[OutputType([System.Boolean])] +[CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Delete', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [System.String] + # The name of the kubernetes cluster. + ${ClusterName}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [System.String] + # The Kubernetes cluster RP - i.e. + # Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. + ${ClusterRp}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [System.String] + # The Kubernetes cluster resource name - i.e. + # managedClusters, connectedClusters, provisionedClusters. + ${ClusterType}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [Alias('FluxConfigurationName')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [System.String] + # Name of the Flux Configuration. + ${Name}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Delete')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Query')] + [System.Management.Automation.SwitchParameter] + # Delete the extension resource in Azure - not the normal asynchronous delete. + ${ForceDelete}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Returns true when the command succeeds + ${PassThru}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.private\Remove-AzKubernetesConfigurationFlux_Delete'; + DeleteViaIdentity = 'Az.KubernetesConfiguration.private\Remove-AzKubernetesConfigurationFlux_DeleteViaIdentity'; + } + 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 + } +} +} + +<# +.Synopsis +This will delete the YAML file used to set up the Source control configuration, thus stopping future sync from the source repo. +.Description +This will delete the YAML file used to set up the Source control configuration, thus stopping future sync from the source repo. +.Example +PS C:\> Remove-AzKubernetesConfiguration -ResourceGroupName azpstest_gp -ClusterName azpstest_cluster_arc -Name azpstestk8s -ClusterType ConnectedClusters + +.Example +PS C:\> $kubConf = Get-AzKubernetesConfiguration -ClusterName azpstest_cluster_arc -ClusterType ConnectedClusters -ResourceGroupName azpstest_gp -Name azpstestk8s-operator +Remove-AzKubernetesConfiguration -InputObject $kubConf + + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentity +.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. + [ClusterResourceName ]: The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. + [ClusterRp ]: The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. + [ExtensionName ]: Name of the Extension. + [FluxConfigurationName ]: Name of the Flux Configuration. + [Id ]: Resource identity path + [OperationId ]: operation Id + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SourceControlConfigurationName ]: Name of the Source Control Configuration. + [SubscriptionId ]: The ID of the target subscription. +.Link +https://docs.microsoft.com/powershell/module/az.kubernetesconfiguration/remove-azkubernetesconfiguration +#> +function Remove-AzKubernetesConfiguration { +[Alias('Remove-AzK8sConfiguration')] +[OutputType([System.Boolean])] +[CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Delete', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [System.String] + # The name of the kubernetes cluster. + ${ClusterName}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [System.String] + # The Kubernetes cluster RP - i.e. + # Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. + ${ClusterRp}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [System.String] + # The Kubernetes cluster resource name - i.e. + # managedClusters, connectedClusters, provisionedClusters. + ${ClusterType}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [Alias('SourceControlConfigurationName')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [System.String] + # Name of the Source Control Configuration. + ${Name}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Delete')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentity] + # 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.KubernetesConfiguration.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Returns true when the command succeeds + ${PassThru}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.private\Remove-AzKubernetesConfiguration_Delete'; + DeleteViaIdentity = 'Az.KubernetesConfiguration.private\Remove-AzKubernetesConfiguration_DeleteViaIdentity'; + } + 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 + } +} +} + +<# +.Synopsis +Delete a Kubernetes Cluster Extension. +This will cause the Agent to Uninstall the extension from the cluster. +.Description +Delete a Kubernetes Cluster Extension. +This will cause the Agent to Uninstall the extension from the cluster. +.Example +PS C:\> Remove-AzKubernetesExtension -ClusterName azpstest_cluster_arc -ClusterType ConnectedClusters -Name azpstest-extension -ResourceGroupName azpstest_gp + + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentity +.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. + [ClusterResourceName ]: The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. + [ClusterRp ]: The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. + [ExtensionName ]: Name of the Extension. + [FluxConfigurationName ]: Name of the Flux Configuration. + [Id ]: Resource identity path + [OperationId ]: operation Id + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SourceControlConfigurationName ]: Name of the Source Control Configuration. + [SubscriptionId ]: The ID of the target subscription. +.Link +https://docs.microsoft.com/powershell/module/az.kubernetesconfiguration/remove-azkubernetesextension +#> +function Remove-AzKubernetesExtension { +[Alias('Remove-AzK8sExtension')] +[OutputType([System.Boolean])] +[CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Delete', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [System.String] + # The name of the kubernetes cluster. + ${ClusterName}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [System.String] + # The Kubernetes cluster RP - i.e. + # Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. + ${ClusterRp}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [System.String] + # The Kubernetes cluster resource name - i.e. + # managedClusters, connectedClusters, provisionedClusters. + ${ClusterType}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [Alias('ExtensionName')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [System.String] + # Name of the Extension. + ${Name}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Delete')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Query')] + [System.Management.Automation.SwitchParameter] + # Delete the extension resource in Azure - not the normal asynchronous delete. + ${ForceDelete}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Returns true when the command succeeds + ${PassThru}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.private\Remove-AzKubernetesExtension_Delete'; + DeleteViaIdentity = 'Az.KubernetesConfiguration.private\Remove-AzKubernetesExtension_DeleteViaIdentity'; + } + 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 + } +} +} + +<# +.Synopsis +Create a new Kubernetes Flux Configuration. +.Description +Create a new Kubernetes Flux Configuration. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfiguration +.Link +https://docs.microsoft.com/powershell/module/az.kubernetesconfiguration/set-azkubernetesconfigurationflux +#> +function Set-AzKubernetesConfigurationFlux { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfiguration])] +[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [System.String] + # The name of the kubernetes cluster. + ${ClusterName}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [System.String] + # The Kubernetes cluster RP - i.e. + # Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. + ${ClusterRp}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [System.String] + # The Kubernetes cluster resource name - i.e. + # managedClusters, connectedClusters, provisionedClusters. + ${ClusterType}, + + [Parameter(Mandatory)] + [Alias('FluxConfigurationName')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [System.String] + # Name of the Flux Configuration. + ${Name}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + ${SubscriptionId}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.Security.SecureString] + # Plaintext access key used to securely access the S3 bucket + ${BucketAccessKey}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Specify whether to use insecure communication when puling data from the S3 bucket. + ${BucketInsecure}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided configuration secrets. + ${BucketLocalAuthRef}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # The bucket name to sync from the url endpoint for the flux configuration. + ${BucketName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.Int64] + # The interval at which to re-reconcile the cluster git repository source with the remote. + ${BucketSyncIntervalInSecond}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.Int64] + # The maximum time to attempt to reconcile the cluster git repository source with the remote. + ${BucketTimeoutInSecond}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # The URL to sync for the flux configuration S3 bucket. + ${BucketUrl}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesConfigurationProtectedSettings]))] + [System.Collections.Hashtable] + # Key-value pairs of protected configuration settings for the configuration + ${ConfigurationProtectedSetting}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # Base64-encoded HTTPS certificate authority contents used to access git private git repositories over HTTPS + ${GitRepositoryHttpsCaCert}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # Plaintext HTTPS username used to access private git repositories over HTTPS + ${GitRepositoryHttpsUser}, -.Example -PS C:\> $kubConf = Get-AzKubernetesConfiguration -ClusterName azps_test_cluster -ClusterType ConnectedClusters -ResourceGroupName azps_test_group -Name azpstestk8s02 -PS C:\> Remove-AzKubernetesConfiguration -InputObject $kubConf + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided configuration secrets. + ${GitRepositoryLocalAuthRef}, + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # Base64-encoded known_hosts value containing public SSH keys required to access private git repositories over SSH + ${GitRepositorySshKnownHost}, -.Inputs -Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentity -.Outputs -System.Boolean -.Notes -COMPLEX PARAMETER PROPERTIES + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.Int64] + # The interval at which to re-reconcile the cluster git repository source with the remote. + ${GitRepositorySyncIntervalInSecond}, -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. + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.Int64] + # The maximum time to attempt to reconcile the cluster git repository source with the remote. + ${GitRepositoryTimeoutInSecond}, -INPUTOBJECT : Identity Parameter - [ClusterName ]: The name of the kubernetes cluster. - [ClusterResourceName ]: The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or connectedClusters (for OnPrem K8S clusters). - [ClusterRp ]: The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or Microsoft.Kubernetes (for OnPrem K8S clusters). - [ExtensionName ]: Name of the Extension. - [Id ]: Resource identity path - [OperationId ]: operation Id - [ResourceGroupName ]: The name of the resource group. - [SourceControlConfigurationName ]: Name of the Source Control Configuration. - [SubscriptionId ]: The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000) -.Link -https://docs.microsoft.com/powershell/module/az.kubernetesconfiguration/remove-azkubernetesconfiguration -#> -function Remove-AzKubernetesConfiguration { -[Alias('Remove-AzK8sConfiguration')] -[OutputType([System.Boolean])] -[CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] -param( - [Parameter(ParameterSetName='Delete', Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] - # The name of the kubernetes cluster. - ${ClusterName}, + # The URL to sync for the flux configuration git repository. + ${GitRepositoryUrl}, - [Parameter(ParameterSetName='Delete', Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesKustomizations]))] + [System.Collections.Hashtable] + # Array of kustomizations used to reconcile the artifact pulled by the source type on the cluster. + ${Kustomization}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] - # The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or Microsoft.Kubernetes (for OnPrem K8S clusters). - ${ClusterRp}, + # The namespace to which this configuration is installed to. + # Maximum of 253 lower case alphanumeric characters, hyphen and period only. + ${Namespace}, - [Parameter(ParameterSetName='Delete', Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] - # The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or connectedClusters (for OnPrem K8S clusters). - ${ClusterType}, + # The git repository branch name to checkout. + ${RepositoryRefBranch}, - [Parameter(ParameterSetName='Delete', Mandatory)] - [Alias('SourceControlConfigurationName')] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] - # Name of the Source Control Configuration. - ${Name}, + # The commit SHA to checkout. + # This value must be combined with the branch name to be valid. + # This takes precedence over semver. + ${RepositoryRefCommit}, - [Parameter(ParameterSetName='Delete', Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] - # The name of the resource group. - ${ResourceGroupName}, + # The semver range used to match against git repository tags. + # This takes precedence over tag. + ${RepositoryRefSemver}, - [Parameter(ParameterSetName='Delete')] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.String] - # The Azure subscription ID. - # This is a GUID-formatted string (e.g. - # 00000000-0000-0000-0000-000000000000) - ${SubscriptionId}, + # The git repository tag name to checkout. + # This takes precedence over branch. + ${RepositoryRefTag}, - [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentity] - # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. - ${InputObject}, + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ScopeType])] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ScopeType] + # Scope at which the operator will be installed. + ${Scope}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType])] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType] + # Source Kind to pull the configuration data from. + ${SourceKind}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Whether this configuration should suspend its reconciliation of its kustomizations and sources. + ${Suspend}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] @@ -1086,12 +2570,6 @@ param( # Run the command asynchronously ${NoWait}, - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] - [System.Management.Automation.SwitchParameter] - # Returns true when the command succeeds - ${PassThru}, - [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] [System.Uri] @@ -1119,11 +2597,11 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + $mapping = @{ - Delete = 'Az.KubernetesConfiguration.private\Remove-AzKubernetesConfiguration_Delete'; - DeleteViaIdentity = 'Az.KubernetesConfiguration.private\Remove-AzKubernetesConfiguration_DeleteViaIdentity'; + UpdateExpanded = 'Az.KubernetesConfiguration.private\Set-AzKubernetesConfigurationFlux_UpdateExpanded'; } - if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } @@ -1132,6 +2610,7 @@ begin { $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { + throw } } @@ -1140,34 +2619,44 @@ process { try { $steppablePipeline.Process($_) } catch { + throw } -} +} end { try { $steppablePipeline.End() + } catch { + throw } -} +} } <# .Synopsis -Delete a Kubernetes Cluster Extension. -This will cause the Agent to Uninstall the extension from the cluster. +Update an existing Kubernetes Flux Configuration. .Description -Delete a Kubernetes Cluster Extension. -This will cause the Agent to Uninstall the extension from the cluster. +Update an existing Kubernetes Flux Configuration. +.Example +PS C:\> Update-AzKubernetesConfigurationFlux -ClusterName azpstest_cluster_arc -ClusterType ConnectedClusters -Name azpstestflux-k8s -ResourceGroupName azpstest_gp -GitRepositoryUrl https://github.com/fluxcd/flux2-kustomize-helm-example -RepositoryRefBranch main -SourceKind 'GitRepository' -GitRepositorySyncIntervalInSecond 600 -GitRepositoryTimeoutInSecond 600 -Suspend:$false + +Name ResourceGroupName +---- ----------------- +azpstestflux-k8s azpstest_gp .Example -PS C:\> Remove-AzKubernetesExtension -ClusterName azps_test_cluster -ClusterType ConnectedClusters -Name azps_test_extension -ResourceGroupName azps_test_group +PS C:\> Get-AzKubernetesConfigurationFlux -ClusterName azpstest_cluster_arc -ClusterType ConnectedClusters -Name azpstestflux-k8s -ResourceGroupName azpstest_gp | Update-AzKubernetesConfigurationFlux -GitRepositoryUrl https://github.com/fluxcd/flux2-kustomize-helm-example -RepositoryRefBranch main -SourceKind 'GitRepository' -GitRepositorySyncIntervalInSecond 600 -GitRepositoryTimeoutInSecond 600 -Suspend:$false +Name ResourceGroupName +---- ----------------- +azpstestflux-k8s azpstest_gp .Inputs Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentity .Outputs -System.Boolean +Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfiguration .Notes COMPLEX PARAMETER PROPERTIES @@ -1175,64 +2664,65 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ClusterName ]: The name of the kubernetes cluster. - [ClusterResourceName ]: The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or connectedClusters (for OnPrem K8S clusters). - [ClusterRp ]: The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or Microsoft.Kubernetes (for OnPrem K8S clusters). + [ClusterResourceName ]: The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. + [ClusterRp ]: The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. [ExtensionName ]: Name of the Extension. + [FluxConfigurationName ]: Name of the Flux Configuration. [Id ]: Resource identity path [OperationId ]: operation Id - [ResourceGroupName ]: The name of the resource group. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [SourceControlConfigurationName ]: Name of the Source Control Configuration. - [SubscriptionId ]: The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000) + [SubscriptionId ]: The ID of the target subscription. .Link -https://docs.microsoft.com/powershell/module/az.kubernetesconfiguration/remove-azkubernetesextension +https://docs.microsoft.com/powershell/module/az.kubernetesconfiguration/update-azkubernetesconfigurationflux #> -function Remove-AzKubernetesExtension { -[Alias('Remove-AzK8sExtension')] -[OutputType([System.Boolean])] -[CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +function Update-AzKubernetesConfigurationFlux { +[Alias('Update-AzK8sConfigurationFlux')] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfiguration])] +[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( - [Parameter(ParameterSetName='Delete', Mandatory)] + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [System.String] # The name of the kubernetes cluster. ${ClusterName}, - [Parameter(ParameterSetName='Delete', Mandatory)] + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [System.String] - # The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or Microsoft.Kubernetes (for OnPrem K8S clusters). + # The Kubernetes cluster RP - i.e. + # Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. ${ClusterRp}, - [Parameter(ParameterSetName='Delete', Mandatory)] + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [System.String] - # The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or connectedClusters (for OnPrem K8S clusters). + # The Kubernetes cluster resource name - i.e. + # managedClusters, connectedClusters, provisionedClusters. ${ClusterType}, - [Parameter(ParameterSetName='Delete', Mandatory)] - [Alias('ExtensionName')] + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Alias('FluxConfigurationName')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [System.String] - # Name of the Extension. + # Name of the Flux Configuration. ${Name}, - [Parameter(ParameterSetName='Delete', Mandatory)] + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, - [Parameter(ParameterSetName='Delete')] + [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] - # The Azure subscription ID. - # This is a GUID-formatted string (e.g. - # 00000000-0000-0000-0000-000000000000) + # The ID of the target subscription. ${SubscriptionId}, - [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentity] # Identity Parameter @@ -1240,10 +2730,143 @@ param( ${InputObject}, [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Query')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.Security.SecureString] + # Plaintext access key used to securely access the S3 bucket + ${BucketAccessKey}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] [System.Management.Automation.SwitchParameter] - # Delete the extension resource in Azure - not the normal asynchronous delete. - ${ForceDelete}, + # Specify whether to use insecure communication when puling data from the S3 bucket. + ${BucketInsecure}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided configuration secrets. + ${BucketLocalAuthRef}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # The bucket name to sync from the url endpoint for the flux configuration. + ${BucketName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.Int64] + # The interval at which to re-reconcile the cluster git repository source with the remote. + ${BucketSyncIntervalInSecond}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.Int64] + # The maximum time to attempt to reconcile the cluster git repository source with the remote. + ${BucketTimeoutInSecond}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # The URL to sync for the flux configuration S3 bucket. + ${BucketUrl}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesConfigurationProtectedSettings]))] + [System.Collections.Hashtable] + # Key-value pairs of protected configuration settings for the configuration + ${ConfigurationProtectedSetting}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # Base64-encoded HTTPS certificate authority contents used to access git private git repositories over HTTPS + ${GitRepositoryHttpsCaCert}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # Plaintext HTTPS username used to access private git repositories over HTTPS + ${GitRepositoryHttpsUser}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided configuration secrets. + ${GitRepositoryLocalAuthRef}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # Base64-encoded known_hosts value containing public SSH keys required to access private git repositories over SSH + ${GitRepositorySshKnownHost}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.Int64] + # The interval at which to re-reconcile the cluster git repository source with the remote. + ${GitRepositorySyncIntervalInSecond}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.Int64] + # The maximum time to attempt to reconcile the cluster git repository source with the remote. + ${GitRepositoryTimeoutInSecond}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # The URL to sync for the flux configuration git repository. + ${GitRepositoryUrl}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesKustomizations]))] + [System.Collections.Hashtable] + # Array of kustomizations used to reconcile the artifact pulled by the source type on the cluster. + ${Kustomization}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # The git repository branch name to checkout. + ${RepositoryRefBranch}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # The commit SHA to checkout. + # This value must be combined with the branch name to be valid. + # This takes precedence over semver. + ${RepositoryRefCommit}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # The semver range used to match against git repository tags. + # This takes precedence over tag. + ${RepositoryRefSemver}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # The git repository tag name to checkout. + # This takes precedence over branch. + ${RepositoryRefTag}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType])] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType] + # Source Kind to pull the configuration data from. + ${SourceKind}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Whether this configuration should suspend its reconciliation of its kustomizations and sources. + ${Suspend}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] @@ -1285,12 +2908,6 @@ param( # Run the command asynchronously ${NoWait}, - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] - [System.Management.Automation.SwitchParameter] - # Returns true when the command succeeds - ${PassThru}, - [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] [System.Uri] @@ -1318,11 +2935,12 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + $mapping = @{ - Delete = 'Az.KubernetesConfiguration.private\Remove-AzKubernetesExtension_Delete'; - DeleteViaIdentity = 'Az.KubernetesConfiguration.private\Remove-AzKubernetesExtension_DeleteViaIdentity'; + UpdateExpanded = 'Az.KubernetesConfiguration.private\Update-AzKubernetesConfigurationFlux_UpdateExpanded'; + UpdateViaIdentityExpanded = 'Az.KubernetesConfiguration.private\Update-AzKubernetesConfigurationFlux_UpdateViaIdentityExpanded'; } - if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } @@ -1331,6 +2949,7 @@ begin { $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { + throw } } @@ -1339,17 +2958,20 @@ process { try { $steppablePipeline.Process($_) } catch { + throw } -} +} end { try { $steppablePipeline.End() + } catch { + throw } -} +} } <# @@ -1358,16 +2980,16 @@ Patch an existing Kubernetes Cluster Extension. .Description Patch an existing Kubernetes Cluster Extension. .Example -PS C:\> Update-AzKubernetesExtension -ClusterName azps_test_cluster -ClusterType ConnectedClusters -Name azps_test_extension -ResourceGroupName azps_test_group -ConfigurationProtectedSetting @{"aa"="bb"} +PS C:\> Update-AzKubernetesExtension -ClusterName azpstest_cluster_arc -ClusterType ConnectedClusters -Name azpstest-extension -ResourceGroupName azpstest_gp -ConfigurationProtectedSetting @{"aa"="bb"} -Name ExtensionType Version ProvisioningState AutoUpgradeMinorVersion ReleaseTrain ResourceGroupName ----- ------------- ------- ----------------- ----------------------- ------------ ----------------- -azps_test_extension microsoft.arcdataservices 1.0.16701001 Succeeded True Stable azps_test_group +Name ExtensionType Version ProvisioningState AutoUpgradeMinorVersion ReleaseTrain +---- ------------- ------- ----------------- ----------------------- ------------ +azpstest-extension azuremonitor-containers 2.9.2 Succeeded True Stable .Inputs Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtension +Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtension .Notes COMPLEX PARAMETER PROPERTIES @@ -1375,20 +2997,21 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ClusterName ]: The name of the kubernetes cluster. - [ClusterResourceName ]: The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or connectedClusters (for OnPrem K8S clusters). - [ClusterRp ]: The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or Microsoft.Kubernetes (for OnPrem K8S clusters). + [ClusterResourceName ]: The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. + [ClusterRp ]: The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. [ExtensionName ]: Name of the Extension. + [FluxConfigurationName ]: Name of the Flux Configuration. [Id ]: Resource identity path [OperationId ]: operation Id - [ResourceGroupName ]: The name of the resource group. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [SourceControlConfigurationName ]: Name of the Source Control Configuration. - [SubscriptionId ]: The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000) + [SubscriptionId ]: The ID of the target subscription. .Link https://docs.microsoft.com/powershell/module/az.kubernetesconfiguration/update-azkubernetesextension #> function Update-AzKubernetesExtension { [Alias('Update-AzK8sExtension')] -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtension])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtension])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] @@ -1400,13 +3023,15 @@ param( [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [System.String] - # The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or Microsoft.Kubernetes (for OnPrem K8S clusters). + # The Kubernetes cluster RP - i.e. + # Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. ${ClusterRp}, [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [System.String] - # The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or connectedClusters (for OnPrem K8S clusters). + # The Kubernetes cluster resource name - i.e. + # managedClusters, connectedClusters, provisionedClusters. ${ClusterType}, [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] @@ -1427,9 +3052,7 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] - # The Azure subscription ID. - # This is a GUID-formatted string (e.g. - # 00000000-0000-0000-0000-000000000000) + # The ID of the target subscription. ${SubscriptionId}, [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)] @@ -1447,14 +3070,14 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtensionPropertiesConfigurationProtectedSettings]))] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtensionPropertiesConfigurationProtectedSettings]))] [System.Collections.Hashtable] # Configuration settings that are sensitive, as name-value pairs for configuring this extension. ${ConfigurationProtectedSetting}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtensionPropertiesConfigurationSettings]))] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtensionPropertiesConfigurationSettings]))] [System.Collections.Hashtable] # Configuration settings, as name-value pairs for configuring this extension. ${ConfigurationSetting}, @@ -1540,6 +3163,7 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + $mapping = @{ UpdateExpanded = 'Az.KubernetesConfiguration.private\Update-AzKubernetesExtension_UpdateExpanded'; UpdateViaIdentityExpanded = 'Az.KubernetesConfiguration.private\Update-AzKubernetesExtension_UpdateViaIdentityExpanded'; @@ -1553,6 +3177,7 @@ begin { $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { + throw } } @@ -1561,15 +3186,18 @@ process { try { $steppablePipeline.Process($_) } catch { + throw } -} +} end { try { $steppablePipeline.End() + } catch { + throw } -} +} } diff --git a/src/KubernetesConfiguration/internal/README.md b/src/KubernetesConfiguration/internal/README.md index 0dc67f536d71..0cfccfbc3bc0 100644 --- a/src/KubernetesConfiguration/internal/README.md +++ b/src/KubernetesConfiguration/internal/README.md @@ -1,5 +1,5 @@ # Internal -This directory contains a module to handle *internal only* cmdlets. Cmdlets that you **hide** in configuration are created here. For more information on hiding, see [cmdlet hiding](https://github.com/Azure/autorest/blob/master/docs/powershell/options.md#cmdlet-hiding-exportation-suppression). The cmdlets in this directory are generated at **build-time**. Do not put any custom code, files, cmdlets, etc. into this directory. Please use `..\custom` for all custom implementation. +This directory contains a module to handle *internal only* cmdlets. Cmdlets that you **hide** in configuration are created here. For more information on hiding, see [cmdlet hiding](https://github.com/Azure/autorest.powershell/blob/main/docs/directives.md#cmdlet-hiding-exportation-suppression). 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 @@ -11,4 +11,4 @@ This directory contains a module to handle *internal only* cmdlets. Cmdlets that The `Az.KubernetesConfiguration.internal.psm1` file is generated to this folder. This module file handles the hidden cmdlets. These cmdlets will not be exported by `Az.KubernetesConfiguration`. Instead, this sub-module is imported by the `..\custom\Az.KubernetesConfiguration.custom.psm1` module, allowing you to use hidden cmdlets in your custom, exposed cmdlets. To call these cmdlets in your custom scripts, simply use [module-qualified calls](https://docs.microsoft.com/powershell/module/microsoft.powershell.core/about/about_command_precedence?view=powershell-6#qualified-names). For example, `Az.KubernetesConfiguration.internal\Get-Example` would call an internal cmdlet named `Get-Example`. ## Purpose -This allows you to include REST specifications for services that you *do not wish to expose from your module*, but simply want to call within custom cmdlets. For example, if you want to make a custom cmdlet that uses `Storage` services, you could include a simplified `Storage` REST specification that has only the operations you need. When you run the generator and build this module, note the generated `Storage` cmdlets. Then, in your readme configuration, use [cmdlet hiding](https://github.com/Azure/autorest/blob/master/docs/powershell/options.md#cmdlet-hiding-exportation-suppression) on the `Storage` cmdlets and they will *only be exposed to the custom cmdlets* you want to write, and not be exported as part of `Az.KubernetesConfiguration`. \ No newline at end of file +This allows you to include REST specifications for services that you *do not wish to expose from your module*, but simply want to call within custom cmdlets. For example, if you want to make a custom cmdlet that uses `Storage` services, you could include a simplified `Storage` REST specification that has only the operations you need. When you run the generator and build this module, note the generated `Storage` cmdlets. Then, in your readme configuration, use [cmdlet hiding](https://github.com/Azure/autorest/blob/master/docs/powershell/options.md#cmdlet-hiding-exportation-suppression) on the `Storage` cmdlets and they will *only be exposed to the custom cmdlets* you want to write, and not be exported as part of `Az.KubernetesConfiguration`. diff --git a/src/KubernetesConfiguration/internal/Remove-AzKubernetesConfiguration.ps1 b/src/KubernetesConfiguration/internal/Remove-AzKubernetesConfiguration.ps1 index a6a2fdb696e5..e80d381726d4 100644 --- a/src/KubernetesConfiguration/internal/Remove-AzKubernetesConfiguration.ps1 +++ b/src/KubernetesConfiguration/internal/Remove-AzKubernetesConfiguration.ps1 @@ -20,11 +20,11 @@ This will delete the YAML file used to set up the Source control configuration, .Description This will delete the YAML file used to set up the Source control configuration, thus stopping future sync from the source repo. .Example -PS C:\> Remove-AzKubernetesConfiguration -ResourceGroupName azps_test_group -ClusterName azps_test_cluster -Name azpstestk8s01 -ClusterType ConnectedClusters +PS C:\> Remove-AzKubernetesConfiguration -ResourceGroupName azpstest_gp -ClusterName azpstest_cluster_arc -Name azpstestk8s -ClusterType ConnectedClusters .Example -PS C:\> $kubConf = Get-AzKubernetesConfiguration -ClusterName azps_test_cluster -ClusterType ConnectedClusters -ResourceGroupName azps_test_group -Name azpstestk8s02 -PS C:\> Remove-AzKubernetesConfiguration -InputObject $kubConf +PS C:\> $kubConf = Get-AzKubernetesConfiguration -ClusterName azpstest_cluster_arc -ClusterType ConnectedClusters -ResourceGroupName azpstest_gp -Name azpstestk8s-operator +Remove-AzKubernetesConfiguration -InputObject $kubConf .Inputs @@ -38,14 +38,15 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ClusterName ]: The name of the kubernetes cluster. - [ClusterResourceName ]: The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or connectedClusters (for OnPrem K8S clusters). - [ClusterRp ]: The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or Microsoft.Kubernetes (for OnPrem K8S clusters). + [ClusterResourceName ]: The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. + [ClusterRp ]: The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. [ExtensionName ]: Name of the Extension. + [FluxConfigurationName ]: Name of the Flux Configuration. [Id ]: Resource identity path [OperationId ]: operation Id - [ResourceGroupName ]: The name of the resource group. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [SourceControlConfigurationName ]: Name of the Source Control Configuration. - [SubscriptionId ]: The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000) + [SubscriptionId ]: The ID of the target subscription. .Link https://docs.microsoft.com/powershell/module/az.kubernetesconfiguration/remove-azkubernetesconfiguration #> @@ -63,13 +64,15 @@ param( [Parameter(ParameterSetName='Delete', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [System.String] - # The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or Microsoft.Kubernetes (for OnPrem K8S clusters). + # The Kubernetes cluster RP - i.e. + # Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. ${ClusterRp}, [Parameter(ParameterSetName='Delete', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [System.String] - # The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or connectedClusters (for OnPrem K8S clusters). + # The Kubernetes cluster resource name - i.e. + # managedClusters, connectedClusters, provisionedClusters. ${ClusterType}, [Parameter(ParameterSetName='Delete', Mandatory)] @@ -83,15 +86,14 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [System.String] # The name of the resource group. + # The name is case insensitive. ${ResourceGroupName}, [Parameter(ParameterSetName='Delete')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] - # The Azure subscription ID. - # This is a GUID-formatted string (e.g. - # 00000000-0000-0000-0000-000000000000) + # The ID of the target subscription. ${SubscriptionId}, [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] @@ -174,6 +176,7 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + $mapping = @{ Delete = 'Az.KubernetesConfiguration.private\Remove-AzKubernetesConfiguration_Delete'; DeleteViaIdentity = 'Az.KubernetesConfiguration.private\Remove-AzKubernetesConfiguration_DeleteViaIdentity'; @@ -187,6 +190,7 @@ begin { $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { + throw } } @@ -195,15 +199,18 @@ process { try { $steppablePipeline.Process($_) } catch { + throw } -} +} end { try { $steppablePipeline.End() + } catch { + throw } -} +} } diff --git a/src/KubernetesConfiguration/internal/Remove-AzKubernetesConfigurationFlux.ps1 b/src/KubernetesConfiguration/internal/Remove-AzKubernetesConfigurationFlux.ps1 new file mode 100644 index 000000000000..33b152c6d10f --- /dev/null +++ b/src/KubernetesConfiguration/internal/Remove-AzKubernetesConfigurationFlux.ps1 @@ -0,0 +1,221 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +This will delete the YAML file used to set up the Flux Configuration, thus stopping future sync from the source repo. +.Description +This will delete the YAML file used to set up the Flux Configuration, thus stopping future sync from the source repo. +.Example +PS C:\> Remove-AzKubernetesConfigurationFlux -ClusterName azpstest_cluster_arc -ClusterType ConnectedClusters -Name azpstestflux-k8s -ResourceGroupName azpstest_gp + +.Example +PS C:\> Get-AzKubernetesConfigurationFlux -ClusterName azpstest_cluster_arc -ClusterType ConnectedClusters -Name azpstestflux-k8s -ResourceGroupName azpstest_gp | Remove-AzKubernetesConfigurationFlux + + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentity +.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. + [ClusterResourceName ]: The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. + [ClusterRp ]: The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. + [ExtensionName ]: Name of the Extension. + [FluxConfigurationName ]: Name of the Flux Configuration. + [Id ]: Resource identity path + [OperationId ]: operation Id + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SourceControlConfigurationName ]: Name of the Source Control Configuration. + [SubscriptionId ]: The ID of the target subscription. +.Link +https://docs.microsoft.com/powershell/module/az.kubernetesconfiguration/remove-azkubernetesconfigurationflux +#> +function Remove-AzKubernetesConfigurationFlux { +[Alias('Remove-AzK8sConfigurationFlux')] +[OutputType([System.Boolean])] +[CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Delete', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [System.String] + # The name of the kubernetes cluster. + ${ClusterName}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [System.String] + # The Kubernetes cluster RP - i.e. + # Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. + ${ClusterRp}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [System.String] + # The Kubernetes cluster resource name - i.e. + # managedClusters, connectedClusters, provisionedClusters. + ${ClusterType}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [Alias('FluxConfigurationName')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [System.String] + # Name of the Flux Configuration. + ${Name}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Delete')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Query')] + [System.Management.Automation.SwitchParameter] + # Delete the extension resource in Azure - not the normal asynchronous delete. + ${ForceDelete}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Returns true when the command succeeds + ${PassThru}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.private\Remove-AzKubernetesConfigurationFlux_Delete'; + DeleteViaIdentity = 'Az.KubernetesConfiguration.private\Remove-AzKubernetesConfigurationFlux_DeleteViaIdentity'; + } + 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/KubernetesConfiguration/internal/Remove-AzKubernetesExtension.ps1 b/src/KubernetesConfiguration/internal/Remove-AzKubernetesExtension.ps1 index c3032047bc85..6da7086bb80c 100644 --- a/src/KubernetesConfiguration/internal/Remove-AzKubernetesExtension.ps1 +++ b/src/KubernetesConfiguration/internal/Remove-AzKubernetesExtension.ps1 @@ -22,7 +22,7 @@ This will cause the Agent to Uninstall the extension from the cluster. Delete a Kubernetes Cluster Extension. This will cause the Agent to Uninstall the extension from the cluster. .Example -PS C:\> Remove-AzKubernetesExtension -ClusterName azps_test_cluster -ClusterType ConnectedClusters -Name azps_test_extension -ResourceGroupName azps_test_group +PS C:\> Remove-AzKubernetesExtension -ClusterName azpstest_cluster_arc -ClusterType ConnectedClusters -Name azpstest-extension -ResourceGroupName azpstest_gp .Inputs @@ -36,14 +36,15 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ClusterName ]: The name of the kubernetes cluster. - [ClusterResourceName ]: The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or connectedClusters (for OnPrem K8S clusters). - [ClusterRp ]: The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or Microsoft.Kubernetes (for OnPrem K8S clusters). + [ClusterResourceName ]: The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. + [ClusterRp ]: The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. [ExtensionName ]: Name of the Extension. + [FluxConfigurationName ]: Name of the Flux Configuration. [Id ]: Resource identity path [OperationId ]: operation Id - [ResourceGroupName ]: The name of the resource group. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [SourceControlConfigurationName ]: Name of the Source Control Configuration. - [SubscriptionId ]: The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000) + [SubscriptionId ]: The ID of the target subscription. .Link https://docs.microsoft.com/powershell/module/az.kubernetesconfiguration/remove-azkubernetesextension #> @@ -61,13 +62,15 @@ param( [Parameter(ParameterSetName='Delete', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [System.String] - # The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or Microsoft.Kubernetes (for OnPrem K8S clusters). + # The Kubernetes cluster RP - i.e. + # Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. ${ClusterRp}, [Parameter(ParameterSetName='Delete', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [System.String] - # The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or connectedClusters (for OnPrem K8S clusters). + # The Kubernetes cluster resource name - i.e. + # managedClusters, connectedClusters, provisionedClusters. ${ClusterType}, [Parameter(ParameterSetName='Delete', Mandatory)] @@ -88,9 +91,7 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] - # The Azure subscription ID. - # This is a GUID-formatted string (e.g. - # 00000000-0000-0000-0000-000000000000) + # The ID of the target subscription. ${SubscriptionId}, [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] @@ -179,6 +180,7 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + $mapping = @{ Delete = 'Az.KubernetesConfiguration.private\Remove-AzKubernetesExtension_Delete'; DeleteViaIdentity = 'Az.KubernetesConfiguration.private\Remove-AzKubernetesExtension_DeleteViaIdentity'; @@ -192,6 +194,7 @@ begin { $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { + throw } } @@ -200,15 +203,18 @@ process { try { $steppablePipeline.Process($_) } catch { + throw } -} +} end { try { $steppablePipeline.End() + } catch { + throw } -} +} } diff --git a/src/KubernetesConfiguration/internal/Set-AzKubernetesConfigurationFlux.ps1 b/src/KubernetesConfiguration/internal/Set-AzKubernetesConfigurationFlux.ps1 new file mode 100644 index 000000000000..e98664c97f3c --- /dev/null +++ b/src/KubernetesConfiguration/internal/Set-AzKubernetesConfigurationFlux.ps1 @@ -0,0 +1,333 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create a new Kubernetes Flux Configuration. +.Description +Create a new Kubernetes Flux Configuration. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfiguration +.Link +https://docs.microsoft.com/powershell/module/az.kubernetesconfiguration/set-azkubernetesconfigurationflux +#> +function Set-AzKubernetesConfigurationFlux { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfiguration])] +[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [System.String] + # The name of the kubernetes cluster. + ${ClusterName}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [System.String] + # The Kubernetes cluster RP - i.e. + # Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. + ${ClusterRp}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [System.String] + # The Kubernetes cluster resource name - i.e. + # managedClusters, connectedClusters, provisionedClusters. + ${ClusterType}, + + [Parameter(Mandatory)] + [Alias('FluxConfigurationName')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [System.String] + # Name of the Flux Configuration. + ${Name}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + ${SubscriptionId}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.Security.SecureString] + # Plaintext access key used to securely access the S3 bucket + ${BucketAccessKey}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Specify whether to use insecure communication when puling data from the S3 bucket. + ${BucketInsecure}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided configuration secrets. + ${BucketLocalAuthRef}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # The bucket name to sync from the url endpoint for the flux configuration. + ${BucketName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.Int64] + # The interval at which to re-reconcile the cluster git repository source with the remote. + ${BucketSyncIntervalInSecond}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.Int64] + # The maximum time to attempt to reconcile the cluster git repository source with the remote. + ${BucketTimeoutInSecond}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # The URL to sync for the flux configuration S3 bucket. + ${BucketUrl}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesConfigurationProtectedSettings]))] + [System.Collections.Hashtable] + # Key-value pairs of protected configuration settings for the configuration + ${ConfigurationProtectedSetting}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # Base64-encoded HTTPS certificate authority contents used to access git private git repositories over HTTPS + ${GitRepositoryHttpsCaCert}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # Plaintext HTTPS username used to access private git repositories over HTTPS + ${GitRepositoryHttpsUser}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided configuration secrets. + ${GitRepositoryLocalAuthRef}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # Base64-encoded known_hosts value containing public SSH keys required to access private git repositories over SSH + ${GitRepositorySshKnownHost}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.Int64] + # The interval at which to re-reconcile the cluster git repository source with the remote. + ${GitRepositorySyncIntervalInSecond}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.Int64] + # The maximum time to attempt to reconcile the cluster git repository source with the remote. + ${GitRepositoryTimeoutInSecond}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # The URL to sync for the flux configuration git repository. + ${GitRepositoryUrl}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPropertiesKustomizations]))] + [System.Collections.Hashtable] + # Array of kustomizations used to reconcile the artifact pulled by the source type on the cluster. + ${Kustomization}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # The namespace to which this configuration is installed to. + # Maximum of 253 lower case alphanumeric characters, hyphen and period only. + ${Namespace}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # The git repository branch name to checkout. + ${RepositoryRefBranch}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # The commit SHA to checkout. + # This value must be combined with the branch name to be valid. + # This takes precedence over semver. + ${RepositoryRefCommit}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # The semver range used to match against git repository tags. + # This takes precedence over tag. + ${RepositoryRefSemver}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # The git repository tag name to checkout. + # This takes precedence over branch. + ${RepositoryRefTag}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ScopeType])] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.ScopeType] + # Scope at which the operator will be installed. + ${Scope}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType])] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType] + # Source Kind to pull the configuration data from. + ${SourceKind}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Whether this configuration should suspend its reconciliation of its kustomizations and sources. + ${Suspend}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.private\Set-AzKubernetesConfigurationFlux_UpdateExpanded'; + } + 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/KubernetesConfiguration/internal/Update-AzKubernetesConfigurationFlux.ps1 b/src/KubernetesConfiguration/internal/Update-AzKubernetesConfigurationFlux.ps1 new file mode 100644 index 000000000000..da43642508fb --- /dev/null +++ b/src/KubernetesConfiguration/internal/Update-AzKubernetesConfigurationFlux.ps1 @@ -0,0 +1,354 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Update an existing Kubernetes Flux Configuration. +.Description +Update an existing Kubernetes Flux Configuration. +.Example +PS C:\> Update-AzKubernetesConfigurationFlux -ClusterName azpstest_cluster_arc -ClusterType ConnectedClusters -Name azpstestflux-k8s -ResourceGroupName azpstest_gp -GitRepositoryUrl https://github.com/fluxcd/flux2-kustomize-helm-example -RepositoryRefBranch main -SourceKind 'GitRepository' -GitRepositorySyncIntervalInSecond 600 -GitRepositoryTimeoutInSecond 600 -Suspend:$false + +Name ResourceGroupName +---- ----------------- +azpstestflux-k8s azpstest_gp +.Example +PS C:\> Get-AzKubernetesConfigurationFlux -ClusterName azpstest_cluster_arc -ClusterType ConnectedClusters -Name azpstestflux-k8s -ResourceGroupName azpstest_gp | Update-AzKubernetesConfigurationFlux -GitRepositoryUrl https://github.com/fluxcd/flux2-kustomize-helm-example -RepositoryRefBranch main -SourceKind 'GitRepository' -GitRepositorySyncIntervalInSecond 600 -GitRepositoryTimeoutInSecond 600 -Suspend:$false + +Name ResourceGroupName +---- ----------------- +azpstestflux-k8s azpstest_gp + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfiguration +.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. + [ClusterResourceName ]: The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. + [ClusterRp ]: The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. + [ExtensionName ]: Name of the Extension. + [FluxConfigurationName ]: Name of the Flux Configuration. + [Id ]: Resource identity path + [OperationId ]: operation Id + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SourceControlConfigurationName ]: Name of the Source Control Configuration. + [SubscriptionId ]: The ID of the target subscription. +.Link +https://docs.microsoft.com/powershell/module/az.kubernetesconfiguration/update-azkubernetesconfigurationflux +#> +function Update-AzKubernetesConfigurationFlux { +[Alias('Update-AzK8sConfigurationFlux')] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfiguration])] +[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [System.String] + # The name of the kubernetes cluster. + ${ClusterName}, + + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [System.String] + # The Kubernetes cluster RP - i.e. + # Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. + ${ClusterRp}, + + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [System.String] + # The Kubernetes cluster resource name - i.e. + # managedClusters, connectedClusters, provisionedClusters. + ${ClusterType}, + + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Alias('FluxConfigurationName')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [System.String] + # Name of the Flux Configuration. + ${Name}, + + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.Security.SecureString] + # Plaintext access key used to securely access the S3 bucket + ${BucketAccessKey}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Specify whether to use insecure communication when puling data from the S3 bucket. + ${BucketInsecure}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided configuration secrets. + ${BucketLocalAuthRef}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # The bucket name to sync from the url endpoint for the flux configuration. + ${BucketName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.Int64] + # The interval at which to re-reconcile the cluster git repository source with the remote. + ${BucketSyncIntervalInSecond}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.Int64] + # The maximum time to attempt to reconcile the cluster git repository source with the remote. + ${BucketTimeoutInSecond}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # The URL to sync for the flux configuration S3 bucket. + ${BucketUrl}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesConfigurationProtectedSettings]))] + [System.Collections.Hashtable] + # Key-value pairs of protected configuration settings for the configuration + ${ConfigurationProtectedSetting}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # Base64-encoded HTTPS certificate authority contents used to access git private git repositories over HTTPS + ${GitRepositoryHttpsCaCert}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # Plaintext HTTPS username used to access private git repositories over HTTPS + ${GitRepositoryHttpsUser}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided configuration secrets. + ${GitRepositoryLocalAuthRef}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # Base64-encoded known_hosts value containing public SSH keys required to access private git repositories over SSH + ${GitRepositorySshKnownHost}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.Int64] + # The interval at which to re-reconcile the cluster git repository source with the remote. + ${GitRepositorySyncIntervalInSecond}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.Int64] + # The maximum time to attempt to reconcile the cluster git repository source with the remote. + ${GitRepositoryTimeoutInSecond}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # The URL to sync for the flux configuration git repository. + ${GitRepositoryUrl}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IFluxConfigurationPatchPropertiesKustomizations]))] + [System.Collections.Hashtable] + # Array of kustomizations used to reconcile the artifact pulled by the source type on the cluster. + ${Kustomization}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # The git repository branch name to checkout. + ${RepositoryRefBranch}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # The commit SHA to checkout. + # This value must be combined with the branch name to be valid. + # This takes precedence over semver. + ${RepositoryRefCommit}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # The semver range used to match against git repository tags. + # This takes precedence over tag. + ${RepositoryRefSemver}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.String] + # The git repository tag name to checkout. + # This takes precedence over branch. + ${RepositoryRefTag}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType])] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Support.SourceKindType] + # Source Kind to pull the configuration data from. + ${SourceKind}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Whether this configuration should suspend its reconciliation of its kustomizations and sources. + ${Suspend}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.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.KubernetesConfiguration.private\Update-AzKubernetesConfigurationFlux_UpdateExpanded'; + UpdateViaIdentityExpanded = 'Az.KubernetesConfiguration.private\Update-AzKubernetesConfigurationFlux_UpdateViaIdentityExpanded'; + } + 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/KubernetesConfiguration/internal/Update-AzKubernetesExtension.ps1 b/src/KubernetesConfiguration/internal/Update-AzKubernetesExtension.ps1 index 14e0655ee2f5..cb2ad1b63f0b 100644 --- a/src/KubernetesConfiguration/internal/Update-AzKubernetesExtension.ps1 +++ b/src/KubernetesConfiguration/internal/Update-AzKubernetesExtension.ps1 @@ -20,16 +20,16 @@ Patch an existing Kubernetes Cluster Extension. .Description Patch an existing Kubernetes Cluster Extension. .Example -PS C:\> Update-AzKubernetesExtension -ClusterName azps_test_cluster -ClusterType ConnectedClusters -Name azps_test_extension -ResourceGroupName azps_test_group -ConfigurationProtectedSetting @{"aa"="bb"} +PS C:\> Update-AzKubernetesExtension -ClusterName azpstest_cluster_arc -ClusterType ConnectedClusters -Name azpstest-extension -ResourceGroupName azpstest_gp -ConfigurationProtectedSetting @{"aa"="bb"} -Name ExtensionType Version ProvisioningState AutoUpgradeMinorVersion ReleaseTrain ResourceGroupName ----- ------------- ------- ----------------- ----------------------- ------------ ----------------- -azps_test_extension microsoft.arcdataservices 1.0.16701001 Succeeded True Stable azps_test_group +Name ExtensionType Version ProvisioningState AutoUpgradeMinorVersion ReleaseTrain +---- ------------- ------- ----------------- ----------------------- ------------ +azpstest-extension azuremonitor-containers 2.9.2 Succeeded True Stable .Inputs Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.IKubernetesConfigurationIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtension +Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtension .Notes COMPLEX PARAMETER PROPERTIES @@ -37,20 +37,21 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ClusterName ]: The name of the kubernetes cluster. - [ClusterResourceName ]: The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or connectedClusters (for OnPrem K8S clusters). - [ClusterRp ]: The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or Microsoft.Kubernetes (for OnPrem K8S clusters). + [ClusterResourceName ]: The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. + [ClusterRp ]: The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. [ExtensionName ]: Name of the Extension. + [FluxConfigurationName ]: Name of the Flux Configuration. [Id ]: Resource identity path [OperationId ]: operation Id - [ResourceGroupName ]: The name of the resource group. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [SourceControlConfigurationName ]: Name of the Source Control Configuration. - [SubscriptionId ]: The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000) + [SubscriptionId ]: The ID of the target subscription. .Link https://docs.microsoft.com/powershell/module/az.kubernetesconfiguration/update-azkubernetesextension #> function Update-AzKubernetesExtension { [Alias('Update-AzK8sExtension')] -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IExtension])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IExtension])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] @@ -62,13 +63,15 @@ param( [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [System.String] - # The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or Microsoft.Kubernetes (for OnPrem K8S clusters). + # The Kubernetes cluster RP - i.e. + # Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. ${ClusterRp}, [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [System.String] - # The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or connectedClusters (for OnPrem K8S clusters). + # The Kubernetes cluster resource name - i.e. + # managedClusters, connectedClusters, provisionedClusters. ${ClusterType}, [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] @@ -89,9 +92,7 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] - # The Azure subscription ID. - # This is a GUID-formatted string (e.g. - # 00000000-0000-0000-0000-000000000000) + # The ID of the target subscription. ${SubscriptionId}, [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)] @@ -109,14 +110,14 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtensionPropertiesConfigurationProtectedSettings]))] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtensionPropertiesConfigurationProtectedSettings]))] [System.Collections.Hashtable] # Configuration settings that are sensitive, as name-value pairs for configuring this extension. ${ConfigurationProtectedSetting}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20210901.IPatchExtensionPropertiesConfigurationSettings]))] + [Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.KubernetesConfiguration.Models.Api20220301.IPatchExtensionPropertiesConfigurationSettings]))] [System.Collections.Hashtable] # Configuration settings, as name-value pairs for configuring this extension. ${ConfigurationSetting}, @@ -202,6 +203,7 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + $mapping = @{ UpdateExpanded = 'Az.KubernetesConfiguration.private\Update-AzKubernetesExtension_UpdateExpanded'; UpdateViaIdentityExpanded = 'Az.KubernetesConfiguration.private\Update-AzKubernetesExtension_UpdateViaIdentityExpanded'; @@ -215,6 +217,7 @@ begin { $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { + throw } } @@ -223,15 +226,18 @@ process { try { $steppablePipeline.Process($_) } catch { + throw } -} +} end { try { $steppablePipeline.End() + } catch { + throw } -} +} } diff --git a/src/KubernetesConfiguration/test/AzKubernetesConfiguration.Recording.json b/src/KubernetesConfiguration/test/AzKubernetesConfiguration.Recording.json index 2621f06f16ca..184869e5ed72 100644 --- a/src/KubernetesConfiguration/test/AzKubernetesConfiguration.Recording.json +++ b/src/KubernetesConfiguration/test/AzKubernetesConfiguration.Recording.json @@ -1,8 +1,8 @@ { - "AzKubernetesConfiguration+[NoContext]+CreateExpanded+$PUT+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupcentralus/providers/Microsoft.Kubernetes/ConnectedClusters/6bsnda/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/ucpk94?api-version=2021-03-01+1": { + "AzKubernetesConfiguration+[NoContext]+CreateExpanded+$PUT+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/u4c2b9?api-version=2022-03-01+1": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupcentralus/providers/Microsoft.Kubernetes/ConnectedClusters/6bsnda/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/ucpk94?api-version=2021-03-01", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/u4c2b9?api-version=2022-03-01", "Content": "{\r\n \"properties\": {\r\n \"repositoryUrl\": \"http://github.com/xxxx\",\r\n \"operatorType\": \"Flux\",\r\n \"operatorScope\": \"namespace\"\r\n }\r\n}", "isContentBase64": false, "Headers": { @@ -17,29 +17,29 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Location": [ "file:///subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupcentralus/providers/Microsoft.Kubernetes/ConnectedClusters/6bsnda/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/ucpk94" ], + "Location": [ "file:///subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/u4c2b9" ], "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "api-supported-versions": [ "2019-11-01-Preview, 2020-07-01-Preview, 2020-10-01-Preview, 2021-03-01, 2021-05-01-preview" ], + "api-supported-versions": [ "2019-11-01-Preview, 2020-07-01-Preview, 2020-10-01-Preview, 2021-03-01, 2021-05-01-preview, 2022-03-01" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "4eea62ea-f85c-4234-aa98-7ebee4618702" ], - "x-ms-correlation-request-id": [ "4eea62ea-f85c-4234-aa98-7ebee4618702" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20211028T030511Z:4eea62ea-f85c-4234-aa98-7ebee4618702" ], - "Date": [ "Thu, 28 Oct 2021 03:05:10 GMT" ] + "x-ms-request-id": [ "fc8a061e-3db8-4a03-996b-7de5ad7b8516" ], + "x-ms-correlation-request-id": [ "fc8a061e-3db8-4a03-996b-7de5ad7b8516" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20220520T105542Z:fc8a061e-3db8-4a03-996b-7de5ad7b8516" ], + "Date": [ "Fri, 20 May 2022 10:55:41 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1050" ], + "Content-Length": [ "1047" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupcentralus/providers/Microsoft.Kubernetes/ConnectedClusters/6bsnda/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/ucpk94\",\"name\":\"ucpk94\",\"type\":\"Microsoft.KubernetesConfiguration/sourceControlConfigurations\",\"properties\":{\"operatorNamespace\":\"default\",\"provisioningState\":\"Succeeded\",\"complianceStatus\":{\"complianceState\":\"Pending\",\"lastConfigApplied\":\"0001-01-01T00:00:00+00:00\",\"message\":\"{\\\"OperatorMessage\\\":null,\\\"ClusterState\\\":null}\",\"messageLevel\":\"Information\"},\"enableHelmOperator\":false,\"repositoryUrl\":\"http://github.com/xxxx\",\"operatorInstanceName\":\"\",\"operatorType\":\"Flux\",\"operatorScope\":\"namespace\",\"operatorParams\":\"--git-readonly\",\"sshKnownHostsContents\":null,\"configurationProtectedSettings\":{},\"repositoryPublicKey\":\"\"},\"systemData\":{\"createdBy\":null,\"createdByType\":null,\"createdAt\":\"2021-10-28T03:05:10.9462818+00:00\",\"lastModifiedBy\":null,\"lastModifiedByType\":null,\"lastModifiedAt\":\"2021-10-28T03:05:10.9462818+00:00\"}}", + "Content": "{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/u4c2b9\",\"name\":\"u4c2b9\",\"type\":\"Microsoft.KubernetesConfiguration/sourceControlConfigurations\",\"properties\":{\"operatorNamespace\":\"default\",\"provisioningState\":\"Succeeded\",\"complianceStatus\":{\"complianceState\":\"Pending\",\"lastConfigApplied\":\"0001-01-01T00:00:00+00:00\",\"message\":\"{\\\"OperatorMessage\\\":null,\\\"ClusterState\\\":null}\",\"messageLevel\":\"Information\"},\"enableHelmOperator\":false,\"repositoryUrl\":\"http://github.com/xxxx\",\"operatorInstanceName\":\"\",\"operatorType\":\"Flux\",\"operatorScope\":\"namespace\",\"operatorParams\":\"--git-readonly\",\"sshKnownHostsContents\":null,\"configurationProtectedSettings\":{},\"repositoryPublicKey\":\"\"},\"systemData\":{\"createdBy\":null,\"createdByType\":null,\"createdAt\":\"2022-05-20T10:55:41.8885611+00:00\",\"lastModifiedBy\":null,\"lastModifiedByType\":null,\"lastModifiedAt\":\"2022-05-20T10:55:41.8885611+00:00\"}}", "isContentBase64": false } }, - "AzKubernetesConfiguration+[NoContext]+CreateExpanded+$PUT+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupcentralus/providers/Microsoft.Kubernetes/ConnectedClusters/6bsnda/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/2htdrc?api-version=2021-03-01+2": { + "AzKubernetesConfiguration+[NoContext]+CreateExpanded+$PUT+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/ha3sxe?api-version=2022-03-01+2": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupcentralus/providers/Microsoft.Kubernetes/ConnectedClusters/6bsnda/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/2htdrc?api-version=2021-03-01", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/ha3sxe?api-version=2022-03-01", "Content": "{\r\n \"properties\": {\r\n \"repositoryUrl\": \"http://github.com/xxxx\",\r\n \"operatorNamespace\": \"namespace-t01\",\r\n \"operatorType\": \"Flux\",\r\n \"operatorScope\": \"namespace\"\r\n }\r\n}", "isContentBase64": false, "Headers": { @@ -54,38 +54,38 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Location": [ "file:///subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupcentralus/providers/Microsoft.Kubernetes/ConnectedClusters/6bsnda/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/2htdrc" ], + "Location": [ "file:///subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/ha3sxe" ], "x-ms-ratelimit-remaining-subscription-writes": [ "1198" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "api-supported-versions": [ "2019-11-01-Preview, 2020-07-01-Preview, 2020-10-01-Preview, 2021-03-01, 2021-05-01-preview" ], + "api-supported-versions": [ "2019-11-01-Preview, 2020-07-01-Preview, 2020-10-01-Preview, 2021-03-01, 2021-05-01-preview, 2022-03-01" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "1356fd2b-a1ac-4fe7-b5f4-52ca00791705" ], - "x-ms-correlation-request-id": [ "1356fd2b-a1ac-4fe7-b5f4-52ca00791705" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20211028T030514Z:1356fd2b-a1ac-4fe7-b5f4-52ca00791705" ], - "Date": [ "Thu, 28 Oct 2021 03:05:13 GMT" ] + "x-ms-request-id": [ "44390d34-31d4-40a2-a27c-bb9cf4dace9f" ], + "x-ms-correlation-request-id": [ "44390d34-31d4-40a2-a27c-bb9cf4dace9f" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20220520T105545Z:44390d34-31d4-40a2-a27c-bb9cf4dace9f" ], + "Date": [ "Fri, 20 May 2022 10:55:44 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1056" ], + "Content-Length": [ "1053" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupcentralus/providers/Microsoft.Kubernetes/ConnectedClusters/6bsnda/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/2htdrc\",\"name\":\"2htdrc\",\"type\":\"Microsoft.KubernetesConfiguration/sourceControlConfigurations\",\"properties\":{\"operatorNamespace\":\"namespace-t01\",\"provisioningState\":\"Succeeded\",\"complianceStatus\":{\"complianceState\":\"Pending\",\"lastConfigApplied\":\"0001-01-01T00:00:00+00:00\",\"message\":\"{\\\"OperatorMessage\\\":null,\\\"ClusterState\\\":null}\",\"messageLevel\":\"Information\"},\"enableHelmOperator\":false,\"repositoryUrl\":\"http://github.com/xxxx\",\"operatorInstanceName\":\"\",\"operatorType\":\"Flux\",\"operatorScope\":\"namespace\",\"operatorParams\":\"--git-readonly\",\"sshKnownHostsContents\":null,\"configurationProtectedSettings\":{},\"repositoryPublicKey\":\"\"},\"systemData\":{\"createdBy\":null,\"createdByType\":null,\"createdAt\":\"2021-10-28T03:05:14.5759811+00:00\",\"lastModifiedBy\":null,\"lastModifiedByType\":null,\"lastModifiedAt\":\"2021-10-28T03:05:14.5759811+00:00\"}}", + "Content": "{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/ha3sxe\",\"name\":\"ha3sxe\",\"type\":\"Microsoft.KubernetesConfiguration/sourceControlConfigurations\",\"properties\":{\"operatorNamespace\":\"namespace-t01\",\"provisioningState\":\"Succeeded\",\"complianceStatus\":{\"complianceState\":\"Pending\",\"lastConfigApplied\":\"0001-01-01T00:00:00+00:00\",\"message\":\"{\\\"OperatorMessage\\\":null,\\\"ClusterState\\\":null}\",\"messageLevel\":\"Information\"},\"enableHelmOperator\":false,\"repositoryUrl\":\"http://github.com/xxxx\",\"operatorInstanceName\":\"\",\"operatorType\":\"Flux\",\"operatorScope\":\"namespace\",\"operatorParams\":\"--git-readonly\",\"sshKnownHostsContents\":null,\"configurationProtectedSettings\":{},\"repositoryPublicKey\":\"\"},\"systemData\":{\"createdBy\":null,\"createdByType\":null,\"createdAt\":\"2022-05-20T10:55:45.6908012+00:00\",\"lastModifiedBy\":null,\"lastModifiedByType\":null,\"lastModifiedAt\":\"2022-05-20T10:55:45.6908012+00:00\"}}", "isContentBase64": false } }, - "AzKubernetesConfiguration+[NoContext]+List+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupcentralus/providers/Microsoft.Kubernetes/ConnectedClusters/6bsnda/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations?api-version=2021-03-01+1": { + "AzKubernetesConfiguration+[NoContext]+List+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations?api-version=2022-03-01+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupcentralus/providers/Microsoft.Kubernetes/ConnectedClusters/6bsnda/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations?api-version=2021-03-01", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations?api-version=2022-03-01", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "5" ], - "x-ms-client-request-id": [ "42e15cae-e936-49f5-856b-028b3dff7ab0" ], + "x-ms-unique-id": [ "4" ], + "x-ms-client-request-id": [ "8019f6c1-fb47-435c-a4f0-ebd10ae5f7c5" ], "CommandName": [ "Az.KubernetesConfiguration.internal\\Get-AzKubernetesConfiguration" ], "FullCommandName": [ "Get-AzKubernetesConfiguration_List" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.2", "Az.KubernetesConfiguration/0.2.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -96,37 +96,37 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "api-supported-versions": [ "2019-11-01-Preview, 2020-07-01-Preview, 2020-10-01-Preview, 2021-03-01, 2021-05-01-preview" ], + "api-supported-versions": [ "2019-11-01-Preview, 2020-07-01-Preview, 2020-10-01-Preview, 2021-03-01, 2021-05-01-preview, 2022-03-01" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "96363e5e-98e3-4d93-9494-0d45036b02d2" ], - "x-ms-correlation-request-id": [ "96363e5e-98e3-4d93-9494-0d45036b02d2" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20211028T030516Z:96363e5e-98e3-4d93-9494-0d45036b02d2" ], - "Date": [ "Thu, 28 Oct 2021 03:05:15 GMT" ] + "x-ms-request-id": [ "739f8bed-5004-47e3-90b3-7844f69a5b7f" ], + "x-ms-correlation-request-id": [ "739f8bed-5004-47e3-90b3-7844f69a5b7f" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20220520T105548Z:739f8bed-5004-47e3-90b3-7844f69a5b7f" ], + "Date": [ "Fri, 20 May 2022 10:55:47 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "2135" ], + "Content-Length": [ "2129" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"value\":[{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupcentralus/providers/Microsoft.Kubernetes/ConnectedClusters/6bsnda/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/2htdrc\",\"name\":\"2htdrc\",\"type\":\"Microsoft.KubernetesConfiguration/sourceControlConfigurations\",\"properties\":{\"operatorNamespace\":\"namespace-t01\",\"provisioningState\":\"Succeeded\",\"complianceStatus\":{\"complianceState\":\"Pending\",\"lastConfigApplied\":\"0001-01-01T00:00:00+00:00\",\"message\":\"{\\\"OperatorMessage\\\":null,\\\"ClusterState\\\":null}\",\"messageLevel\":\"Information\"},\"enableHelmOperator\":false,\"repositoryUrl\":\"http://github.com/xxxx\",\"operatorInstanceName\":\"\",\"operatorType\":\"Flux\",\"operatorScope\":\"namespace\",\"operatorParams\":\"--git-readonly\",\"sshKnownHostsContents\":null,\"configurationProtectedSettings\":{},\"repositoryPublicKey\":\"\"},\"systemData\":{\"createdBy\":null,\"createdByType\":null,\"createdAt\":\"2021-10-28T03:05:14.5759811+00:00\",\"lastModifiedBy\":null,\"lastModifiedByType\":null,\"lastModifiedAt\":\"2021-10-28T03:05:14.5759811+00:00\"}},{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupcentralus/providers/Microsoft.Kubernetes/ConnectedClusters/6bsnda/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/ucpk94\",\"name\":\"ucpk94\",\"type\":\"Microsoft.KubernetesConfiguration/sourceControlConfigurations\",\"properties\":{\"operatorNamespace\":\"default\",\"provisioningState\":\"Succeeded\",\"complianceStatus\":{\"complianceState\":\"Pending\",\"lastConfigApplied\":\"0001-01-01T00:00:00+00:00\",\"message\":\"{\\\"OperatorMessage\\\":null,\\\"ClusterState\\\":null}\",\"messageLevel\":\"Information\"},\"enableHelmOperator\":false,\"repositoryUrl\":\"http://github.com/xxxx\",\"operatorInstanceName\":\"\",\"operatorType\":\"Flux\",\"operatorScope\":\"namespace\",\"operatorParams\":\"--git-readonly\",\"sshKnownHostsContents\":null,\"configurationProtectedSettings\":{},\"repositoryPublicKey\":\"\"},\"systemData\":{\"createdBy\":null,\"createdByType\":null,\"createdAt\":\"2021-10-28T03:05:10.9462818+00:00\",\"lastModifiedBy\":null,\"lastModifiedByType\":null,\"lastModifiedAt\":\"2021-10-28T03:05:10.9462818+00:00\"}}],\"nextLink\":null}", + "Content": "{\"value\":[{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/ha3sxe\",\"name\":\"ha3sxe\",\"type\":\"Microsoft.KubernetesConfiguration/sourceControlConfigurations\",\"properties\":{\"operatorNamespace\":\"namespace-t01\",\"provisioningState\":\"Succeeded\",\"complianceStatus\":{\"complianceState\":\"Pending\",\"lastConfigApplied\":\"0001-01-01T00:00:00+00:00\",\"message\":\"{\\\"OperatorMessage\\\":null,\\\"ClusterState\\\":null}\",\"messageLevel\":\"Information\"},\"enableHelmOperator\":false,\"repositoryUrl\":\"http://github.com/xxxx\",\"operatorInstanceName\":\"\",\"operatorType\":\"Flux\",\"operatorScope\":\"namespace\",\"operatorParams\":\"--git-readonly\",\"sshKnownHostsContents\":null,\"configurationProtectedSettings\":{},\"repositoryPublicKey\":\"\"},\"systemData\":{\"createdBy\":null,\"createdByType\":null,\"createdAt\":\"2022-05-20T10:55:45.6908012+00:00\",\"lastModifiedBy\":null,\"lastModifiedByType\":null,\"lastModifiedAt\":\"2022-05-20T10:55:45.6908012+00:00\"}},{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/u4c2b9\",\"name\":\"u4c2b9\",\"type\":\"Microsoft.KubernetesConfiguration/sourceControlConfigurations\",\"properties\":{\"operatorNamespace\":\"default\",\"provisioningState\":\"Succeeded\",\"complianceStatus\":{\"complianceState\":\"Pending\",\"lastConfigApplied\":\"0001-01-01T00:00:00+00:00\",\"message\":\"{\\\"OperatorMessage\\\":null,\\\"ClusterState\\\":null}\",\"messageLevel\":\"Information\"},\"enableHelmOperator\":false,\"repositoryUrl\":\"http://github.com/xxxx\",\"operatorInstanceName\":\"\",\"operatorType\":\"Flux\",\"operatorScope\":\"namespace\",\"operatorParams\":\"--git-readonly\",\"sshKnownHostsContents\":null,\"configurationProtectedSettings\":{},\"repositoryPublicKey\":\"\"},\"systemData\":{\"createdBy\":null,\"createdByType\":null,\"createdAt\":\"2022-05-20T10:55:41.8885611+00:00\",\"lastModifiedBy\":null,\"lastModifiedByType\":null,\"lastModifiedAt\":\"2022-05-20T10:55:41.8885611+00:00\"}}],\"nextLink\":null}", "isContentBase64": false } }, - "AzKubernetesConfiguration+[NoContext]+Get+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupcentralus/providers/Microsoft.Kubernetes/ConnectedClusters/6bsnda/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/ucpk94?api-version=2021-03-01+1": { + "AzKubernetesConfiguration+[NoContext]+Get+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/u4c2b9?api-version=2022-03-01+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupcentralus/providers/Microsoft.Kubernetes/ConnectedClusters/6bsnda/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/ucpk94?api-version=2021-03-01", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/u4c2b9?api-version=2022-03-01", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "6" ], - "x-ms-client-request-id": [ "356d4759-4d34-432f-98f7-3aad9e1712d2" ], + "x-ms-unique-id": [ "5" ], + "x-ms-client-request-id": [ "5f3acfe7-6be2-463f-a3d9-61f719a8c981" ], "CommandName": [ "Az.KubernetesConfiguration.internal\\Get-AzKubernetesConfiguration" ], "FullCommandName": [ "Get-AzKubernetesConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.2", "Az.KubernetesConfiguration/0.2.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -137,37 +137,37 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "api-supported-versions": [ "2019-11-01-Preview, 2020-07-01-Preview, 2020-10-01-Preview, 2021-03-01, 2021-05-01-preview" ], + "api-supported-versions": [ "2019-11-01-Preview, 2020-07-01-Preview, 2020-10-01-Preview, 2021-03-01, 2021-05-01-preview, 2022-03-01" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "0b0e66fc-52ee-448d-b8c6-d3318e7200ff" ], - "x-ms-correlation-request-id": [ "0b0e66fc-52ee-448d-b8c6-d3318e7200ff" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20211028T030518Z:0b0e66fc-52ee-448d-b8c6-d3318e7200ff" ], - "Date": [ "Thu, 28 Oct 2021 03:05:17 GMT" ] + "x-ms-request-id": [ "ae85db4a-bc0b-48de-bcee-21b988ee445a" ], + "x-ms-correlation-request-id": [ "ae85db4a-bc0b-48de-bcee-21b988ee445a" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20220520T105551Z:ae85db4a-bc0b-48de-bcee-21b988ee445a" ], + "Date": [ "Fri, 20 May 2022 10:55:51 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1050" ], + "Content-Length": [ "1047" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupcentralus/providers/Microsoft.Kubernetes/ConnectedClusters/6bsnda/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/ucpk94\",\"name\":\"ucpk94\",\"type\":\"Microsoft.KubernetesConfiguration/sourceControlConfigurations\",\"properties\":{\"operatorNamespace\":\"default\",\"provisioningState\":\"Succeeded\",\"complianceStatus\":{\"complianceState\":\"Pending\",\"lastConfigApplied\":\"0001-01-01T00:00:00+00:00\",\"message\":\"{\\\"OperatorMessage\\\":null,\\\"ClusterState\\\":null}\",\"messageLevel\":\"Information\"},\"enableHelmOperator\":false,\"repositoryUrl\":\"http://github.com/xxxx\",\"operatorInstanceName\":\"\",\"operatorType\":\"Flux\",\"operatorScope\":\"namespace\",\"operatorParams\":\"--git-readonly\",\"sshKnownHostsContents\":null,\"configurationProtectedSettings\":{},\"repositoryPublicKey\":\"\"},\"systemData\":{\"createdBy\":null,\"createdByType\":null,\"createdAt\":\"2021-10-28T03:05:10.9462818+00:00\",\"lastModifiedBy\":null,\"lastModifiedByType\":null,\"lastModifiedAt\":\"2021-10-28T03:05:10.9462818+00:00\"}}", + "Content": "{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/u4c2b9\",\"name\":\"u4c2b9\",\"type\":\"Microsoft.KubernetesConfiguration/sourceControlConfigurations\",\"properties\":{\"operatorNamespace\":\"default\",\"provisioningState\":\"Succeeded\",\"complianceStatus\":{\"complianceState\":\"Pending\",\"lastConfigApplied\":\"0001-01-01T00:00:00+00:00\",\"message\":\"{\\\"OperatorMessage\\\":null,\\\"ClusterState\\\":null}\",\"messageLevel\":\"Information\"},\"enableHelmOperator\":false,\"repositoryUrl\":\"http://github.com/xxxx\",\"operatorInstanceName\":\"\",\"operatorType\":\"Flux\",\"operatorScope\":\"namespace\",\"operatorParams\":\"--git-readonly\",\"sshKnownHostsContents\":null,\"configurationProtectedSettings\":{},\"repositoryPublicKey\":\"\"},\"systemData\":{\"createdBy\":null,\"createdByType\":null,\"createdAt\":\"2022-05-20T10:55:41.8885611+00:00\",\"lastModifiedBy\":null,\"lastModifiedByType\":null,\"lastModifiedAt\":\"2022-05-20T10:55:41.8885611+00:00\"}}", "isContentBase64": false } }, - "AzKubernetesConfiguration+[NoContext]+Delete+$DELETE+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupcentralus/providers/Microsoft.Kubernetes/ConnectedClusters/6bsnda/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/ucpk94?api-version=2021-03-01+1": { + "AzKubernetesConfiguration+[NoContext]+Delete+$DELETE+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/u4c2b9?api-version=2022-03-01+1": { "Request": { "Method": "DELETE", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupcentralus/providers/Microsoft.Kubernetes/ConnectedClusters/6bsnda/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/ucpk94?api-version=2021-03-01", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/u4c2b9?api-version=2022-03-01", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "7" ], - "x-ms-client-request-id": [ "433841b7-3063-4eab-94b6-818874c1da07" ], + "x-ms-unique-id": [ "6" ], + "x-ms-client-request-id": [ "58b39fc5-6ebf-4e5f-858d-d570d2706f02" ], "CommandName": [ "Az.KubernetesConfiguration.internal\\Remove-AzKubernetesConfiguration" ], "FullCommandName": [ "Remove-AzKubernetesConfiguration_Delete" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.2", "Az.KubernetesConfiguration/0.2.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -180,12 +180,12 @@ "Pragma": [ "no-cache" ], "x-ms-ratelimit-remaining-subscription-deletes": [ "14999" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "api-supported-versions": [ "2019-11-01-Preview, 2020-07-01-Preview, 2020-10-01-Preview, 2021-03-01, 2021-05-01-preview" ], + "api-supported-versions": [ "2019-11-01-Preview, 2020-07-01-Preview, 2020-10-01-Preview, 2021-03-01, 2021-05-01-preview, 2022-03-01" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "31d38136-098d-4adf-a981-922491960c83" ], - "x-ms-correlation-request-id": [ "31d38136-098d-4adf-a981-922491960c83" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20211028T030520Z:31d38136-098d-4adf-a981-922491960c83" ], - "Date": [ "Thu, 28 Oct 2021 03:05:19 GMT" ] + "x-ms-request-id": [ "4683bac3-b3b2-496f-808b-5925c919e7ca" ], + "x-ms-correlation-request-id": [ "4683bac3-b3b2-496f-808b-5925c919e7ca" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20220520T105553Z:4683bac3-b3b2-496f-808b-5925c919e7ca" ], + "Date": [ "Fri, 20 May 2022 10:55:53 GMT" ] }, "ContentHeaders": { "Content-Length": [ "152" ], @@ -196,19 +196,19 @@ "isContentBase64": false } }, - "AzKubernetesConfiguration+[NoContext]+DeleteViaIdentity+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupcentralus/providers/Microsoft.Kubernetes/ConnectedClusters/6bsnda/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/2htdrc?api-version=2021-03-01+1": { + "AzKubernetesConfiguration+[NoContext]+DeleteViaIdentity+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/ha3sxe?api-version=2022-03-01+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupcentralus/providers/Microsoft.Kubernetes/ConnectedClusters/6bsnda/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/2htdrc?api-version=2021-03-01", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/ha3sxe?api-version=2022-03-01", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "8" ], - "x-ms-client-request-id": [ "28f9a624-3d18-4756-81d3-c6f5a5cf8f59" ], + "x-ms-unique-id": [ "7" ], + "x-ms-client-request-id": [ "b21a106c-e10c-4bb5-a830-e0beb9e73d64" ], "CommandName": [ "Az.KubernetesConfiguration.internal\\Get-AzKubernetesConfiguration" ], "FullCommandName": [ "Get-AzKubernetesConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.2", "Az.KubernetesConfiguration/0.2.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -219,37 +219,37 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11995" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "api-supported-versions": [ "2019-11-01-Preview, 2020-07-01-Preview, 2020-10-01-Preview, 2021-03-01, 2021-05-01-preview" ], + "api-supported-versions": [ "2019-11-01-Preview, 2020-07-01-Preview, 2020-10-01-Preview, 2021-03-01, 2021-05-01-preview, 2022-03-01" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "a839e0c6-85e3-4d8f-b8f8-bcad7e63e649" ], - "x-ms-correlation-request-id": [ "a839e0c6-85e3-4d8f-b8f8-bcad7e63e649" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20211028T030522Z:a839e0c6-85e3-4d8f-b8f8-bcad7e63e649" ], - "Date": [ "Thu, 28 Oct 2021 03:05:21 GMT" ] + "x-ms-request-id": [ "3d37ce3e-1cef-4803-8d21-f93b1ddf3222" ], + "x-ms-correlation-request-id": [ "3d37ce3e-1cef-4803-8d21-f93b1ddf3222" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20220520T105555Z:3d37ce3e-1cef-4803-8d21-f93b1ddf3222" ], + "Date": [ "Fri, 20 May 2022 10:55:55 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1056" ], + "Content-Length": [ "1053" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupcentralus/providers/Microsoft.Kubernetes/ConnectedClusters/6bsnda/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/2htdrc\",\"name\":\"2htdrc\",\"type\":\"Microsoft.KubernetesConfiguration/sourceControlConfigurations\",\"properties\":{\"operatorNamespace\":\"namespace-t01\",\"provisioningState\":\"Succeeded\",\"complianceStatus\":{\"complianceState\":\"Pending\",\"lastConfigApplied\":\"0001-01-01T00:00:00+00:00\",\"message\":\"{\\\"OperatorMessage\\\":null,\\\"ClusterState\\\":null}\",\"messageLevel\":\"Information\"},\"enableHelmOperator\":false,\"repositoryUrl\":\"http://github.com/xxxx\",\"operatorInstanceName\":\"\",\"operatorType\":\"Flux\",\"operatorScope\":\"namespace\",\"operatorParams\":\"--git-readonly\",\"sshKnownHostsContents\":null,\"configurationProtectedSettings\":{},\"repositoryPublicKey\":\"\"},\"systemData\":{\"createdBy\":null,\"createdByType\":null,\"createdAt\":\"2021-10-28T03:05:14.5759811+00:00\",\"lastModifiedBy\":null,\"lastModifiedByType\":null,\"lastModifiedAt\":\"2021-10-28T03:05:14.5759811+00:00\"}}", + "Content": "{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/ha3sxe\",\"name\":\"ha3sxe\",\"type\":\"Microsoft.KubernetesConfiguration/sourceControlConfigurations\",\"properties\":{\"operatorNamespace\":\"namespace-t01\",\"provisioningState\":\"Succeeded\",\"complianceStatus\":{\"complianceState\":\"Pending\",\"lastConfigApplied\":\"0001-01-01T00:00:00+00:00\",\"message\":\"{\\\"OperatorMessage\\\":null,\\\"ClusterState\\\":null}\",\"messageLevel\":\"Information\"},\"enableHelmOperator\":false,\"repositoryUrl\":\"http://github.com/xxxx\",\"operatorInstanceName\":\"\",\"operatorType\":\"Flux\",\"operatorScope\":\"namespace\",\"operatorParams\":\"--git-readonly\",\"sshKnownHostsContents\":null,\"configurationProtectedSettings\":{},\"repositoryPublicKey\":\"\"},\"systemData\":{\"createdBy\":null,\"createdByType\":null,\"createdAt\":\"2022-05-20T10:55:45.6908012+00:00\",\"lastModifiedBy\":null,\"lastModifiedByType\":null,\"lastModifiedAt\":\"2022-05-20T10:55:45.6908012+00:00\"}}", "isContentBase64": false } }, - "AzKubernetesConfiguration+[NoContext]+DeleteViaIdentity+$DELETE+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupcentralus/providers/Microsoft.Kubernetes/ConnectedClusters/6bsnda/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/2htdrc?api-version=2021-03-01+2": { + "AzKubernetesConfiguration+[NoContext]+DeleteViaIdentity+$DELETE+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/ha3sxe?api-version=2022-03-01+2": { "Request": { "Method": "DELETE", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupcentralus/providers/Microsoft.Kubernetes/ConnectedClusters/6bsnda/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/2htdrc?api-version=2021-03-01", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/ha3sxe?api-version=2022-03-01", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "9" ], - "x-ms-client-request-id": [ "d9422096-32d5-44bc-9384-39ed52da38a5" ], + "x-ms-unique-id": [ "8" ], + "x-ms-client-request-id": [ "38de9f5d-554e-4fb3-ba7a-04a1cb2c4c66" ], "CommandName": [ "Az.KubernetesConfiguration.internal\\Remove-AzKubernetesConfiguration" ], "FullCommandName": [ "Remove-AzKubernetesConfiguration_DeleteViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.2", "Az.KubernetesConfiguration/0.2.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -262,12 +262,12 @@ "Pragma": [ "no-cache" ], "x-ms-ratelimit-remaining-subscription-deletes": [ "14998" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "api-supported-versions": [ "2019-11-01-Preview, 2020-07-01-Preview, 2020-10-01-Preview, 2021-03-01, 2021-05-01-preview" ], + "api-supported-versions": [ "2019-11-01-Preview, 2020-07-01-Preview, 2020-10-01-Preview, 2021-03-01, 2021-05-01-preview, 2022-03-01" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "e9e82aaf-26e1-42b6-aa31-a4c72c8ca679" ], - "x-ms-correlation-request-id": [ "e9e82aaf-26e1-42b6-aa31-a4c72c8ca679" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20211028T030524Z:e9e82aaf-26e1-42b6-aa31-a4c72c8ca679" ], - "Date": [ "Thu, 28 Oct 2021 03:05:24 GMT" ] + "x-ms-request-id": [ "e93370e4-ffbc-49bb-bce8-3b07cdb1989c" ], + "x-ms-correlation-request-id": [ "e93370e4-ffbc-49bb-bce8-3b07cdb1989c" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20220520T105557Z:e93370e4-ffbc-49bb-bce8-3b07cdb1989c" ], + "Date": [ "Fri, 20 May 2022 10:55:57 GMT" ] }, "ContentHeaders": { "Content-Length": [ "152" ], @@ -278,19 +278,19 @@ "isContentBase64": false } }, - "AzKubernetesConfiguration+[NoContext]+DeleteViaIdentity+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupcentralus/providers/Microsoft.Kubernetes/ConnectedClusters/6bsnda/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations?api-version=2021-03-01+3": { + "AzKubernetesConfiguration+[NoContext]+DeleteViaIdentity+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations?api-version=2022-03-01+3": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupcentralus/providers/Microsoft.Kubernetes/ConnectedClusters/6bsnda/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations?api-version=2021-03-01", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations?api-version=2022-03-01", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "10" ], - "x-ms-client-request-id": [ "986b846f-1838-4f7e-8ccd-7a2df7987dce" ], + "x-ms-unique-id": [ "9" ], + "x-ms-client-request-id": [ "0f227840-a3a5-4b95-bd6b-02f9a7efd46d" ], "CommandName": [ "Az.KubernetesConfiguration.internal\\Get-AzKubernetesConfiguration" ], "FullCommandName": [ "Get-AzKubernetesConfiguration_List" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.2", "Az.KubernetesConfiguration/0.2.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -301,14 +301,14 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11994" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11995" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "api-supported-versions": [ "2019-11-01-Preview, 2020-07-01-Preview, 2020-10-01-Preview, 2021-03-01, 2021-05-01-preview" ], + "api-supported-versions": [ "2019-11-01-Preview, 2020-07-01-Preview, 2020-10-01-Preview, 2021-03-01, 2021-05-01-preview, 2022-03-01" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "5f189d61-6abf-4cff-8620-200ee6ecf525" ], - "x-ms-correlation-request-id": [ "5f189d61-6abf-4cff-8620-200ee6ecf525" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20211028T030526Z:5f189d61-6abf-4cff-8620-200ee6ecf525" ], - "Date": [ "Thu, 28 Oct 2021 03:05:26 GMT" ] + "x-ms-request-id": [ "41a583fe-9210-4ce3-8b46-b0771a3afd1a" ], + "x-ms-correlation-request-id": [ "41a583fe-9210-4ce3-8b46-b0771a3afd1a" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20220520T105559Z:41a583fe-9210-4ce3-8b46-b0771a3afd1a" ], + "Date": [ "Fri, 20 May 2022 10:55:59 GMT" ] }, "ContentHeaders": { "Content-Length": [ "28" ], @@ -319,10 +319,10 @@ "isContentBase64": false } }, - "AzKubernetesConfiguration+[NoContext]+K8sCreateExpanded+$PUT+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupcentralus/providers/Microsoft.Kubernetes/ConnectedClusters/6bsnda/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/ucpk94?api-version=2021-03-01+1": { + "AzKubernetesConfiguration+[NoContext]+K8sCreateExpanded+$PUT+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/u4c2b9?api-version=2022-03-01+1": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupcentralus/providers/Microsoft.Kubernetes/ConnectedClusters/6bsnda/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/ucpk94?api-version=2021-03-01", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/u4c2b9?api-version=2022-03-01", "Content": "{\r\n \"properties\": {\r\n \"repositoryUrl\": \"http://github.com/xxxx\",\r\n \"operatorType\": \"Flux\",\r\n \"operatorScope\": \"namespace\"\r\n }\r\n}", "isContentBase64": false, "Headers": { @@ -337,29 +337,29 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Location": [ "file:///subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupcentralus/providers/Microsoft.Kubernetes/ConnectedClusters/6bsnda/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/ucpk94" ], + "Location": [ "file:///subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/u4c2b9" ], "x-ms-ratelimit-remaining-subscription-writes": [ "1197" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "api-supported-versions": [ "2019-11-01-Preview, 2020-07-01-Preview, 2020-10-01-Preview, 2021-03-01, 2021-05-01-preview" ], + "api-supported-versions": [ "2019-11-01-Preview, 2020-07-01-Preview, 2020-10-01-Preview, 2021-03-01, 2021-05-01-preview, 2022-03-01" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "dc8c7bda-090b-47bb-bda3-48a4f48ea337" ], - "x-ms-correlation-request-id": [ "dc8c7bda-090b-47bb-bda3-48a4f48ea337" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20211028T030532Z:dc8c7bda-090b-47bb-bda3-48a4f48ea337" ], - "Date": [ "Thu, 28 Oct 2021 03:05:32 GMT" ] + "x-ms-request-id": [ "4c724a99-2d14-4ffe-9797-03f94d22c3df" ], + "x-ms-correlation-request-id": [ "4c724a99-2d14-4ffe-9797-03f94d22c3df" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20220520T105602Z:4c724a99-2d14-4ffe-9797-03f94d22c3df" ], + "Date": [ "Fri, 20 May 2022 10:56:02 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1050" ], + "Content-Length": [ "1047" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupcentralus/providers/Microsoft.Kubernetes/ConnectedClusters/6bsnda/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/ucpk94\",\"name\":\"ucpk94\",\"type\":\"Microsoft.KubernetesConfiguration/sourceControlConfigurations\",\"properties\":{\"operatorNamespace\":\"default\",\"provisioningState\":\"Succeeded\",\"complianceStatus\":{\"complianceState\":\"Pending\",\"lastConfigApplied\":\"0001-01-01T00:00:00+00:00\",\"message\":\"{\\\"OperatorMessage\\\":null,\\\"ClusterState\\\":null}\",\"messageLevel\":\"Information\"},\"enableHelmOperator\":false,\"repositoryUrl\":\"http://github.com/xxxx\",\"operatorInstanceName\":\"\",\"operatorType\":\"Flux\",\"operatorScope\":\"namespace\",\"operatorParams\":\"--git-readonly\",\"sshKnownHostsContents\":null,\"configurationProtectedSettings\":{},\"repositoryPublicKey\":\"\"},\"systemData\":{\"createdBy\":null,\"createdByType\":null,\"createdAt\":\"2021-10-28T03:05:32.2670612+00:00\",\"lastModifiedBy\":null,\"lastModifiedByType\":null,\"lastModifiedAt\":\"2021-10-28T03:05:32.2670612+00:00\"}}", + "Content": "{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/u4c2b9\",\"name\":\"u4c2b9\",\"type\":\"Microsoft.KubernetesConfiguration/sourceControlConfigurations\",\"properties\":{\"operatorNamespace\":\"default\",\"provisioningState\":\"Succeeded\",\"complianceStatus\":{\"complianceState\":\"Pending\",\"lastConfigApplied\":\"0001-01-01T00:00:00+00:00\",\"message\":\"{\\\"OperatorMessage\\\":null,\\\"ClusterState\\\":null}\",\"messageLevel\":\"Information\"},\"enableHelmOperator\":false,\"repositoryUrl\":\"http://github.com/xxxx\",\"operatorInstanceName\":\"\",\"operatorType\":\"Flux\",\"operatorScope\":\"namespace\",\"operatorParams\":\"--git-readonly\",\"sshKnownHostsContents\":null,\"configurationProtectedSettings\":{},\"repositoryPublicKey\":\"\"},\"systemData\":{\"createdBy\":null,\"createdByType\":null,\"createdAt\":\"2022-05-20T10:56:02.1182826+00:00\",\"lastModifiedBy\":null,\"lastModifiedByType\":null,\"lastModifiedAt\":\"2022-05-20T10:56:02.1182826+00:00\"}}", "isContentBase64": false } }, - "AzKubernetesConfiguration+[NoContext]+K8sCreateExpanded+$PUT+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupcentralus/providers/Microsoft.Kubernetes/ConnectedClusters/6bsnda/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/2htdrc?api-version=2021-03-01+2": { + "AzKubernetesConfiguration+[NoContext]+K8sCreateExpanded+$PUT+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/ha3sxe?api-version=2022-03-01+2": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupcentralus/providers/Microsoft.Kubernetes/ConnectedClusters/6bsnda/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/2htdrc?api-version=2021-03-01", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/ha3sxe?api-version=2022-03-01", "Content": "{\r\n \"properties\": {\r\n \"repositoryUrl\": \"http://github.com/xxxx\",\r\n \"operatorNamespace\": \"namespace-t01\",\r\n \"operatorType\": \"Flux\",\r\n \"operatorScope\": \"namespace\"\r\n }\r\n}", "isContentBase64": false, "Headers": { @@ -374,38 +374,38 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Location": [ "file:///subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupcentralus/providers/Microsoft.Kubernetes/ConnectedClusters/6bsnda/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/2htdrc" ], + "Location": [ "file:///subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/ha3sxe" ], "x-ms-ratelimit-remaining-subscription-writes": [ "1196" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "api-supported-versions": [ "2019-11-01-Preview, 2020-07-01-Preview, 2020-10-01-Preview, 2021-03-01, 2021-05-01-preview" ], + "api-supported-versions": [ "2019-11-01-Preview, 2020-07-01-Preview, 2020-10-01-Preview, 2021-03-01, 2021-05-01-preview, 2022-03-01" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "bd9bcb56-5a16-49f6-ab78-45c0849e8d1d" ], - "x-ms-correlation-request-id": [ "bd9bcb56-5a16-49f6-ab78-45c0849e8d1d" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20211028T030535Z:bd9bcb56-5a16-49f6-ab78-45c0849e8d1d" ], - "Date": [ "Thu, 28 Oct 2021 03:05:35 GMT" ] + "x-ms-request-id": [ "083506c5-fe97-46f2-8c17-6f89dc6135ea" ], + "x-ms-correlation-request-id": [ "083506c5-fe97-46f2-8c17-6f89dc6135ea" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20220520T105605Z:083506c5-fe97-46f2-8c17-6f89dc6135ea" ], + "Date": [ "Fri, 20 May 2022 10:56:05 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1056" ], + "Content-Length": [ "1053" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupcentralus/providers/Microsoft.Kubernetes/ConnectedClusters/6bsnda/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/2htdrc\",\"name\":\"2htdrc\",\"type\":\"Microsoft.KubernetesConfiguration/sourceControlConfigurations\",\"properties\":{\"operatorNamespace\":\"namespace-t01\",\"provisioningState\":\"Succeeded\",\"complianceStatus\":{\"complianceState\":\"Pending\",\"lastConfigApplied\":\"0001-01-01T00:00:00+00:00\",\"message\":\"{\\\"OperatorMessage\\\":null,\\\"ClusterState\\\":null}\",\"messageLevel\":\"Information\"},\"enableHelmOperator\":false,\"repositoryUrl\":\"http://github.com/xxxx\",\"operatorInstanceName\":\"\",\"operatorType\":\"Flux\",\"operatorScope\":\"namespace\",\"operatorParams\":\"--git-readonly\",\"sshKnownHostsContents\":null,\"configurationProtectedSettings\":{},\"repositoryPublicKey\":\"\"},\"systemData\":{\"createdBy\":null,\"createdByType\":null,\"createdAt\":\"2021-10-28T03:05:35.2632425+00:00\",\"lastModifiedBy\":null,\"lastModifiedByType\":null,\"lastModifiedAt\":\"2021-10-28T03:05:35.2632425+00:00\"}}", + "Content": "{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/ha3sxe\",\"name\":\"ha3sxe\",\"type\":\"Microsoft.KubernetesConfiguration/sourceControlConfigurations\",\"properties\":{\"operatorNamespace\":\"namespace-t01\",\"provisioningState\":\"Succeeded\",\"complianceStatus\":{\"complianceState\":\"Pending\",\"lastConfigApplied\":\"0001-01-01T00:00:00+00:00\",\"message\":\"{\\\"OperatorMessage\\\":null,\\\"ClusterState\\\":null}\",\"messageLevel\":\"Information\"},\"enableHelmOperator\":false,\"repositoryUrl\":\"http://github.com/xxxx\",\"operatorInstanceName\":\"\",\"operatorType\":\"Flux\",\"operatorScope\":\"namespace\",\"operatorParams\":\"--git-readonly\",\"sshKnownHostsContents\":null,\"configurationProtectedSettings\":{},\"repositoryPublicKey\":\"\"},\"systemData\":{\"createdBy\":null,\"createdByType\":null,\"createdAt\":\"2022-05-20T10:56:05.0008834+00:00\",\"lastModifiedBy\":null,\"lastModifiedByType\":null,\"lastModifiedAt\":\"2022-05-20T10:56:05.0008834+00:00\"}}", "isContentBase64": false } }, - "AzKubernetesConfiguration+[NoContext]+K8sList+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupcentralus/providers/Microsoft.Kubernetes/ConnectedClusters/6bsnda/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations?api-version=2021-03-01+1": { + "AzKubernetesConfiguration+[NoContext]+K8sList+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations?api-version=2022-03-01+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupcentralus/providers/Microsoft.Kubernetes/ConnectedClusters/6bsnda/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations?api-version=2021-03-01", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations?api-version=2022-03-01", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "13" ], - "x-ms-client-request-id": [ "8b4248cf-a9dd-4a87-be7a-fa5090ffac6a" ], + "x-ms-unique-id": [ "12" ], + "x-ms-client-request-id": [ "4dfa9b7b-17e0-44b0-a68e-fb6c14fba1e5" ], "CommandName": [ "Az.KubernetesConfiguration.internal\\Get-AzKubernetesConfiguration" ], "FullCommandName": [ "Get-AzKubernetesConfiguration_List" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.2", "Az.KubernetesConfiguration/0.2.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -416,37 +416,37 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11993" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11994" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "api-supported-versions": [ "2019-11-01-Preview, 2020-07-01-Preview, 2020-10-01-Preview, 2021-03-01, 2021-05-01-preview" ], + "api-supported-versions": [ "2019-11-01-Preview, 2020-07-01-Preview, 2020-10-01-Preview, 2021-03-01, 2021-05-01-preview, 2022-03-01" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "b1f0671d-a230-4374-a35e-f76e21fdea6d" ], - "x-ms-correlation-request-id": [ "b1f0671d-a230-4374-a35e-f76e21fdea6d" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20211028T030537Z:b1f0671d-a230-4374-a35e-f76e21fdea6d" ], - "Date": [ "Thu, 28 Oct 2021 03:05:37 GMT" ] + "x-ms-request-id": [ "bdc19989-a23e-441c-b1f1-a89f722f1756" ], + "x-ms-correlation-request-id": [ "bdc19989-a23e-441c-b1f1-a89f722f1756" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20220520T105607Z:bdc19989-a23e-441c-b1f1-a89f722f1756" ], + "Date": [ "Fri, 20 May 2022 10:56:07 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "2135" ], + "Content-Length": [ "2129" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"value\":[{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupcentralus/providers/Microsoft.Kubernetes/ConnectedClusters/6bsnda/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/2htdrc\",\"name\":\"2htdrc\",\"type\":\"Microsoft.KubernetesConfiguration/sourceControlConfigurations\",\"properties\":{\"operatorNamespace\":\"namespace-t01\",\"provisioningState\":\"Succeeded\",\"complianceStatus\":{\"complianceState\":\"Pending\",\"lastConfigApplied\":\"0001-01-01T00:00:00+00:00\",\"message\":\"{\\\"OperatorMessage\\\":null,\\\"ClusterState\\\":null}\",\"messageLevel\":\"Information\"},\"enableHelmOperator\":false,\"repositoryUrl\":\"http://github.com/xxxx\",\"operatorInstanceName\":\"\",\"operatorType\":\"Flux\",\"operatorScope\":\"namespace\",\"operatorParams\":\"--git-readonly\",\"sshKnownHostsContents\":null,\"configurationProtectedSettings\":{},\"repositoryPublicKey\":\"\"},\"systemData\":{\"createdBy\":null,\"createdByType\":null,\"createdAt\":\"2021-10-28T03:05:35.2632425+00:00\",\"lastModifiedBy\":null,\"lastModifiedByType\":null,\"lastModifiedAt\":\"2021-10-28T03:05:35.2632425+00:00\"}},{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupcentralus/providers/Microsoft.Kubernetes/ConnectedClusters/6bsnda/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/ucpk94\",\"name\":\"ucpk94\",\"type\":\"Microsoft.KubernetesConfiguration/sourceControlConfigurations\",\"properties\":{\"operatorNamespace\":\"default\",\"provisioningState\":\"Succeeded\",\"complianceStatus\":{\"complianceState\":\"Pending\",\"lastConfigApplied\":\"0001-01-01T00:00:00+00:00\",\"message\":\"{\\\"OperatorMessage\\\":null,\\\"ClusterState\\\":null}\",\"messageLevel\":\"Information\"},\"enableHelmOperator\":false,\"repositoryUrl\":\"http://github.com/xxxx\",\"operatorInstanceName\":\"\",\"operatorType\":\"Flux\",\"operatorScope\":\"namespace\",\"operatorParams\":\"--git-readonly\",\"sshKnownHostsContents\":null,\"configurationProtectedSettings\":{},\"repositoryPublicKey\":\"\"},\"systemData\":{\"createdBy\":null,\"createdByType\":null,\"createdAt\":\"2021-10-28T03:05:32.2670612+00:00\",\"lastModifiedBy\":null,\"lastModifiedByType\":null,\"lastModifiedAt\":\"2021-10-28T03:05:32.2670612+00:00\"}}],\"nextLink\":null}", + "Content": "{\"value\":[{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/ha3sxe\",\"name\":\"ha3sxe\",\"type\":\"Microsoft.KubernetesConfiguration/sourceControlConfigurations\",\"properties\":{\"operatorNamespace\":\"namespace-t01\",\"provisioningState\":\"Succeeded\",\"complianceStatus\":{\"complianceState\":\"Pending\",\"lastConfigApplied\":\"0001-01-01T00:00:00+00:00\",\"message\":\"{\\\"OperatorMessage\\\":null,\\\"ClusterState\\\":null}\",\"messageLevel\":\"Information\"},\"enableHelmOperator\":false,\"repositoryUrl\":\"http://github.com/xxxx\",\"operatorInstanceName\":\"\",\"operatorType\":\"Flux\",\"operatorScope\":\"namespace\",\"operatorParams\":\"--git-readonly\",\"sshKnownHostsContents\":null,\"configurationProtectedSettings\":{},\"repositoryPublicKey\":\"\"},\"systemData\":{\"createdBy\":null,\"createdByType\":null,\"createdAt\":\"2022-05-20T10:56:05.0008834+00:00\",\"lastModifiedBy\":null,\"lastModifiedByType\":null,\"lastModifiedAt\":\"2022-05-20T10:56:05.0008834+00:00\"}},{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/u4c2b9\",\"name\":\"u4c2b9\",\"type\":\"Microsoft.KubernetesConfiguration/sourceControlConfigurations\",\"properties\":{\"operatorNamespace\":\"default\",\"provisioningState\":\"Succeeded\",\"complianceStatus\":{\"complianceState\":\"Pending\",\"lastConfigApplied\":\"0001-01-01T00:00:00+00:00\",\"message\":\"{\\\"OperatorMessage\\\":null,\\\"ClusterState\\\":null}\",\"messageLevel\":\"Information\"},\"enableHelmOperator\":false,\"repositoryUrl\":\"http://github.com/xxxx\",\"operatorInstanceName\":\"\",\"operatorType\":\"Flux\",\"operatorScope\":\"namespace\",\"operatorParams\":\"--git-readonly\",\"sshKnownHostsContents\":null,\"configurationProtectedSettings\":{},\"repositoryPublicKey\":\"\"},\"systemData\":{\"createdBy\":null,\"createdByType\":null,\"createdAt\":\"2022-05-20T10:56:02.1182826+00:00\",\"lastModifiedBy\":null,\"lastModifiedByType\":null,\"lastModifiedAt\":\"2022-05-20T10:56:02.1182826+00:00\"}}],\"nextLink\":null}", "isContentBase64": false } }, - "AzKubernetesConfiguration+[NoContext]+K8sGet+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupcentralus/providers/Microsoft.Kubernetes/ConnectedClusters/6bsnda/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/ucpk94?api-version=2021-03-01+1": { + "AzKubernetesConfiguration+[NoContext]+K8sGet+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/u4c2b9?api-version=2022-03-01+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupcentralus/providers/Microsoft.Kubernetes/ConnectedClusters/6bsnda/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/ucpk94?api-version=2021-03-01", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/u4c2b9?api-version=2022-03-01", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "14" ], - "x-ms-client-request-id": [ "79f9b263-f2b8-43ac-b7da-17d7b52604fb" ], + "x-ms-unique-id": [ "13" ], + "x-ms-client-request-id": [ "39a9c5f1-9127-483b-8365-a5d62b09b7c4" ], "CommandName": [ "Az.KubernetesConfiguration.internal\\Get-AzKubernetesConfiguration" ], "FullCommandName": [ "Get-AzKubernetesConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.2", "Az.KubernetesConfiguration/0.2.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -457,37 +457,37 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11992" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11993" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "api-supported-versions": [ "2019-11-01-Preview, 2020-07-01-Preview, 2020-10-01-Preview, 2021-03-01, 2021-05-01-preview" ], + "api-supported-versions": [ "2019-11-01-Preview, 2020-07-01-Preview, 2020-10-01-Preview, 2021-03-01, 2021-05-01-preview, 2022-03-01" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "524c20f7-10f8-4abe-a42d-5ecb83cd88b2" ], - "x-ms-correlation-request-id": [ "524c20f7-10f8-4abe-a42d-5ecb83cd88b2" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20211028T030540Z:524c20f7-10f8-4abe-a42d-5ecb83cd88b2" ], - "Date": [ "Thu, 28 Oct 2021 03:05:40 GMT" ] + "x-ms-request-id": [ "0f9eb62d-956e-4e8f-b2a4-3c6144279aef" ], + "x-ms-correlation-request-id": [ "0f9eb62d-956e-4e8f-b2a4-3c6144279aef" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20220520T105610Z:0f9eb62d-956e-4e8f-b2a4-3c6144279aef" ], + "Date": [ "Fri, 20 May 2022 10:56:09 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1050" ], + "Content-Length": [ "1047" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupcentralus/providers/Microsoft.Kubernetes/ConnectedClusters/6bsnda/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/ucpk94\",\"name\":\"ucpk94\",\"type\":\"Microsoft.KubernetesConfiguration/sourceControlConfigurations\",\"properties\":{\"operatorNamespace\":\"default\",\"provisioningState\":\"Succeeded\",\"complianceStatus\":{\"complianceState\":\"Pending\",\"lastConfigApplied\":\"0001-01-01T00:00:00+00:00\",\"message\":\"{\\\"OperatorMessage\\\":null,\\\"ClusterState\\\":null}\",\"messageLevel\":\"Information\"},\"enableHelmOperator\":false,\"repositoryUrl\":\"http://github.com/xxxx\",\"operatorInstanceName\":\"\",\"operatorType\":\"Flux\",\"operatorScope\":\"namespace\",\"operatorParams\":\"--git-readonly\",\"sshKnownHostsContents\":null,\"configurationProtectedSettings\":{},\"repositoryPublicKey\":\"\"},\"systemData\":{\"createdBy\":null,\"createdByType\":null,\"createdAt\":\"2021-10-28T03:05:32.2670612+00:00\",\"lastModifiedBy\":null,\"lastModifiedByType\":null,\"lastModifiedAt\":\"2021-10-28T03:05:32.2670612+00:00\"}}", + "Content": "{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/u4c2b9\",\"name\":\"u4c2b9\",\"type\":\"Microsoft.KubernetesConfiguration/sourceControlConfigurations\",\"properties\":{\"operatorNamespace\":\"default\",\"provisioningState\":\"Succeeded\",\"complianceStatus\":{\"complianceState\":\"Pending\",\"lastConfigApplied\":\"0001-01-01T00:00:00+00:00\",\"message\":\"{\\\"OperatorMessage\\\":null,\\\"ClusterState\\\":null}\",\"messageLevel\":\"Information\"},\"enableHelmOperator\":false,\"repositoryUrl\":\"http://github.com/xxxx\",\"operatorInstanceName\":\"\",\"operatorType\":\"Flux\",\"operatorScope\":\"namespace\",\"operatorParams\":\"--git-readonly\",\"sshKnownHostsContents\":null,\"configurationProtectedSettings\":{},\"repositoryPublicKey\":\"\"},\"systemData\":{\"createdBy\":null,\"createdByType\":null,\"createdAt\":\"2022-05-20T10:56:02.1182826+00:00\",\"lastModifiedBy\":null,\"lastModifiedByType\":null,\"lastModifiedAt\":\"2022-05-20T10:56:02.1182826+00:00\"}}", "isContentBase64": false } }, - "AzKubernetesConfiguration+[NoContext]+K8sDelete+$DELETE+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupcentralus/providers/Microsoft.Kubernetes/ConnectedClusters/6bsnda/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/ucpk94?api-version=2021-03-01+1": { + "AzKubernetesConfiguration+[NoContext]+K8sDelete+$DELETE+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/u4c2b9?api-version=2022-03-01+1": { "Request": { "Method": "DELETE", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupcentralus/providers/Microsoft.Kubernetes/ConnectedClusters/6bsnda/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/ucpk94?api-version=2021-03-01", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/u4c2b9?api-version=2022-03-01", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "15" ], - "x-ms-client-request-id": [ "9f19a52a-8d27-46a4-b682-4501395df71a" ], + "x-ms-unique-id": [ "14" ], + "x-ms-client-request-id": [ "6b7c0fb7-42b1-42c4-98d6-30b23cb4337c" ], "CommandName": [ "Az.KubernetesConfiguration.internal\\Remove-AzKubernetesConfiguration" ], "FullCommandName": [ "Remove-AzKubernetesConfiguration_Delete" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.2", "Az.KubernetesConfiguration/0.2.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -500,12 +500,12 @@ "Pragma": [ "no-cache" ], "x-ms-ratelimit-remaining-subscription-deletes": [ "14997" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "api-supported-versions": [ "2019-11-01-Preview, 2020-07-01-Preview, 2020-10-01-Preview, 2021-03-01, 2021-05-01-preview" ], + "api-supported-versions": [ "2019-11-01-Preview, 2020-07-01-Preview, 2020-10-01-Preview, 2021-03-01, 2021-05-01-preview, 2022-03-01" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "b73bf39f-50dd-4352-a735-06ff47c5cbf7" ], - "x-ms-correlation-request-id": [ "b73bf39f-50dd-4352-a735-06ff47c5cbf7" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20211028T030541Z:b73bf39f-50dd-4352-a735-06ff47c5cbf7" ], - "Date": [ "Thu, 28 Oct 2021 03:05:41 GMT" ] + "x-ms-request-id": [ "68c5ac45-5856-408a-962f-e372d7545b69" ], + "x-ms-correlation-request-id": [ "68c5ac45-5856-408a-962f-e372d7545b69" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20220520T105612Z:68c5ac45-5856-408a-962f-e372d7545b69" ], + "Date": [ "Fri, 20 May 2022 10:56:11 GMT" ] }, "ContentHeaders": { "Content-Length": [ "152" ], @@ -516,19 +516,19 @@ "isContentBase64": false } }, - "AzKubernetesConfiguration+[NoContext]+K8sDeleteViaIdentity+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupcentralus/providers/Microsoft.Kubernetes/ConnectedClusters/6bsnda/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/2htdrc?api-version=2021-03-01+1": { + "AzKubernetesConfiguration+[NoContext]+K8sDeleteViaIdentity+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/ha3sxe?api-version=2022-03-01+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupcentralus/providers/Microsoft.Kubernetes/ConnectedClusters/6bsnda/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/2htdrc?api-version=2021-03-01", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/ha3sxe?api-version=2022-03-01", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "16" ], - "x-ms-client-request-id": [ "3ef6669b-e89f-482e-ac6e-2cc19cadf502" ], + "x-ms-unique-id": [ "15" ], + "x-ms-client-request-id": [ "9db3f10f-0d9b-4801-8c56-c3f885806b7f" ], "CommandName": [ "Az.KubernetesConfiguration.internal\\Get-AzKubernetesConfiguration" ], "FullCommandName": [ "Get-AzKubernetesConfiguration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.2", "Az.KubernetesConfiguration/0.2.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -539,37 +539,37 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11991" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11992" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "api-supported-versions": [ "2019-11-01-Preview, 2020-07-01-Preview, 2020-10-01-Preview, 2021-03-01, 2021-05-01-preview" ], + "api-supported-versions": [ "2019-11-01-Preview, 2020-07-01-Preview, 2020-10-01-Preview, 2021-03-01, 2021-05-01-preview, 2022-03-01" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "d147e51e-b059-48d7-8837-9b4548686bc0" ], - "x-ms-correlation-request-id": [ "d147e51e-b059-48d7-8837-9b4548686bc0" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20211028T030543Z:d147e51e-b059-48d7-8837-9b4548686bc0" ], - "Date": [ "Thu, 28 Oct 2021 03:05:43 GMT" ] + "x-ms-request-id": [ "811b5c66-82f4-4ffa-ac34-eef5ae5d4d1d" ], + "x-ms-correlation-request-id": [ "811b5c66-82f4-4ffa-ac34-eef5ae5d4d1d" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20220520T105614Z:811b5c66-82f4-4ffa-ac34-eef5ae5d4d1d" ], + "Date": [ "Fri, 20 May 2022 10:56:14 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1056" ], + "Content-Length": [ "1053" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupcentralus/providers/Microsoft.Kubernetes/ConnectedClusters/6bsnda/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/2htdrc\",\"name\":\"2htdrc\",\"type\":\"Microsoft.KubernetesConfiguration/sourceControlConfigurations\",\"properties\":{\"operatorNamespace\":\"namespace-t01\",\"provisioningState\":\"Succeeded\",\"complianceStatus\":{\"complianceState\":\"Pending\",\"lastConfigApplied\":\"0001-01-01T00:00:00+00:00\",\"message\":\"{\\\"OperatorMessage\\\":null,\\\"ClusterState\\\":null}\",\"messageLevel\":\"Information\"},\"enableHelmOperator\":false,\"repositoryUrl\":\"http://github.com/xxxx\",\"operatorInstanceName\":\"\",\"operatorType\":\"Flux\",\"operatorScope\":\"namespace\",\"operatorParams\":\"--git-readonly\",\"sshKnownHostsContents\":null,\"configurationProtectedSettings\":{},\"repositoryPublicKey\":\"\"},\"systemData\":{\"createdBy\":null,\"createdByType\":null,\"createdAt\":\"2021-10-28T03:05:35.2632425+00:00\",\"lastModifiedBy\":null,\"lastModifiedByType\":null,\"lastModifiedAt\":\"2021-10-28T03:05:35.2632425+00:00\"}}", + "Content": "{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/ha3sxe\",\"name\":\"ha3sxe\",\"type\":\"Microsoft.KubernetesConfiguration/sourceControlConfigurations\",\"properties\":{\"operatorNamespace\":\"namespace-t01\",\"provisioningState\":\"Succeeded\",\"complianceStatus\":{\"complianceState\":\"Pending\",\"lastConfigApplied\":\"0001-01-01T00:00:00+00:00\",\"message\":\"{\\\"OperatorMessage\\\":null,\\\"ClusterState\\\":null}\",\"messageLevel\":\"Information\"},\"enableHelmOperator\":false,\"repositoryUrl\":\"http://github.com/xxxx\",\"operatorInstanceName\":\"\",\"operatorType\":\"Flux\",\"operatorScope\":\"namespace\",\"operatorParams\":\"--git-readonly\",\"sshKnownHostsContents\":null,\"configurationProtectedSettings\":{},\"repositoryPublicKey\":\"\"},\"systemData\":{\"createdBy\":null,\"createdByType\":null,\"createdAt\":\"2022-05-20T10:56:05.0008834+00:00\",\"lastModifiedBy\":null,\"lastModifiedByType\":null,\"lastModifiedAt\":\"2022-05-20T10:56:05.0008834+00:00\"}}", "isContentBase64": false } }, - "AzKubernetesConfiguration+[NoContext]+K8sDeleteViaIdentity+$DELETE+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupcentralus/providers/Microsoft.Kubernetes/ConnectedClusters/6bsnda/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/2htdrc?api-version=2021-03-01+2": { + "AzKubernetesConfiguration+[NoContext]+K8sDeleteViaIdentity+$DELETE+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/ha3sxe?api-version=2022-03-01+2": { "Request": { "Method": "DELETE", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupcentralus/providers/Microsoft.Kubernetes/ConnectedClusters/6bsnda/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/2htdrc?api-version=2021-03-01", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/ha3sxe?api-version=2022-03-01", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "17" ], - "x-ms-client-request-id": [ "05ad4f9b-1170-4edf-b993-c4162b3139ae" ], + "x-ms-unique-id": [ "16" ], + "x-ms-client-request-id": [ "f5315d99-8980-457b-bcdf-afc612efb791" ], "CommandName": [ "Az.KubernetesConfiguration.internal\\Remove-AzKubernetesConfiguration" ], "FullCommandName": [ "Remove-AzKubernetesConfiguration_DeleteViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.2", "Az.KubernetesConfiguration/0.2.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -582,12 +582,12 @@ "Pragma": [ "no-cache" ], "x-ms-ratelimit-remaining-subscription-deletes": [ "14996" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "api-supported-versions": [ "2019-11-01-Preview, 2020-07-01-Preview, 2020-10-01-Preview, 2021-03-01, 2021-05-01-preview" ], + "api-supported-versions": [ "2019-11-01-Preview, 2020-07-01-Preview, 2020-10-01-Preview, 2021-03-01, 2021-05-01-preview, 2022-03-01" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "029c18c3-c4c0-4797-8260-a6220de257d0" ], - "x-ms-correlation-request-id": [ "029c18c3-c4c0-4797-8260-a6220de257d0" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20211028T030545Z:029c18c3-c4c0-4797-8260-a6220de257d0" ], - "Date": [ "Thu, 28 Oct 2021 03:05:45 GMT" ] + "x-ms-request-id": [ "66beca57-f019-451a-99f1-6b602f669983" ], + "x-ms-correlation-request-id": [ "66beca57-f019-451a-99f1-6b602f669983" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20220520T105616Z:66beca57-f019-451a-99f1-6b602f669983" ], + "Date": [ "Fri, 20 May 2022 10:56:16 GMT" ] }, "ContentHeaders": { "Content-Length": [ "152" ], @@ -598,19 +598,19 @@ "isContentBase64": false } }, - "AzKubernetesConfiguration+[NoContext]+K8sDeleteViaIdentity+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupcentralus/providers/Microsoft.Kubernetes/ConnectedClusters/6bsnda/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations?api-version=2021-03-01+3": { + "AzKubernetesConfiguration+[NoContext]+K8sDeleteViaIdentity+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations?api-version=2022-03-01+3": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupcentralus/providers/Microsoft.Kubernetes/ConnectedClusters/6bsnda/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations?api-version=2021-03-01", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations?api-version=2022-03-01", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "18" ], - "x-ms-client-request-id": [ "8df50157-15d6-4681-a45a-aad83183ca6a" ], + "x-ms-unique-id": [ "17" ], + "x-ms-client-request-id": [ "5dcfc2af-282a-49e2-8fd3-602e6c70a533" ], "CommandName": [ "Az.KubernetesConfiguration.internal\\Get-AzKubernetesConfiguration" ], "FullCommandName": [ "Get-AzKubernetesConfiguration_List" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.2", "Az.KubernetesConfiguration/0.2.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -621,14 +621,14 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11990" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11991" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "api-supported-versions": [ "2019-11-01-Preview, 2020-07-01-Preview, 2020-10-01-Preview, 2021-03-01, 2021-05-01-preview" ], + "api-supported-versions": [ "2019-11-01-Preview, 2020-07-01-Preview, 2020-10-01-Preview, 2021-03-01, 2021-05-01-preview, 2022-03-01" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "5e7941a0-5a62-47b0-ae39-83bf0c46b006" ], - "x-ms-correlation-request-id": [ "5e7941a0-5a62-47b0-ae39-83bf0c46b006" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20211028T030547Z:5e7941a0-5a62-47b0-ae39-83bf0c46b006" ], - "Date": [ "Thu, 28 Oct 2021 03:05:47 GMT" ] + "x-ms-request-id": [ "6f56f783-8d29-4a2d-afa1-282c82a39c18" ], + "x-ms-correlation-request-id": [ "6f56f783-8d29-4a2d-afa1-282c82a39c18" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20220520T105619Z:6f56f783-8d29-4a2d-afa1-282c82a39c18" ], + "Date": [ "Fri, 20 May 2022 10:56:18 GMT" ] }, "ContentHeaders": { "Content-Length": [ "28" ], diff --git a/src/KubernetesConfiguration/test/AzKubernetesConfiguration.Tests.ps1 b/src/KubernetesConfiguration/test/AzKubernetesConfiguration.Tests.ps1 index 6bd17f68ed37..5969c844f49d 100644 --- a/src/KubernetesConfiguration/test/AzKubernetesConfiguration.Tests.ps1 +++ b/src/KubernetesConfiguration/test/AzKubernetesConfiguration.Tests.ps1 @@ -14,80 +14,80 @@ while(-not $mockingPath) { Describe 'AzKubernetesConfiguration' { It 'CreateExpanded' { { - $config = New-AzKubernetesConfiguration -Name $env.kubernetesConfigurationNameCUS1 -ClusterName $env.clusterNameCUS -ResourceGroupName $env.resourceGroupCUS -RepositoryUrl http://github.com/xxxx + $config = New-AzKubernetesConfiguration -Name $env.kubernetesConfigurationName1 -ClusterName $env.clusterName -ResourceGroupName $env.resourceGroup -RepositoryUrl http://github.com/xxxx -ClusterType ConnectedClusters $config.ProvisioningState | Should -Be 'Succeeded' - $config = New-AzKubernetesConfiguration -Name $env.kubernetesConfigurationNameCUS2 -ClusterName $env.clusterNameCUS -ResourceGroupName $env.resourceGroupCUS -RepositoryUrl http://github.com/xxxx -OperatorNamespace namespace-t01 + $config = New-AzKubernetesConfiguration -Name $env.kubernetesConfigurationName2 -ClusterName $env.clusterName -ResourceGroupName $env.resourceGroup -RepositoryUrl http://github.com/xxxx -OperatorNamespace namespace-t01 -ClusterType ConnectedClusters $config.ProvisioningState | Should -Be 'Succeeded' } | Should -Not -Throw } It 'List' { { - $config = Get-AzKubernetesConfiguration -ResourceGroupName $env.resourceGroupCUS -ClusterName $env.clusterNameCUS -ClusterType ConnectedClusters + $config = Get-AzKubernetesConfiguration -ResourceGroupName $env.resourceGroup -ClusterName $env.clusterName -ClusterType ConnectedClusters $config.Count | Should -Be 2 } | Should -Not -Throw } It 'Get' { { - $config = Get-AzKubernetesConfiguration -ResourceGroupName $env.resourceGroupCUS -ClusterName $env.clusterNameCUS -ClusterType ConnectedClusters -Name $env.kubernetesConfigurationNameCUS1 - $config.Name | Should -Be $env.kubernetesConfigurationNameCUS1 + $config = Get-AzKubernetesConfiguration -ResourceGroupName $env.resourceGroup -ClusterName $env.clusterName -ClusterType ConnectedClusters -Name $env.kubernetesConfigurationName1 + $config.Name | Should -Be $env.kubernetesConfigurationName1 } | Should -Not -Throw } It 'Delete' { { - Remove-AzKubernetesConfiguration -ResourceGroupName $env.resourceGroupCUS -ClusterName $env.clusterNameCUS -ClusterType ConnectedClusters -Name $env.kubernetesConfigurationNameCUS1 + Remove-AzKubernetesConfiguration -ResourceGroupName $env.resourceGroup -ClusterName $env.clusterName -ClusterType ConnectedClusters -Name $env.kubernetesConfigurationName1 } | Should -Not -Throw } It 'DeleteViaIdentity' { { - $config = Get-AzKubernetesConfiguration -ResourceGroupName $env.resourceGroupCUS -ClusterName $env.clusterNameCUS -ClusterType ConnectedClusters -Name $env.kubernetesConfigurationNameCUS2 + $config = Get-AzKubernetesConfiguration -ResourceGroupName $env.resourceGroup -ClusterName $env.clusterName -ClusterType ConnectedClusters -Name $env.kubernetesConfigurationName2 Remove-AzKubernetesConfiguration -InputObject $config - $config = Get-AzKubernetesConfiguration -ResourceGroupName $env.resourceGroupCUS -ClusterName $env.clusterNameCUS -ClusterType ConnectedClusters + $config = Get-AzKubernetesConfiguration -ResourceGroupName $env.resourceGroup -ClusterName $env.clusterName -ClusterType ConnectedClusters $config.Count | Should -Be 0 } | Should -Not -Throw } It 'K8sCreateExpanded' { { - $config = New-AzK8sConfiguration -Name $env.kubernetesConfigurationNameCUS1 -ClusterName $env.clusterNameCUS -ResourceGroupName $env.resourceGroupCUS -RepositoryUrl http://github.com/xxxx + $config = New-AzK8sConfiguration -Name $env.kubernetesConfigurationName1 -ClusterName $env.clusterName -ResourceGroupName $env.resourceGroup -RepositoryUrl http://github.com/xxxx -ClusterType ConnectedClusters $config.ProvisioningState | Should -Be 'Succeeded' - $config = New-AzK8sConfiguration -Name $env.kubernetesConfigurationNameCUS2 -ClusterName $env.clusterNameCUS -ResourceGroupName $env.resourceGroupCUS -RepositoryUrl http://github.com/xxxx -OperatorNamespace namespace-t01 + $config = New-AzK8sConfiguration -Name $env.kubernetesConfigurationName2 -ClusterName $env.clusterName -ResourceGroupName $env.resourceGroup -RepositoryUrl http://github.com/xxxx -OperatorNamespace namespace-t01 -ClusterType ConnectedClusters $config.ProvisioningState | Should -Be 'Succeeded' } | Should -Not -Throw } It 'K8sList' { { - $config = Get-AzK8sConfiguration -ResourceGroupName $env.resourceGroupCUS -ClusterName $env.clusterNameCUS -ClusterType ConnectedClusters + $config = Get-AzK8sConfiguration -ResourceGroupName $env.resourceGroup -ClusterName $env.clusterName -ClusterType ConnectedClusters $config.Count | Should -Be 2 } | Should -Not -Throw } It 'K8sGet' { { - $config = Get-AzK8sConfiguration -ResourceGroupName $env.resourceGroupCUS -ClusterName $env.clusterNameCUS -ClusterType ConnectedClusters -Name $env.kubernetesConfigurationNameCUS1 - $config.Name | Should -Be $env.kubernetesConfigurationNameCUS1 + $config = Get-AzK8sConfiguration -ResourceGroupName $env.resourceGroup -ClusterName $env.clusterName -ClusterType ConnectedClusters -Name $env.kubernetesConfigurationName1 + $config.Name | Should -Be $env.kubernetesConfigurationName1 } | Should -Not -Throw } It 'K8sDelete' { { - Remove-AzK8sConfiguration -ResourceGroupName $env.resourceGroupCUS -ClusterName $env.clusterNameCUS -ClusterType ConnectedClusters -Name $env.kubernetesConfigurationNameCUS1 + Remove-AzK8sConfiguration -ResourceGroupName $env.resourceGroup -ClusterName $env.clusterName -ClusterType ConnectedClusters -Name $env.kubernetesConfigurationName1 } | Should -Not -Throw } It 'K8sDeleteViaIdentity' { { - $config = Get-AzK8sConfiguration -ResourceGroupName $env.resourceGroupCUS -ClusterName $env.clusterNameCUS -ClusterType ConnectedClusters -Name $env.kubernetesConfigurationNameCUS2 + $config = Get-AzK8sConfiguration -ResourceGroupName $env.resourceGroup -ClusterName $env.clusterName -ClusterType ConnectedClusters -Name $env.kubernetesConfigurationName2 Remove-AzK8sConfiguration -InputObject $config - $config = Get-AzK8sConfiguration -ResourceGroupName $env.resourceGroupCUS -ClusterName $env.clusterNameCUS -ClusterType ConnectedClusters + $config = Get-AzK8sConfiguration -ResourceGroupName $env.resourceGroup -ClusterName $env.clusterName -ClusterType ConnectedClusters $config.Count | Should -Be 0 } | Should -Not -Throw } diff --git a/src/KubernetesConfiguration/test/AzKubernetesConfigurationFlux.Recording.json b/src/KubernetesConfiguration/test/AzKubernetesConfigurationFlux.Recording.json new file mode 100644 index 000000000000..4834d89072e7 --- /dev/null +++ b/src/KubernetesConfiguration/test/AzKubernetesConfigurationFlux.Recording.json @@ -0,0 +1,1736 @@ +{ + "AzKubernetesConfigurationFlux+[NoContext]+CreateExpanded+$PUT+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/extensions/flux?api-version=2022-03-01+1": { + "Request": { + "Method": "PUT", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/extensions/flux?api-version=2022-03-01", + "Content": "{\r\n \"properties\": {\r\n \"scope\": {\r\n \"cluster\": {\r\n \"releaseNamespace\": \"flux-system\"\r\n }\r\n },\r\n \"extensionType\": \"microsoft.flux\",\r\n \"autoUpgradeMinorVersion\": true\r\n },\r\n \"identity\": {\r\n \"type\": \"SystemAssigned\"\r\n }\r\n}", + "isContentBase64": false, + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "254" ] + } + }, + "Response": { + "StatusCode": 201, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Location": [ "https://eastus.rp.kubernetesconfiguration.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/extensions/flux" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1195" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "Azure-AsyncOperation": [ "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/extensions/flux/operations/4fe9ab1e-10c0-4e12-a568-829fdd6be9d7?api-Version=2022-03-01" ], + "api-supported-versions": [ "2022-03-01" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "d57d7198-4e9c-4b54-91a2-4b7c07f17d77" ], + "x-ms-correlation-request-id": [ "d57d7198-4e9c-4b54-91a2-4b7c07f17d77" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20220520T105624Z:d57d7198-4e9c-4b54-91a2-4b7c07f17d77" ], + "Date": [ "Fri, 20 May 2022 10:56:24 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "875" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/extensions/flux\",\"name\":\"flux\",\"type\":\"Microsoft.KubernetesConfiguration/extensions\",\"properties\":{\"extensionType\":\"microsoft.flux\",\"autoUpgradeMinorVersion\":true,\"releaseTrain\":\"Stable\",\"version\":null,\"scope\":{\"cluster\":{\"releaseNamespace\":\"flux-system\"}},\"provisioningState\":\"Creating\",\"configurationSettings\":{},\"configurationProtectedSettings\":{},\"statuses\":[],\"aksAssignedIdentity\":null},\"systemData\":{\"createdBy\":null,\"createdByType\":null,\"createdAt\":\"2022-05-20T10:56:24.7928552+00:00\",\"lastModifiedBy\":null,\"lastModifiedByType\":null,\"lastModifiedAt\":\"2022-05-20T10:56:24.7928552+00:00\"},\"identity\":{\"type\":\"SystemAssigned\",\"principalId\":\"4b56f699-87c2-483d-ab39-5a8c5ebd5020\"}}", + "isContentBase64": false + } + }, + "AzKubernetesConfigurationFlux+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/extensions/flux/operations/4fe9ab1e-10c0-4e12-a568-829fdd6be9d7?api-Version=2022-03-01+2": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/extensions/flux/operations/4fe9ab1e-10c0-4e12-a568-829fdd6be9d7?api-Version=2022-03-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "19" ], + "x-ms-client-request-id": [ "33edaac1-74ee-4e76-ae7b-7d616c30d2d2" ], + "CommandName": [ "Az.KubernetesConfiguration.internal\\New-AzKubernetesExtension" ], + "FullCommandName": [ "New-AzKubernetesExtension_CreateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.2", "Az.KubernetesConfiguration/0.2.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11990" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "api-supported-versions": [ "2019-11-01-Preview, 2021-05-01-preview, 2021-06-01-preview, 2021-09-01, 2021-11-01-preview, 2022-01-01-preview, 2022-03-01, 2022-04-02-preview" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "85b80da7-6afb-48a8-84f5-27b465d2214f" ], + "x-ms-correlation-request-id": [ "85b80da7-6afb-48a8-84f5-27b465d2214f" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20220520T105656Z:85b80da7-6afb-48a8-84f5-27b465d2214f" ], + "Date": [ "Fri, 20 May 2022 10:56:56 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "321" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/extensions/flux/operations/4fe9ab1e-10c0-4e12-a568-829fdd6be9d7\",\"name\":\"4fe9ab1e-10c0-4e12-a568-829fdd6be9d7\",\"status\":\"Creating\"}", + "isContentBase64": false + } + }, + "AzKubernetesConfigurationFlux+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/extensions/flux/operations/4fe9ab1e-10c0-4e12-a568-829fdd6be9d7?api-Version=2022-03-01+3": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/extensions/flux/operations/4fe9ab1e-10c0-4e12-a568-829fdd6be9d7?api-Version=2022-03-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "20" ], + "x-ms-client-request-id": [ "33edaac1-74ee-4e76-ae7b-7d616c30d2d2" ], + "CommandName": [ "Az.KubernetesConfiguration.internal\\New-AzKubernetesExtension" ], + "FullCommandName": [ "New-AzKubernetesExtension_CreateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.2", "Az.KubernetesConfiguration/0.2.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11989" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "api-supported-versions": [ "2019-11-01-Preview, 2021-05-01-preview, 2021-06-01-preview, 2021-09-01, 2021-11-01-preview, 2022-01-01-preview, 2022-03-01, 2022-04-02-preview" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "6870703e-b25c-4be1-8b40-d33a0e15c27f" ], + "x-ms-correlation-request-id": [ "6870703e-b25c-4be1-8b40-d33a0e15c27f" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20220520T105728Z:6870703e-b25c-4be1-8b40-d33a0e15c27f" ], + "Date": [ "Fri, 20 May 2022 10:57:27 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "321" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/extensions/flux/operations/4fe9ab1e-10c0-4e12-a568-829fdd6be9d7\",\"name\":\"4fe9ab1e-10c0-4e12-a568-829fdd6be9d7\",\"status\":\"Creating\"}", + "isContentBase64": false + } + }, + "AzKubernetesConfigurationFlux+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/extensions/flux/operations/4fe9ab1e-10c0-4e12-a568-829fdd6be9d7?api-Version=2022-03-01+4": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/extensions/flux/operations/4fe9ab1e-10c0-4e12-a568-829fdd6be9d7?api-Version=2022-03-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "21" ], + "x-ms-client-request-id": [ "33edaac1-74ee-4e76-ae7b-7d616c30d2d2" ], + "CommandName": [ "Az.KubernetesConfiguration.internal\\New-AzKubernetesExtension" ], + "FullCommandName": [ "New-AzKubernetesExtension_CreateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.2", "Az.KubernetesConfiguration/0.2.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11988" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "api-supported-versions": [ "2019-11-01-Preview, 2021-05-01-preview, 2021-06-01-preview, 2021-09-01, 2021-11-01-preview, 2022-01-01-preview, 2022-03-01, 2022-04-02-preview" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "da1afa2a-2515-4eef-8766-064a79935a1b" ], + "x-ms-correlation-request-id": [ "da1afa2a-2515-4eef-8766-064a79935a1b" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20220520T105800Z:da1afa2a-2515-4eef-8766-064a79935a1b" ], + "Date": [ "Fri, 20 May 2022 10:58:00 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "321" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/extensions/flux/operations/4fe9ab1e-10c0-4e12-a568-829fdd6be9d7\",\"name\":\"4fe9ab1e-10c0-4e12-a568-829fdd6be9d7\",\"status\":\"Creating\"}", + "isContentBase64": false + } + }, + "AzKubernetesConfigurationFlux+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/extensions/flux/operations/4fe9ab1e-10c0-4e12-a568-829fdd6be9d7?api-Version=2022-03-01+5": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/extensions/flux/operations/4fe9ab1e-10c0-4e12-a568-829fdd6be9d7?api-Version=2022-03-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "22" ], + "x-ms-client-request-id": [ "33edaac1-74ee-4e76-ae7b-7d616c30d2d2" ], + "CommandName": [ "Az.KubernetesConfiguration.internal\\New-AzKubernetesExtension" ], + "FullCommandName": [ "New-AzKubernetesExtension_CreateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.2", "Az.KubernetesConfiguration/0.2.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11987" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "api-supported-versions": [ "2019-11-01-Preview, 2021-05-01-preview, 2021-06-01-preview, 2021-09-01, 2021-11-01-preview, 2022-01-01-preview, 2022-03-01, 2022-04-02-preview" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "2c171735-e49f-4348-aa36-747f84ec027b" ], + "x-ms-correlation-request-id": [ "2c171735-e49f-4348-aa36-747f84ec027b" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20220520T105832Z:2c171735-e49f-4348-aa36-747f84ec027b" ], + "Date": [ "Fri, 20 May 2022 10:58:32 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "321" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/extensions/flux/operations/4fe9ab1e-10c0-4e12-a568-829fdd6be9d7\",\"name\":\"4fe9ab1e-10c0-4e12-a568-829fdd6be9d7\",\"status\":\"Creating\"}", + "isContentBase64": false + } + }, + "AzKubernetesConfigurationFlux+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/extensions/flux/operations/4fe9ab1e-10c0-4e12-a568-829fdd6be9d7?api-Version=2022-03-01+6": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/extensions/flux/operations/4fe9ab1e-10c0-4e12-a568-829fdd6be9d7?api-Version=2022-03-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "23" ], + "x-ms-client-request-id": [ "33edaac1-74ee-4e76-ae7b-7d616c30d2d2" ], + "CommandName": [ "Az.KubernetesConfiguration.internal\\New-AzKubernetesExtension" ], + "FullCommandName": [ "New-AzKubernetesExtension_CreateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.2", "Az.KubernetesConfiguration/0.2.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11986" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "api-supported-versions": [ "2019-11-01-Preview, 2021-05-01-preview, 2021-06-01-preview, 2021-09-01, 2021-11-01-preview, 2022-01-01-preview, 2022-03-01, 2022-04-02-preview" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "e1a63ee5-213f-46d8-b725-3bfd0cc9a84f" ], + "x-ms-correlation-request-id": [ "e1a63ee5-213f-46d8-b725-3bfd0cc9a84f" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20220520T105904Z:e1a63ee5-213f-46d8-b725-3bfd0cc9a84f" ], + "Date": [ "Fri, 20 May 2022 10:59:04 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "321" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/extensions/flux/operations/4fe9ab1e-10c0-4e12-a568-829fdd6be9d7\",\"name\":\"4fe9ab1e-10c0-4e12-a568-829fdd6be9d7\",\"status\":\"Creating\"}", + "isContentBase64": false + } + }, + "AzKubernetesConfigurationFlux+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/extensions/flux/operations/4fe9ab1e-10c0-4e12-a568-829fdd6be9d7?api-Version=2022-03-01+7": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/extensions/flux/operations/4fe9ab1e-10c0-4e12-a568-829fdd6be9d7?api-Version=2022-03-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "24" ], + "x-ms-client-request-id": [ "33edaac1-74ee-4e76-ae7b-7d616c30d2d2" ], + "CommandName": [ "Az.KubernetesConfiguration.internal\\New-AzKubernetesExtension" ], + "FullCommandName": [ "New-AzKubernetesExtension_CreateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.2", "Az.KubernetesConfiguration/0.2.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11985" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "api-supported-versions": [ "2019-11-01-Preview, 2021-05-01-preview, 2021-06-01-preview, 2021-09-01, 2021-11-01-preview, 2022-01-01-preview, 2022-03-01, 2022-04-02-preview" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "8f68a339-f74d-4574-8a63-c5c1be4efddb" ], + "x-ms-correlation-request-id": [ "8f68a339-f74d-4574-8a63-c5c1be4efddb" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20220520T105936Z:8f68a339-f74d-4574-8a63-c5c1be4efddb" ], + "Date": [ "Fri, 20 May 2022 10:59:35 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "322" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/extensions/flux/operations/4fe9ab1e-10c0-4e12-a568-829fdd6be9d7\",\"name\":\"4fe9ab1e-10c0-4e12-a568-829fdd6be9d7\",\"status\":\"Succeeded\"}", + "isContentBase64": false + } + }, + "AzKubernetesConfigurationFlux+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/extensions/flux?api-version=2022-03-01+8": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/extensions/flux?api-version=2022-03-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "25" ], + "x-ms-client-request-id": [ "33edaac1-74ee-4e76-ae7b-7d616c30d2d2" ], + "CommandName": [ "Az.KubernetesConfiguration.internal\\New-AzKubernetesExtension" ], + "FullCommandName": [ "New-AzKubernetesExtension_CreateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.2", "Az.KubernetesConfiguration/0.2.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11984" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "api-supported-versions": [ "2022-03-01" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "b21f531e-cce9-43bd-8e5d-d5fa32bbae29" ], + "x-ms-correlation-request-id": [ "b21f531e-cce9-43bd-8e5d-d5fa32bbae29" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20220520T105938Z:b21f531e-cce9-43bd-8e5d-d5fa32bbae29" ], + "Date": [ "Fri, 20 May 2022 10:59:37 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "879" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/extensions/flux\",\"name\":\"flux\",\"type\":\"Microsoft.KubernetesConfiguration/extensions\",\"properties\":{\"extensionType\":\"microsoft.flux\",\"autoUpgradeMinorVersion\":true,\"releaseTrain\":\"Stable\",\"version\":\"1.2.0\",\"scope\":{\"cluster\":{\"releaseNamespace\":\"flux-system\"}},\"provisioningState\":\"Succeeded\",\"configurationSettings\":{},\"configurationProtectedSettings\":{},\"statuses\":[],\"aksAssignedIdentity\":null},\"systemData\":{\"createdBy\":null,\"createdByType\":null,\"createdAt\":\"2022-05-20T10:56:24.7928552+00:00\",\"lastModifiedBy\":null,\"lastModifiedByType\":null,\"lastModifiedAt\":\"2022-05-20T10:56:24.7928552+00:00\"},\"identity\":{\"type\":\"SystemAssigned\",\"principalId\":\"4b56f699-87c2-483d-ab39-5a8c5ebd5020\"}}", + "isContentBase64": false + } + }, + "AzKubernetesConfigurationFlux+[NoContext]+CreateExpanded+$PUT+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/ol17ds?api-version=2022-03-01+9": { + "Request": { + "Method": "PUT", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/ol17ds?api-version=2022-03-01", + "Content": "{\r\n \"properties\": {\r\n \"gitRepository\": {\r\n \"repositoryRef\": {\r\n \"branch\": \"main\"\r\n },\r\n \"url\": \"https://github.com/Azure/gitops-flux2-kustomize-helm-mt\",\r\n \"timeoutInSeconds\": 600,\r\n \"syncIntervalInSeconds\": 600\r\n },\r\n \"scope\": \"cluster\",\r\n \"namespace\": \"namespace-t01\",\r\n \"sourceKind\": \"GitRepository\",\r\n \"suspend\": false,\r\n \"kustomizations\": {\r\n \"apps\": {\r\n \"path\": \"./apps/staging\",\r\n \"dependsOn\": [ \"infra\" ],\r\n \"prune\": true\r\n },\r\n \"infra\": {\r\n \"path\": \"./infrastructure\",\r\n \"prune\": true\r\n }\r\n }\r\n }\r\n}", + "isContentBase64": false, + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "621" ] + } + }, + "Response": { + "StatusCode": 201, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Location": [ "https://eastus.rp.kubernetesconfiguration.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/ol17ds" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1194" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "Azure-AsyncOperation": [ "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/ol17ds/operations/4f10c9d0-3b20-44f4-878c-1a90be8f94d2?api-version=2022-03-01" ], + "api-supported-versions": [ "2021-06-01-preview, 2021-11-01-preview, 2022-01-01-preview, 2022-03-01" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "79320210-1e56-4b51-b28c-af9365b38378" ], + "x-ms-correlation-request-id": [ "79320210-1e56-4b51-b28c-af9365b38378" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20220520T105942Z:79320210-1e56-4b51-b28c-af9365b38378" ], + "Date": [ "Fri, 20 May 2022 10:59:42 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "1497" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/ol17ds\",\"name\":\"ol17ds\",\"type\":\"Microsoft.KubernetesConfiguration/fluxConfigurations\",\"properties\":{\"scope\":\"cluster\",\"namespace\":\"namespace-t01\",\"sourceKind\":\"GitRepository\",\"suspend\":false,\"gitRepository\":{\"url\":\"https://github.com/Azure/gitops-flux2-kustomize-helm-mt\",\"timeoutInSeconds\":600,\"syncIntervalInSeconds\":600,\"repositoryRef\":{\"branch\":\"main\",\"tag\":null,\"semver\":null,\"commit\":null},\"sshKnownHosts\":null,\"httpsUser\":null,\"httpsCACert\":null,\"localAuthRef\":null},\"bucket\":null,\"kustomizations\":{\"apps\":{\"name\":\"apps\",\"path\":\"./apps/staging\",\"dependsOn\":[\"infra\"],\"timeoutInSeconds\":600,\"syncIntervalInSeconds\":600,\"retryIntervalInSeconds\":null,\"prune\":true,\"force\":false},\"infra\":{\"name\":\"infra\",\"path\":\"./infrastructure\",\"dependsOn\":null,\"timeoutInSeconds\":600,\"syncIntervalInSeconds\":600,\"retryIntervalInSeconds\":null,\"prune\":true,\"force\":false}},\"configurationProtectedSettings\":{},\"repositoryPublicKey\":null,\"sourceUpdatedAt\":null,\"statusUpdatedAt\":null,\"sourceSyncedCommitId\":null,\"complianceState\":null,\"provisioningState\":\"Creating\",\"errorMessage\":null,\"statuses\":[]},\"systemData\":{\"createdBy\":null,\"createdByType\":null,\"createdAt\":\"2022-05-20T10:59:42.6371119+00:00\",\"lastModifiedBy\":null,\"lastModifiedByType\":null,\"lastModifiedAt\":\"2022-05-20T10:59:42.6371119+00:00\"}}", + "isContentBase64": false + } + }, + "AzKubernetesConfigurationFlux+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/ol17ds/operations/4f10c9d0-3b20-44f4-878c-1a90be8f94d2?api-version=2022-03-01+10": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/ol17ds/operations/4f10c9d0-3b20-44f4-878c-1a90be8f94d2?api-version=2022-03-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "27" ], + "x-ms-client-request-id": [ "7209e863-da68-4d70-9bbe-71482d7e86ae" ], + "CommandName": [ "Az.KubernetesConfiguration.internal\\New-AzKubernetesConfigurationFlux" ], + "FullCommandName": [ "New-AzKubernetesConfigurationFlux_CreateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.2", "Az.KubernetesConfiguration/0.2.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11983" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "api-supported-versions": [ "2019-11-01-Preview, 2021-05-01-preview, 2021-06-01-preview, 2021-09-01, 2021-11-01-preview, 2022-01-01-preview, 2022-03-01, 2022-04-02-preview" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "45bbd801-5a7f-415e-a693-d6a187836710" ], + "x-ms-correlation-request-id": [ "45bbd801-5a7f-415e-a693-d6a187836710" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20220520T110014Z:45bbd801-5a7f-415e-a693-d6a187836710" ], + "Date": [ "Fri, 20 May 2022 11:00:13 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "331" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/ol17ds/operations/4f10c9d0-3b20-44f4-878c-1a90be8f94d2\",\"name\":\"4f10c9d0-3b20-44f4-878c-1a90be8f94d2\",\"status\":\"Creating\"}", + "isContentBase64": false + } + }, + "AzKubernetesConfigurationFlux+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/ol17ds/operations/4f10c9d0-3b20-44f4-878c-1a90be8f94d2?api-version=2022-03-01+11": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/ol17ds/operations/4f10c9d0-3b20-44f4-878c-1a90be8f94d2?api-version=2022-03-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "28" ], + "x-ms-client-request-id": [ "7209e863-da68-4d70-9bbe-71482d7e86ae" ], + "CommandName": [ "Az.KubernetesConfiguration.internal\\New-AzKubernetesConfigurationFlux" ], + "FullCommandName": [ "New-AzKubernetesConfigurationFlux_CreateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.2", "Az.KubernetesConfiguration/0.2.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11982" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "api-supported-versions": [ "2019-11-01-Preview, 2021-05-01-preview, 2021-06-01-preview, 2021-09-01, 2021-11-01-preview, 2022-01-01-preview, 2022-03-01, 2022-04-02-preview" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "d3f06d71-8df3-4a84-ae2a-136b0add0b6b" ], + "x-ms-correlation-request-id": [ "d3f06d71-8df3-4a84-ae2a-136b0add0b6b" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20220520T110046Z:d3f06d71-8df3-4a84-ae2a-136b0add0b6b" ], + "Date": [ "Fri, 20 May 2022 11:00:46 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "332" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/ol17ds/operations/4f10c9d0-3b20-44f4-878c-1a90be8f94d2\",\"name\":\"4f10c9d0-3b20-44f4-878c-1a90be8f94d2\",\"status\":\"Succeeded\"}", + "isContentBase64": false + } + }, + "AzKubernetesConfigurationFlux+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/ol17ds?api-version=2022-03-01+12": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/ol17ds?api-version=2022-03-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "29" ], + "x-ms-client-request-id": [ "7209e863-da68-4d70-9bbe-71482d7e86ae" ], + "CommandName": [ "Az.KubernetesConfiguration.internal\\New-AzKubernetesConfigurationFlux" ], + "FullCommandName": [ "New-AzKubernetesConfigurationFlux_CreateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.2", "Az.KubernetesConfiguration/0.2.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11981" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "api-supported-versions": [ "2021-06-01-preview, 2021-11-01-preview, 2022-01-01-preview, 2022-03-01" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "4ce14588-9fab-4c26-9ce6-f5ad6633f0f9" ], + "x-ms-correlation-request-id": [ "4ce14588-9fab-4c26-9ce6-f5ad6633f0f9" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20220520T110047Z:4ce14588-9fab-4c26-9ce6-f5ad6633f0f9" ], + "Date": [ "Fri, 20 May 2022 11:00:47 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "2988" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/ol17ds\",\"name\":\"ol17ds\",\"type\":\"Microsoft.KubernetesConfiguration/fluxConfigurations\",\"properties\":{\"scope\":\"cluster\",\"namespace\":\"namespace-t01\",\"sourceKind\":\"GitRepository\",\"suspend\":false,\"gitRepository\":{\"url\":\"https://github.com/Azure/gitops-flux2-kustomize-helm-mt\",\"timeoutInSeconds\":600,\"syncIntervalInSeconds\":600,\"repositoryRef\":{\"branch\":\"main\",\"tag\":null,\"semver\":null,\"commit\":null},\"sshKnownHosts\":null,\"httpsUser\":null,\"httpsCACert\":null,\"localAuthRef\":null},\"bucket\":null,\"kustomizations\":{\"apps\":{\"name\":\"apps\",\"path\":\"./apps/staging\",\"dependsOn\":[\"infra\"],\"timeoutInSeconds\":600,\"syncIntervalInSeconds\":600,\"retryIntervalInSeconds\":null,\"prune\":true,\"force\":false},\"infra\":{\"name\":\"infra\",\"path\":\"./infrastructure\",\"dependsOn\":null,\"timeoutInSeconds\":600,\"syncIntervalInSeconds\":600,\"retryIntervalInSeconds\":null,\"prune\":true,\"force\":false}},\"configurationProtectedSettings\":{},\"repositoryPublicKey\":\"\",\"sourceUpdatedAt\":\"2022-05-20T11:00:05+00:00\",\"statusUpdatedAt\":\"2022-05-20T11:00:17.422+00:00\",\"sourceSyncedCommitId\":\"main/c4e327286379495f8b6edc2c9c208095b6cc53ab\",\"complianceState\":\"Non-Compliant\",\"provisioningState\":\"Succeeded\",\"errorMessage\":\"\",\"statuses\":[{\"name\":\"ol17ds\",\"namespace\":\"namespace-t01\",\"kind\":\"GitRepository\",\"complianceState\":\"Compliant\",\"appliedBy\":null,\"statusConditions\":[{\"lastTransitionTime\":\"2022-05-20T11:00:05+00:00\",\"message\":\"stored artifact for revision \u0027main/c4e327286379495f8b6edc2c9c208095b6cc53ab\u0027\",\"reason\":\"Succeeded\",\"status\":\"True\",\"type\":\"Ready\"},{\"lastTransitionTime\":\"2022-05-20T11:00:05+00:00\",\"message\":\"stored artifact for revision \u0027main/c4e327286379495f8b6edc2c9c208095b6cc53ab\u0027\",\"reason\":\"Succeeded\",\"status\":\"True\",\"type\":\"ArtifactInStorage\"}],\"helmReleaseProperties\":null},{\"name\":\"ol17ds-apps\",\"namespace\":\"namespace-t01\",\"kind\":\"Kustomization\",\"complianceState\":\"Non-Compliant\",\"appliedBy\":null,\"statusConditions\":[{\"lastTransitionTime\":\"2022-05-20T11:00:04+00:00\",\"message\":\"dependency \u0027namespace-t01/ol17ds-infra\u0027 is not ready\",\"reason\":\"DependencyNotReady\",\"status\":\"False\",\"type\":\"Ready\"}],\"helmReleaseProperties\":null},{\"name\":\"ol17ds-infra\",\"namespace\":\"namespace-t01\",\"kind\":\"Kustomization\",\"complianceState\":\"Non-Compliant\",\"appliedBy\":null,\"statusConditions\":[{\"lastTransitionTime\":\"2022-05-20T11:00:07+00:00\",\"message\":\"ConfigMap/cluster-config/redis-values-dc97h9995t namespace not specified, error: namespaces \\\"cluster-config\\\" not found\\nNamespace/nginx created\\nNamespace/redis created\\n\",\"reason\":\"ReconciliationFailed\",\"status\":\"False\",\"type\":\"Ready\"}],\"helmReleaseProperties\":null}]},\"systemData\":{\"createdBy\":null,\"createdByType\":null,\"createdAt\":\"2022-05-20T10:59:42.6371119+00:00\",\"lastModifiedBy\":null,\"lastModifiedByType\":null,\"lastModifiedAt\":\"2022-05-20T10:59:42.6371119+00:00\"}}", + "isContentBase64": false + } + }, + "AzKubernetesConfigurationFlux+[NoContext]+List+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/fluxConfigurations?api-version=2022-03-01+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/fluxConfigurations?api-version=2022-03-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "30" ], + "x-ms-client-request-id": [ "c6d7870d-1d10-4348-990e-f4ee633e646a" ], + "CommandName": [ "Az.KubernetesConfiguration.internal\\Get-AzKubernetesConfigurationFlux" ], + "FullCommandName": [ "Get-AzKubernetesConfigurationFlux_List" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.2", "Az.KubernetesConfiguration/0.2.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11980" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "api-supported-versions": [ "2021-06-01-preview, 2021-11-01-preview, 2022-01-01-preview, 2022-03-01" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "d928ab32-3e6a-4da9-a268-4199c2accd6a" ], + "x-ms-correlation-request-id": [ "d928ab32-3e6a-4da9-a268-4199c2accd6a" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20220520T110050Z:d928ab32-3e6a-4da9-a268-4199c2accd6a" ], + "Date": [ "Fri, 20 May 2022 11:00:50 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "2151" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"value\":[{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/ol17ds\",\"name\":\"ol17ds\",\"type\":\"Microsoft.KubernetesConfiguration/fluxConfigurations\",\"properties\":{\"scope\":\"cluster\",\"namespace\":\"namespace-t01\",\"sourceKind\":\"GitRepository\",\"suspend\":false,\"gitRepository\":{\"url\":\"https://github.com/Azure/gitops-flux2-kustomize-helm-mt\",\"timeoutInSeconds\":600,\"syncIntervalInSeconds\":600,\"repositoryRef\":{\"branch\":\"main\",\"tag\":null,\"semver\":null,\"commit\":null},\"sshKnownHosts\":null,\"httpsUser\":null,\"httpsCACert\":null,\"localAuthRef\":null},\"bucket\":null,\"kustomizations\":{\"apps\":{\"name\":\"apps\",\"path\":\"./apps/staging\",\"dependsOn\":[\"infra\"],\"timeoutInSeconds\":600,\"syncIntervalInSeconds\":600,\"retryIntervalInSeconds\":null,\"prune\":true,\"force\":false},\"infra\":{\"name\":\"infra\",\"path\":\"./infrastructure\",\"dependsOn\":null,\"timeoutInSeconds\":600,\"syncIntervalInSeconds\":600,\"retryIntervalInSeconds\":null,\"prune\":true,\"force\":false}},\"configurationProtectedSettings\":{},\"repositoryPublicKey\":\"\",\"sourceUpdatedAt\":\"2022-05-20T11:00:05+00:00\",\"statusUpdatedAt\":\"2022-05-20T11:00:17.422+00:00\",\"sourceSyncedCommitId\":\"main/c4e327286379495f8b6edc2c9c208095b6cc53ab\",\"complianceState\":\"Non-Compliant\",\"provisioningState\":\"Succeeded\",\"errorMessage\":\"\",\"statuses\":[{\"name\":\"ol17ds\",\"namespace\":\"namespace-t01\",\"kind\":\"GitRepository\",\"complianceState\":\"Compliant\",\"appliedBy\":null,\"statusConditions\":null,\"helmReleaseProperties\":null},{\"name\":\"ol17ds-apps\",\"namespace\":\"namespace-t01\",\"kind\":\"Kustomization\",\"complianceState\":\"Non-Compliant\",\"appliedBy\":null,\"statusConditions\":null,\"helmReleaseProperties\":null},{\"name\":\"ol17ds-infra\",\"namespace\":\"namespace-t01\",\"kind\":\"Kustomization\",\"complianceState\":\"Non-Compliant\",\"appliedBy\":null,\"statusConditions\":null,\"helmReleaseProperties\":null}]},\"systemData\":{\"createdBy\":null,\"createdByType\":null,\"createdAt\":\"2022-05-20T10:59:42.6371119+00:00\",\"lastModifiedBy\":null,\"lastModifiedByType\":null,\"lastModifiedAt\":\"2022-05-20T10:59:42.6371119+00:00\"}}],\"nextLink\":null}", + "isContentBase64": false + } + }, + "AzKubernetesConfigurationFlux+[NoContext]+Get+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/ol17ds?api-version=2022-03-01+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/ol17ds?api-version=2022-03-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "31" ], + "x-ms-client-request-id": [ "e13510ec-0a13-402e-b6c2-a08d72137089" ], + "CommandName": [ "Az.KubernetesConfiguration.internal\\Get-AzKubernetesConfigurationFlux" ], + "FullCommandName": [ "Get-AzKubernetesConfigurationFlux_Get" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.2", "Az.KubernetesConfiguration/0.2.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11979" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "api-supported-versions": [ "2021-06-01-preview, 2021-11-01-preview, 2022-01-01-preview, 2022-03-01" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "bbeec8a5-8346-41af-b59e-71ecdb087882" ], + "x-ms-correlation-request-id": [ "bbeec8a5-8346-41af-b59e-71ecdb087882" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20220520T110053Z:bbeec8a5-8346-41af-b59e-71ecdb087882" ], + "Date": [ "Fri, 20 May 2022 11:00:53 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "2988" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/ol17ds\",\"name\":\"ol17ds\",\"type\":\"Microsoft.KubernetesConfiguration/fluxConfigurations\",\"properties\":{\"scope\":\"cluster\",\"namespace\":\"namespace-t01\",\"sourceKind\":\"GitRepository\",\"suspend\":false,\"gitRepository\":{\"url\":\"https://github.com/Azure/gitops-flux2-kustomize-helm-mt\",\"timeoutInSeconds\":600,\"syncIntervalInSeconds\":600,\"repositoryRef\":{\"branch\":\"main\",\"tag\":null,\"semver\":null,\"commit\":null},\"sshKnownHosts\":null,\"httpsUser\":null,\"httpsCACert\":null,\"localAuthRef\":null},\"bucket\":null,\"kustomizations\":{\"apps\":{\"name\":\"apps\",\"path\":\"./apps/staging\",\"dependsOn\":[\"infra\"],\"timeoutInSeconds\":600,\"syncIntervalInSeconds\":600,\"retryIntervalInSeconds\":null,\"prune\":true,\"force\":false},\"infra\":{\"name\":\"infra\",\"path\":\"./infrastructure\",\"dependsOn\":null,\"timeoutInSeconds\":600,\"syncIntervalInSeconds\":600,\"retryIntervalInSeconds\":null,\"prune\":true,\"force\":false}},\"configurationProtectedSettings\":{},\"repositoryPublicKey\":\"\",\"sourceUpdatedAt\":\"2022-05-20T11:00:05+00:00\",\"statusUpdatedAt\":\"2022-05-20T11:00:17.422+00:00\",\"sourceSyncedCommitId\":\"main/c4e327286379495f8b6edc2c9c208095b6cc53ab\",\"complianceState\":\"Non-Compliant\",\"provisioningState\":\"Succeeded\",\"errorMessage\":\"\",\"statuses\":[{\"name\":\"ol17ds\",\"namespace\":\"namespace-t01\",\"kind\":\"GitRepository\",\"complianceState\":\"Compliant\",\"appliedBy\":null,\"statusConditions\":[{\"lastTransitionTime\":\"2022-05-20T11:00:05+00:00\",\"message\":\"stored artifact for revision \u0027main/c4e327286379495f8b6edc2c9c208095b6cc53ab\u0027\",\"reason\":\"Succeeded\",\"status\":\"True\",\"type\":\"Ready\"},{\"lastTransitionTime\":\"2022-05-20T11:00:05+00:00\",\"message\":\"stored artifact for revision \u0027main/c4e327286379495f8b6edc2c9c208095b6cc53ab\u0027\",\"reason\":\"Succeeded\",\"status\":\"True\",\"type\":\"ArtifactInStorage\"}],\"helmReleaseProperties\":null},{\"name\":\"ol17ds-apps\",\"namespace\":\"namespace-t01\",\"kind\":\"Kustomization\",\"complianceState\":\"Non-Compliant\",\"appliedBy\":null,\"statusConditions\":[{\"lastTransitionTime\":\"2022-05-20T11:00:04+00:00\",\"message\":\"dependency \u0027namespace-t01/ol17ds-infra\u0027 is not ready\",\"reason\":\"DependencyNotReady\",\"status\":\"False\",\"type\":\"Ready\"}],\"helmReleaseProperties\":null},{\"name\":\"ol17ds-infra\",\"namespace\":\"namespace-t01\",\"kind\":\"Kustomization\",\"complianceState\":\"Non-Compliant\",\"appliedBy\":null,\"statusConditions\":[{\"lastTransitionTime\":\"2022-05-20T11:00:07+00:00\",\"message\":\"ConfigMap/cluster-config/redis-values-dc97h9995t namespace not specified, error: namespaces \\\"cluster-config\\\" not found\\nNamespace/nginx created\\nNamespace/redis created\\n\",\"reason\":\"ReconciliationFailed\",\"status\":\"False\",\"type\":\"Ready\"}],\"helmReleaseProperties\":null}]},\"systemData\":{\"createdBy\":null,\"createdByType\":null,\"createdAt\":\"2022-05-20T10:59:42.6371119+00:00\",\"lastModifiedBy\":null,\"lastModifiedByType\":null,\"lastModifiedAt\":\"2022-05-20T10:59:42.6371119+00:00\"}}", + "isContentBase64": false + } + }, + "AzKubernetesConfigurationFlux+[NoContext]+GetAzKubernetesConfigFluxOperationStatus+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/ol17ds/operations/e9871335-7ba8-4100-8cb4-73b3464eb863?api-version=2022-03-01+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/ol17ds/operations/e9871335-7ba8-4100-8cb4-73b3464eb863?api-version=2022-03-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "32" ], + "x-ms-client-request-id": [ "3245e6b3-9176-47fa-aa56-1b11badd23bf" ], + "CommandName": [ "Az.KubernetesConfiguration.internal\\Get-AzKubernetesConfigFluxOperationStatus" ], + "FullCommandName": [ "Get-AzKubernetesConfigFluxOperationStatus_Get" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.2", "Az.KubernetesConfiguration/0.2.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11978" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "api-supported-versions": [ "2019-11-01-Preview, 2021-05-01-preview, 2021-06-01-preview, 2021-09-01, 2021-11-01-preview, 2022-01-01-preview, 2022-03-01, 2022-04-02-preview" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "8c59b427-1ac3-40a6-b741-bae45e69270e" ], + "x-ms-correlation-request-id": [ "8c59b427-1ac3-40a6-b741-bae45e69270e" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20220520T110055Z:8c59b427-1ac3-40a6-b741-bae45e69270e" ], + "Date": [ "Fri, 20 May 2022 11:00:55 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "332" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/ol17ds/operations/e9871335-7ba8-4100-8cb4-73b3464eb863\",\"name\":\"e9871335-7ba8-4100-8cb4-73b3464eb863\",\"status\":\"Succeeded\"}", + "isContentBase64": false + } + }, + "AzKubernetesConfigurationFlux+[NoContext]+UpdateExpanded+$PATCH+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/ol17ds?api-version=2022-03-01+1": { + "Request": { + "Method": "PATCH", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/ol17ds?api-version=2022-03-01", + "Content": "{\r\n \"properties\": {\r\n \"gitRepository\": {\r\n \"repositoryRef\": {\r\n \"branch\": \"main\"\r\n },\r\n \"url\": \"https://github.com/Azure/gitops-flux2-kustomize-helm-mt\",\r\n \"timeoutInSeconds\": 600,\r\n \"syncIntervalInSeconds\": 600\r\n },\r\n \"sourceKind\": \"GitRepository\",\r\n \"suspend\": false\r\n }\r\n}", + "isContentBase64": false, + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "321" ] + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1193" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "api-supported-versions": [ "2021-06-01-preview, 2021-11-01-preview, 2022-01-01-preview, 2022-03-01" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "f6c3e03a-b668-4426-8fe5-d68d7d7d886f" ], + "x-ms-correlation-request-id": [ "f6c3e03a-b668-4426-8fe5-d68d7d7d886f" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20220520T110058Z:f6c3e03a-b668-4426-8fe5-d68d7d7d886f" ], + "Date": [ "Fri, 20 May 2022 11:00:57 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "2988" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/ol17ds\",\"name\":\"ol17ds\",\"type\":\"Microsoft.KubernetesConfiguration/fluxConfigurations\",\"properties\":{\"scope\":\"cluster\",\"namespace\":\"namespace-t01\",\"sourceKind\":\"GitRepository\",\"suspend\":false,\"gitRepository\":{\"url\":\"https://github.com/Azure/gitops-flux2-kustomize-helm-mt\",\"timeoutInSeconds\":600,\"syncIntervalInSeconds\":600,\"repositoryRef\":{\"branch\":\"main\",\"tag\":null,\"semver\":null,\"commit\":null},\"sshKnownHosts\":null,\"httpsUser\":null,\"httpsCACert\":null,\"localAuthRef\":null},\"bucket\":null,\"kustomizations\":{\"apps\":{\"name\":\"apps\",\"path\":\"./apps/staging\",\"dependsOn\":[\"infra\"],\"timeoutInSeconds\":600,\"syncIntervalInSeconds\":600,\"retryIntervalInSeconds\":null,\"prune\":true,\"force\":false},\"infra\":{\"name\":\"infra\",\"path\":\"./infrastructure\",\"dependsOn\":null,\"timeoutInSeconds\":600,\"syncIntervalInSeconds\":600,\"retryIntervalInSeconds\":null,\"prune\":true,\"force\":false}},\"configurationProtectedSettings\":{},\"repositoryPublicKey\":\"\",\"sourceUpdatedAt\":\"2022-05-20T11:00:05+00:00\",\"statusUpdatedAt\":\"2022-05-20T11:00:17.422+00:00\",\"sourceSyncedCommitId\":\"main/c4e327286379495f8b6edc2c9c208095b6cc53ab\",\"complianceState\":\"Non-Compliant\",\"provisioningState\":\"Succeeded\",\"errorMessage\":\"\",\"statuses\":[{\"name\":\"ol17ds\",\"namespace\":\"namespace-t01\",\"kind\":\"GitRepository\",\"complianceState\":\"Compliant\",\"appliedBy\":null,\"statusConditions\":[{\"lastTransitionTime\":\"2022-05-20T11:00:05+00:00\",\"message\":\"stored artifact for revision \u0027main/c4e327286379495f8b6edc2c9c208095b6cc53ab\u0027\",\"reason\":\"Succeeded\",\"status\":\"True\",\"type\":\"Ready\"},{\"lastTransitionTime\":\"2022-05-20T11:00:05+00:00\",\"message\":\"stored artifact for revision \u0027main/c4e327286379495f8b6edc2c9c208095b6cc53ab\u0027\",\"reason\":\"Succeeded\",\"status\":\"True\",\"type\":\"ArtifactInStorage\"}],\"helmReleaseProperties\":null},{\"name\":\"ol17ds-apps\",\"namespace\":\"namespace-t01\",\"kind\":\"Kustomization\",\"complianceState\":\"Non-Compliant\",\"appliedBy\":null,\"statusConditions\":[{\"lastTransitionTime\":\"2022-05-20T11:00:04+00:00\",\"message\":\"dependency \u0027namespace-t01/ol17ds-infra\u0027 is not ready\",\"reason\":\"DependencyNotReady\",\"status\":\"False\",\"type\":\"Ready\"}],\"helmReleaseProperties\":null},{\"name\":\"ol17ds-infra\",\"namespace\":\"namespace-t01\",\"kind\":\"Kustomization\",\"complianceState\":\"Non-Compliant\",\"appliedBy\":null,\"statusConditions\":[{\"lastTransitionTime\":\"2022-05-20T11:00:07+00:00\",\"message\":\"ConfigMap/cluster-config/redis-values-dc97h9995t namespace not specified, error: namespaces \\\"cluster-config\\\" not found\\nNamespace/nginx created\\nNamespace/redis created\\n\",\"reason\":\"ReconciliationFailed\",\"status\":\"False\",\"type\":\"Ready\"}],\"helmReleaseProperties\":null}]},\"systemData\":{\"createdBy\":null,\"createdByType\":null,\"createdAt\":\"2022-05-20T10:59:42.6371119+00:00\",\"lastModifiedBy\":null,\"lastModifiedByType\":null,\"lastModifiedAt\":\"2022-05-20T10:59:42.6371119+00:00\"}}", + "isContentBase64": false + } + }, + "AzKubernetesConfigurationFlux+[NoContext]+UpdateViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/ol17ds?api-version=2022-03-01+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/ol17ds?api-version=2022-03-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "34" ], + "x-ms-client-request-id": [ "1d9466ea-f7a4-4fdd-9d07-a3d5c5bc7529" ], + "CommandName": [ "Az.KubernetesConfiguration.internal\\Get-AzKubernetesConfigurationFlux" ], + "FullCommandName": [ "Get-AzKubernetesConfigurationFlux_Get" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.2", "Az.KubernetesConfiguration/0.2.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11977" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "api-supported-versions": [ "2021-06-01-preview, 2021-11-01-preview, 2022-01-01-preview, 2022-03-01" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "62be21c6-3183-4488-9ff4-7ab425e4eb1d" ], + "x-ms-correlation-request-id": [ "62be21c6-3183-4488-9ff4-7ab425e4eb1d" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20220520T110100Z:62be21c6-3183-4488-9ff4-7ab425e4eb1d" ], + "Date": [ "Fri, 20 May 2022 11:01:00 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "2988" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/ol17ds\",\"name\":\"ol17ds\",\"type\":\"Microsoft.KubernetesConfiguration/fluxConfigurations\",\"properties\":{\"scope\":\"cluster\",\"namespace\":\"namespace-t01\",\"sourceKind\":\"GitRepository\",\"suspend\":false,\"gitRepository\":{\"url\":\"https://github.com/Azure/gitops-flux2-kustomize-helm-mt\",\"timeoutInSeconds\":600,\"syncIntervalInSeconds\":600,\"repositoryRef\":{\"branch\":\"main\",\"tag\":null,\"semver\":null,\"commit\":null},\"sshKnownHosts\":null,\"httpsUser\":null,\"httpsCACert\":null,\"localAuthRef\":null},\"bucket\":null,\"kustomizations\":{\"apps\":{\"name\":\"apps\",\"path\":\"./apps/staging\",\"dependsOn\":[\"infra\"],\"timeoutInSeconds\":600,\"syncIntervalInSeconds\":600,\"retryIntervalInSeconds\":null,\"prune\":true,\"force\":false},\"infra\":{\"name\":\"infra\",\"path\":\"./infrastructure\",\"dependsOn\":null,\"timeoutInSeconds\":600,\"syncIntervalInSeconds\":600,\"retryIntervalInSeconds\":null,\"prune\":true,\"force\":false}},\"configurationProtectedSettings\":{},\"repositoryPublicKey\":\"\",\"sourceUpdatedAt\":\"2022-05-20T11:00:05+00:00\",\"statusUpdatedAt\":\"2022-05-20T11:00:17.422+00:00\",\"sourceSyncedCommitId\":\"main/c4e327286379495f8b6edc2c9c208095b6cc53ab\",\"complianceState\":\"Non-Compliant\",\"provisioningState\":\"Succeeded\",\"errorMessage\":\"\",\"statuses\":[{\"name\":\"ol17ds\",\"namespace\":\"namespace-t01\",\"kind\":\"GitRepository\",\"complianceState\":\"Compliant\",\"appliedBy\":null,\"statusConditions\":[{\"lastTransitionTime\":\"2022-05-20T11:00:05+00:00\",\"message\":\"stored artifact for revision \u0027main/c4e327286379495f8b6edc2c9c208095b6cc53ab\u0027\",\"reason\":\"Succeeded\",\"status\":\"True\",\"type\":\"Ready\"},{\"lastTransitionTime\":\"2022-05-20T11:00:05+00:00\",\"message\":\"stored artifact for revision \u0027main/c4e327286379495f8b6edc2c9c208095b6cc53ab\u0027\",\"reason\":\"Succeeded\",\"status\":\"True\",\"type\":\"ArtifactInStorage\"}],\"helmReleaseProperties\":null},{\"name\":\"ol17ds-apps\",\"namespace\":\"namespace-t01\",\"kind\":\"Kustomization\",\"complianceState\":\"Non-Compliant\",\"appliedBy\":null,\"statusConditions\":[{\"lastTransitionTime\":\"2022-05-20T11:00:04+00:00\",\"message\":\"dependency \u0027namespace-t01/ol17ds-infra\u0027 is not ready\",\"reason\":\"DependencyNotReady\",\"status\":\"False\",\"type\":\"Ready\"}],\"helmReleaseProperties\":null},{\"name\":\"ol17ds-infra\",\"namespace\":\"namespace-t01\",\"kind\":\"Kustomization\",\"complianceState\":\"Non-Compliant\",\"appliedBy\":null,\"statusConditions\":[{\"lastTransitionTime\":\"2022-05-20T11:00:07+00:00\",\"message\":\"ConfigMap/cluster-config/redis-values-dc97h9995t namespace not specified, error: namespaces \\\"cluster-config\\\" not found\\nNamespace/nginx created\\nNamespace/redis created\\n\",\"reason\":\"ReconciliationFailed\",\"status\":\"False\",\"type\":\"Ready\"}],\"helmReleaseProperties\":null}]},\"systemData\":{\"createdBy\":null,\"createdByType\":null,\"createdAt\":\"2022-05-20T10:59:42.6371119+00:00\",\"lastModifiedBy\":null,\"lastModifiedByType\":null,\"lastModifiedAt\":\"2022-05-20T10:59:42.6371119+00:00\"}}", + "isContentBase64": false + } + }, + "AzKubernetesConfigurationFlux+[NoContext]+UpdateViaIdentityExpanded+$PATCH+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/ol17ds?api-version=2022-03-01+2": { + "Request": { + "Method": "PATCH", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/ol17ds?api-version=2022-03-01", + "Content": "{\r\n \"properties\": {\r\n \"gitRepository\": {\r\n \"repositoryRef\": {\r\n \"branch\": \"main\"\r\n },\r\n \"url\": \"https://github.com/Azure/gitops-flux2-kustomize-helm-mt\",\r\n \"timeoutInSeconds\": 600,\r\n \"syncIntervalInSeconds\": 600\r\n },\r\n \"sourceKind\": \"GitRepository\",\r\n \"suspend\": false\r\n }\r\n}", + "isContentBase64": false, + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "321" ] + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1192" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "api-supported-versions": [ "2021-06-01-preview, 2021-11-01-preview, 2022-01-01-preview, 2022-03-01" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "f572ef1e-0c89-4065-8f1d-b1995d5e7209" ], + "x-ms-correlation-request-id": [ "f572ef1e-0c89-4065-8f1d-b1995d5e7209" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20220520T110103Z:f572ef1e-0c89-4065-8f1d-b1995d5e7209" ], + "Date": [ "Fri, 20 May 2022 11:01:03 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "2988" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/ol17ds\",\"name\":\"ol17ds\",\"type\":\"Microsoft.KubernetesConfiguration/fluxConfigurations\",\"properties\":{\"scope\":\"cluster\",\"namespace\":\"namespace-t01\",\"sourceKind\":\"GitRepository\",\"suspend\":false,\"gitRepository\":{\"url\":\"https://github.com/Azure/gitops-flux2-kustomize-helm-mt\",\"timeoutInSeconds\":600,\"syncIntervalInSeconds\":600,\"repositoryRef\":{\"branch\":\"main\",\"tag\":null,\"semver\":null,\"commit\":null},\"sshKnownHosts\":null,\"httpsUser\":null,\"httpsCACert\":null,\"localAuthRef\":null},\"bucket\":null,\"kustomizations\":{\"apps\":{\"name\":\"apps\",\"path\":\"./apps/staging\",\"dependsOn\":[\"infra\"],\"timeoutInSeconds\":600,\"syncIntervalInSeconds\":600,\"retryIntervalInSeconds\":null,\"prune\":true,\"force\":false},\"infra\":{\"name\":\"infra\",\"path\":\"./infrastructure\",\"dependsOn\":null,\"timeoutInSeconds\":600,\"syncIntervalInSeconds\":600,\"retryIntervalInSeconds\":null,\"prune\":true,\"force\":false}},\"configurationProtectedSettings\":{},\"repositoryPublicKey\":\"\",\"sourceUpdatedAt\":\"2022-05-20T11:00:05+00:00\",\"statusUpdatedAt\":\"2022-05-20T11:00:17.422+00:00\",\"sourceSyncedCommitId\":\"main/c4e327286379495f8b6edc2c9c208095b6cc53ab\",\"complianceState\":\"Non-Compliant\",\"provisioningState\":\"Succeeded\",\"errorMessage\":\"\",\"statuses\":[{\"name\":\"ol17ds\",\"namespace\":\"namespace-t01\",\"kind\":\"GitRepository\",\"complianceState\":\"Compliant\",\"appliedBy\":null,\"statusConditions\":[{\"lastTransitionTime\":\"2022-05-20T11:00:05+00:00\",\"message\":\"stored artifact for revision \u0027main/c4e327286379495f8b6edc2c9c208095b6cc53ab\u0027\",\"reason\":\"Succeeded\",\"status\":\"True\",\"type\":\"Ready\"},{\"lastTransitionTime\":\"2022-05-20T11:00:05+00:00\",\"message\":\"stored artifact for revision \u0027main/c4e327286379495f8b6edc2c9c208095b6cc53ab\u0027\",\"reason\":\"Succeeded\",\"status\":\"True\",\"type\":\"ArtifactInStorage\"}],\"helmReleaseProperties\":null},{\"name\":\"ol17ds-apps\",\"namespace\":\"namespace-t01\",\"kind\":\"Kustomization\",\"complianceState\":\"Non-Compliant\",\"appliedBy\":null,\"statusConditions\":[{\"lastTransitionTime\":\"2022-05-20T11:00:04+00:00\",\"message\":\"dependency \u0027namespace-t01/ol17ds-infra\u0027 is not ready\",\"reason\":\"DependencyNotReady\",\"status\":\"False\",\"type\":\"Ready\"}],\"helmReleaseProperties\":null},{\"name\":\"ol17ds-infra\",\"namespace\":\"namespace-t01\",\"kind\":\"Kustomization\",\"complianceState\":\"Non-Compliant\",\"appliedBy\":null,\"statusConditions\":[{\"lastTransitionTime\":\"2022-05-20T11:00:07+00:00\",\"message\":\"ConfigMap/cluster-config/redis-values-dc97h9995t namespace not specified, error: namespaces \\\"cluster-config\\\" not found\\nNamespace/nginx created\\nNamespace/redis created\\n\",\"reason\":\"ReconciliationFailed\",\"status\":\"False\",\"type\":\"Ready\"}],\"helmReleaseProperties\":null}]},\"systemData\":{\"createdBy\":null,\"createdByType\":null,\"createdAt\":\"2022-05-20T10:59:42.6371119+00:00\",\"lastModifiedBy\":null,\"lastModifiedByType\":null,\"lastModifiedAt\":\"2022-05-20T10:59:42.6371119+00:00\"}}", + "isContentBase64": false + } + }, + "AzKubernetesConfigurationFlux+[NoContext]+Delete+$DELETE+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/ol17ds?api-version=2022-03-01+1": { + "Request": { + "Method": "DELETE", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/ol17ds?api-version=2022-03-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "36" ], + "x-ms-client-request-id": [ "dd381cef-e12d-4ea8-b415-a39d36ec7611" ], + "CommandName": [ "Az.KubernetesConfiguration.internal\\Remove-AzKubernetesConfigurationFlux" ], + "FullCommandName": [ "Remove-AzKubernetesConfigurationFlux_Delete" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.2", "Az.KubernetesConfiguration/0.2.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 202, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-deletes": [ "14995" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "Azure-AsyncOperation": [ "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/ol17ds/operations/5440b0ac-9b15-4d0a-9320-788071966dae?api-version=2022-03-01" ], + "api-supported-versions": [ "2021-06-01-preview, 2021-11-01-preview, 2022-01-01-preview, 2022-03-01" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "db3bb0d0-1298-4166-922d-2f4edcde852c" ], + "x-ms-correlation-request-id": [ "db3bb0d0-1298-4166-922d-2f4edcde852c" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20220520T110105Z:db3bb0d0-1298-4166-922d-2f4edcde852c" ], + "Date": [ "Fri, 20 May 2022 11:01:05 GMT" ] + }, + "ContentHeaders": { + "Expires": [ "-1" ], + "Content-Length": [ "0" ] + }, + "Content": null, + "isContentBase64": false + } + }, + "AzKubernetesConfigurationFlux+[NoContext]+Delete+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/ol17ds/operations/5440b0ac-9b15-4d0a-9320-788071966dae?api-version=2022-03-01+2": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/ol17ds/operations/5440b0ac-9b15-4d0a-9320-788071966dae?api-version=2022-03-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "37" ], + "x-ms-client-request-id": [ "dd381cef-e12d-4ea8-b415-a39d36ec7611" ], + "CommandName": [ "Az.KubernetesConfiguration.internal\\Remove-AzKubernetesConfigurationFlux" ], + "FullCommandName": [ "Remove-AzKubernetesConfigurationFlux_Delete" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.2", "Az.KubernetesConfiguration/0.2.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11976" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "api-supported-versions": [ "2019-11-01-Preview, 2021-05-01-preview, 2021-06-01-preview, 2021-09-01, 2021-11-01-preview, 2022-01-01-preview, 2022-03-01, 2022-04-02-preview" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "05f678dd-c51a-4b72-bb81-f147c0bdad1f" ], + "x-ms-correlation-request-id": [ "05f678dd-c51a-4b72-bb81-f147c0bdad1f" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20220520T110137Z:05f678dd-c51a-4b72-bb81-f147c0bdad1f" ], + "Date": [ "Fri, 20 May 2022 11:01:36 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "331" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/ol17ds/operations/5440b0ac-9b15-4d0a-9320-788071966dae\",\"name\":\"5440b0ac-9b15-4d0a-9320-788071966dae\",\"status\":\"Deleting\"}", + "isContentBase64": false + } + }, + "AzKubernetesConfigurationFlux+[NoContext]+Delete+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/ol17ds/operations/5440b0ac-9b15-4d0a-9320-788071966dae?api-version=2022-03-01+3": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/ol17ds/operations/5440b0ac-9b15-4d0a-9320-788071966dae?api-version=2022-03-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "38" ], + "x-ms-client-request-id": [ "dd381cef-e12d-4ea8-b415-a39d36ec7611" ], + "CommandName": [ "Az.KubernetesConfiguration.internal\\Remove-AzKubernetesConfigurationFlux" ], + "FullCommandName": [ "Remove-AzKubernetesConfigurationFlux_Delete" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.2", "Az.KubernetesConfiguration/0.2.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11975" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "api-supported-versions": [ "2019-11-01-Preview, 2021-05-01-preview, 2021-06-01-preview, 2021-09-01, 2021-11-01-preview, 2022-01-01-preview, 2022-03-01, 2022-04-02-preview" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "d99c910f-4470-4e0c-a69f-a4aaac1e812b" ], + "x-ms-correlation-request-id": [ "d99c910f-4470-4e0c-a69f-a4aaac1e812b" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20220520T110209Z:d99c910f-4470-4e0c-a69f-a4aaac1e812b" ], + "Date": [ "Fri, 20 May 2022 11:02:08 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "331" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/ol17ds/operations/5440b0ac-9b15-4d0a-9320-788071966dae\",\"name\":\"5440b0ac-9b15-4d0a-9320-788071966dae\",\"status\":\"Deleting\"}", + "isContentBase64": false + } + }, + "AzKubernetesConfigurationFlux+[NoContext]+Delete+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/ol17ds/operations/5440b0ac-9b15-4d0a-9320-788071966dae?api-version=2022-03-01+4": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/ol17ds/operations/5440b0ac-9b15-4d0a-9320-788071966dae?api-version=2022-03-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "39" ], + "x-ms-client-request-id": [ "dd381cef-e12d-4ea8-b415-a39d36ec7611" ], + "CommandName": [ "Az.KubernetesConfiguration.internal\\Remove-AzKubernetesConfigurationFlux" ], + "FullCommandName": [ "Remove-AzKubernetesConfigurationFlux_Delete" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.2", "Az.KubernetesConfiguration/0.2.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11974" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "api-supported-versions": [ "2019-11-01-Preview, 2021-05-01-preview, 2021-06-01-preview, 2021-09-01, 2021-11-01-preview, 2022-01-01-preview, 2022-03-01, 2022-04-02-preview" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "fcddebfc-aa79-48c5-b8aa-58413933301e" ], + "x-ms-correlation-request-id": [ "fcddebfc-aa79-48c5-b8aa-58413933301e" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20220520T110241Z:fcddebfc-aa79-48c5-b8aa-58413933301e" ], + "Date": [ "Fri, 20 May 2022 11:02:41 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "332" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/ol17ds/operations/5440b0ac-9b15-4d0a-9320-788071966dae\",\"name\":\"5440b0ac-9b15-4d0a-9320-788071966dae\",\"status\":\"Succeeded\"}", + "isContentBase64": false + } + }, + "AzKubernetesConfigurationFlux+[NoContext]+Delete+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/ol17ds/operations/5440b0ac-9b15-4d0a-9320-788071966dae?api-version=2022-03-01+5": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/ol17ds/operations/5440b0ac-9b15-4d0a-9320-788071966dae?api-version=2022-03-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "40" ], + "x-ms-client-request-id": [ "dd381cef-e12d-4ea8-b415-a39d36ec7611" ], + "CommandName": [ "Az.KubernetesConfiguration.internal\\Remove-AzKubernetesConfigurationFlux" ], + "FullCommandName": [ "Remove-AzKubernetesConfigurationFlux_Delete" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.2", "Az.KubernetesConfiguration/0.2.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11973" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "api-supported-versions": [ "2019-11-01-Preview, 2021-05-01-preview, 2021-06-01-preview, 2021-09-01, 2021-11-01-preview, 2022-01-01-preview, 2022-03-01, 2022-04-02-preview" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "39e22885-eed0-4072-9ef0-12a89a95238b" ], + "x-ms-correlation-request-id": [ "39e22885-eed0-4072-9ef0-12a89a95238b" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20220520T110242Z:39e22885-eed0-4072-9ef0-12a89a95238b" ], + "Date": [ "Fri, 20 May 2022 11:02:42 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "332" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/ol17ds/operations/5440b0ac-9b15-4d0a-9320-788071966dae\",\"name\":\"5440b0ac-9b15-4d0a-9320-788071966dae\",\"status\":\"Succeeded\"}", + "isContentBase64": false + } + }, + "AzKubernetesConfigurationFlux+[NoContext]+K8sCreateExpanded+$PUT+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/a68b7j?api-version=2022-03-01+1": { + "Request": { + "Method": "PUT", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/a68b7j?api-version=2022-03-01", + "Content": "{\r\n \"properties\": {\r\n \"gitRepository\": {\r\n \"repositoryRef\": {\r\n \"branch\": \"main\"\r\n },\r\n \"url\": \"https://github.com/Azure/gitops-flux2-kustomize-helm-mt\",\r\n \"timeoutInSeconds\": 600,\r\n \"syncIntervalInSeconds\": 600\r\n },\r\n \"scope\": \"cluster\",\r\n \"namespace\": \"namespace-t01\",\r\n \"sourceKind\": \"GitRepository\",\r\n \"suspend\": false,\r\n \"kustomizations\": {\r\n \"apps\": {\r\n \"path\": \"./apps/staging\",\r\n \"dependsOn\": [ \"infra\" ],\r\n \"prune\": true\r\n },\r\n \"infra\": {\r\n \"path\": \"./infrastructure\",\r\n \"prune\": true\r\n }\r\n }\r\n }\r\n}", + "isContentBase64": false, + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "621" ] + } + }, + "Response": { + "StatusCode": 201, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Location": [ "https://eastus.rp.kubernetesconfiguration.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/a68b7j" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1191" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "Azure-AsyncOperation": [ "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/a68b7j/operations/acb8d35e-3612-4373-9524-146f25d1280d?api-version=2022-03-01" ], + "api-supported-versions": [ "2021-06-01-preview, 2021-11-01-preview, 2022-01-01-preview, 2022-03-01" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "e02184bc-26e5-4195-8632-f8670d6c89c4" ], + "x-ms-correlation-request-id": [ "e02184bc-26e5-4195-8632-f8670d6c89c4" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20220520T110246Z:e02184bc-26e5-4195-8632-f8670d6c89c4" ], + "Date": [ "Fri, 20 May 2022 11:02:46 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "1497" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/a68b7j\",\"name\":\"a68b7j\",\"type\":\"Microsoft.KubernetesConfiguration/fluxConfigurations\",\"properties\":{\"scope\":\"cluster\",\"namespace\":\"namespace-t01\",\"sourceKind\":\"GitRepository\",\"suspend\":false,\"gitRepository\":{\"url\":\"https://github.com/Azure/gitops-flux2-kustomize-helm-mt\",\"timeoutInSeconds\":600,\"syncIntervalInSeconds\":600,\"repositoryRef\":{\"branch\":\"main\",\"tag\":null,\"semver\":null,\"commit\":null},\"sshKnownHosts\":null,\"httpsUser\":null,\"httpsCACert\":null,\"localAuthRef\":null},\"bucket\":null,\"kustomizations\":{\"apps\":{\"name\":\"apps\",\"path\":\"./apps/staging\",\"dependsOn\":[\"infra\"],\"timeoutInSeconds\":600,\"syncIntervalInSeconds\":600,\"retryIntervalInSeconds\":null,\"prune\":true,\"force\":false},\"infra\":{\"name\":\"infra\",\"path\":\"./infrastructure\",\"dependsOn\":null,\"timeoutInSeconds\":600,\"syncIntervalInSeconds\":600,\"retryIntervalInSeconds\":null,\"prune\":true,\"force\":false}},\"configurationProtectedSettings\":{},\"repositoryPublicKey\":null,\"sourceUpdatedAt\":null,\"statusUpdatedAt\":null,\"sourceSyncedCommitId\":null,\"complianceState\":null,\"provisioningState\":\"Creating\",\"errorMessage\":null,\"statuses\":[]},\"systemData\":{\"createdBy\":null,\"createdByType\":null,\"createdAt\":\"2022-05-20T11:02:46.1375744+00:00\",\"lastModifiedBy\":null,\"lastModifiedByType\":null,\"lastModifiedAt\":\"2022-05-20T11:02:46.1375744+00:00\"}}", + "isContentBase64": false + } + }, + "AzKubernetesConfigurationFlux+[NoContext]+K8sCreateExpanded+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/a68b7j/operations/acb8d35e-3612-4373-9524-146f25d1280d?api-version=2022-03-01+2": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/a68b7j/operations/acb8d35e-3612-4373-9524-146f25d1280d?api-version=2022-03-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "42" ], + "x-ms-client-request-id": [ "3aaba001-dcea-4f06-8f10-3623f4c2bb62" ], + "CommandName": [ "Az.KubernetesConfiguration.internal\\New-AzKubernetesConfigurationFlux" ], + "FullCommandName": [ "New-AzKubernetesConfigurationFlux_CreateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.2", "Az.KubernetesConfiguration/0.2.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11972" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "api-supported-versions": [ "2019-11-01-Preview, 2021-05-01-preview, 2021-06-01-preview, 2021-09-01, 2021-11-01-preview, 2022-01-01-preview, 2022-03-01, 2022-04-02-preview" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "9709feca-b594-4bf8-b63b-97bf3e7803ae" ], + "x-ms-correlation-request-id": [ "9709feca-b594-4bf8-b63b-97bf3e7803ae" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20220520T110318Z:9709feca-b594-4bf8-b63b-97bf3e7803ae" ], + "Date": [ "Fri, 20 May 2022 11:03:17 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "331" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/a68b7j/operations/acb8d35e-3612-4373-9524-146f25d1280d\",\"name\":\"acb8d35e-3612-4373-9524-146f25d1280d\",\"status\":\"Creating\"}", + "isContentBase64": false + } + }, + "AzKubernetesConfigurationFlux+[NoContext]+K8sCreateExpanded+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/a68b7j/operations/acb8d35e-3612-4373-9524-146f25d1280d?api-version=2022-03-01+3": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/a68b7j/operations/acb8d35e-3612-4373-9524-146f25d1280d?api-version=2022-03-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "43" ], + "x-ms-client-request-id": [ "3aaba001-dcea-4f06-8f10-3623f4c2bb62" ], + "CommandName": [ "Az.KubernetesConfiguration.internal\\New-AzKubernetesConfigurationFlux" ], + "FullCommandName": [ "New-AzKubernetesConfigurationFlux_CreateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.2", "Az.KubernetesConfiguration/0.2.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11971" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "api-supported-versions": [ "2019-11-01-Preview, 2021-05-01-preview, 2021-06-01-preview, 2021-09-01, 2021-11-01-preview, 2022-01-01-preview, 2022-03-01, 2022-04-02-preview" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "612f7b89-014d-441f-bc03-f3e8a3f52e81" ], + "x-ms-correlation-request-id": [ "612f7b89-014d-441f-bc03-f3e8a3f52e81" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20220520T110349Z:612f7b89-014d-441f-bc03-f3e8a3f52e81" ], + "Date": [ "Fri, 20 May 2022 11:03:48 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "332" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/a68b7j/operations/acb8d35e-3612-4373-9524-146f25d1280d\",\"name\":\"acb8d35e-3612-4373-9524-146f25d1280d\",\"status\":\"Succeeded\"}", + "isContentBase64": false + } + }, + "AzKubernetesConfigurationFlux+[NoContext]+K8sCreateExpanded+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/a68b7j?api-version=2022-03-01+4": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/a68b7j?api-version=2022-03-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "44" ], + "x-ms-client-request-id": [ "3aaba001-dcea-4f06-8f10-3623f4c2bb62" ], + "CommandName": [ "Az.KubernetesConfiguration.internal\\New-AzKubernetesConfigurationFlux" ], + "FullCommandName": [ "New-AzKubernetesConfigurationFlux_CreateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.2", "Az.KubernetesConfiguration/0.2.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11970" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "api-supported-versions": [ "2021-06-01-preview, 2021-11-01-preview, 2022-01-01-preview, 2022-03-01" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "29cdbb99-e7a1-4a8b-8831-beb331ae64d5" ], + "x-ms-correlation-request-id": [ "29cdbb99-e7a1-4a8b-8831-beb331ae64d5" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20220520T110351Z:29cdbb99-e7a1-4a8b-8831-beb331ae64d5" ], + "Date": [ "Fri, 20 May 2022 11:03:50 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "2994" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/a68b7j\",\"name\":\"a68b7j\",\"type\":\"Microsoft.KubernetesConfiguration/fluxConfigurations\",\"properties\":{\"scope\":\"cluster\",\"namespace\":\"namespace-t01\",\"sourceKind\":\"GitRepository\",\"suspend\":false,\"gitRepository\":{\"url\":\"https://github.com/Azure/gitops-flux2-kustomize-helm-mt\",\"timeoutInSeconds\":600,\"syncIntervalInSeconds\":600,\"repositoryRef\":{\"branch\":\"main\",\"tag\":null,\"semver\":null,\"commit\":null},\"sshKnownHosts\":null,\"httpsUser\":null,\"httpsCACert\":null,\"localAuthRef\":null},\"bucket\":null,\"kustomizations\":{\"apps\":{\"name\":\"apps\",\"path\":\"./apps/staging\",\"dependsOn\":[\"infra\"],\"timeoutInSeconds\":600,\"syncIntervalInSeconds\":600,\"retryIntervalInSeconds\":null,\"prune\":true,\"force\":false},\"infra\":{\"name\":\"infra\",\"path\":\"./infrastructure\",\"dependsOn\":null,\"timeoutInSeconds\":600,\"syncIntervalInSeconds\":600,\"retryIntervalInSeconds\":null,\"prune\":true,\"force\":false}},\"configurationProtectedSettings\":{},\"repositoryPublicKey\":\"\",\"sourceUpdatedAt\":\"2022-05-20T11:03:06+00:00\",\"statusUpdatedAt\":\"2022-05-20T11:03:17.874+00:00\",\"sourceSyncedCommitId\":\"main/c4e327286379495f8b6edc2c9c208095b6cc53ab\",\"complianceState\":\"Non-Compliant\",\"provisioningState\":\"Succeeded\",\"errorMessage\":\"\",\"statuses\":[{\"name\":\"a68b7j\",\"namespace\":\"namespace-t01\",\"kind\":\"GitRepository\",\"complianceState\":\"Compliant\",\"appliedBy\":null,\"statusConditions\":[{\"lastTransitionTime\":\"2022-05-20T11:03:06+00:00\",\"message\":\"stored artifact for revision \u0027main/c4e327286379495f8b6edc2c9c208095b6cc53ab\u0027\",\"reason\":\"Succeeded\",\"status\":\"True\",\"type\":\"Ready\"},{\"lastTransitionTime\":\"2022-05-20T11:03:06+00:00\",\"message\":\"stored artifact for revision \u0027main/c4e327286379495f8b6edc2c9c208095b6cc53ab\u0027\",\"reason\":\"Succeeded\",\"status\":\"True\",\"type\":\"ArtifactInStorage\"}],\"helmReleaseProperties\":null},{\"name\":\"a68b7j-apps\",\"namespace\":\"namespace-t01\",\"kind\":\"Kustomization\",\"complianceState\":\"Non-Compliant\",\"appliedBy\":null,\"statusConditions\":[{\"lastTransitionTime\":\"2022-05-20T11:03:05+00:00\",\"message\":\"dependency \u0027namespace-t01/a68b7j-infra\u0027 is not ready\",\"reason\":\"DependencyNotReady\",\"status\":\"False\",\"type\":\"Ready\"}],\"helmReleaseProperties\":null},{\"name\":\"a68b7j-infra\",\"namespace\":\"namespace-t01\",\"kind\":\"Kustomization\",\"complianceState\":\"Non-Compliant\",\"appliedBy\":null,\"statusConditions\":[{\"lastTransitionTime\":\"2022-05-20T11:03:07+00:00\",\"message\":\"ConfigMap/cluster-config/redis-values-dc97h9995t namespace not specified, error: namespaces \\\"cluster-config\\\" not found\\nNamespace/nginx configured\\nNamespace/redis configured\\n\",\"reason\":\"ReconciliationFailed\",\"status\":\"False\",\"type\":\"Ready\"}],\"helmReleaseProperties\":null}]},\"systemData\":{\"createdBy\":null,\"createdByType\":null,\"createdAt\":\"2022-05-20T11:02:46.1375744+00:00\",\"lastModifiedBy\":null,\"lastModifiedByType\":null,\"lastModifiedAt\":\"2022-05-20T11:02:46.1375744+00:00\"}}", + "isContentBase64": false + } + }, + "AzKubernetesConfigurationFlux+[NoContext]+K8sList+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/fluxConfigurations?api-version=2022-03-01+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/fluxConfigurations?api-version=2022-03-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "45" ], + "x-ms-client-request-id": [ "a567473d-e22f-4487-bf3f-6dbaf10cc3b3" ], + "CommandName": [ "Az.KubernetesConfiguration.internal\\Get-AzKubernetesConfigurationFlux" ], + "FullCommandName": [ "Get-AzKubernetesConfigurationFlux_List" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.2", "Az.KubernetesConfiguration/0.2.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11969" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "api-supported-versions": [ "2021-06-01-preview, 2021-11-01-preview, 2022-01-01-preview, 2022-03-01" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "01507e13-6759-4274-870d-feab2a45af37" ], + "x-ms-correlation-request-id": [ "01507e13-6759-4274-870d-feab2a45af37" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20220520T110353Z:01507e13-6759-4274-870d-feab2a45af37" ], + "Date": [ "Fri, 20 May 2022 11:03:53 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "2151" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"value\":[{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/a68b7j\",\"name\":\"a68b7j\",\"type\":\"Microsoft.KubernetesConfiguration/fluxConfigurations\",\"properties\":{\"scope\":\"cluster\",\"namespace\":\"namespace-t01\",\"sourceKind\":\"GitRepository\",\"suspend\":false,\"gitRepository\":{\"url\":\"https://github.com/Azure/gitops-flux2-kustomize-helm-mt\",\"timeoutInSeconds\":600,\"syncIntervalInSeconds\":600,\"repositoryRef\":{\"branch\":\"main\",\"tag\":null,\"semver\":null,\"commit\":null},\"sshKnownHosts\":null,\"httpsUser\":null,\"httpsCACert\":null,\"localAuthRef\":null},\"bucket\":null,\"kustomizations\":{\"apps\":{\"name\":\"apps\",\"path\":\"./apps/staging\",\"dependsOn\":[\"infra\"],\"timeoutInSeconds\":600,\"syncIntervalInSeconds\":600,\"retryIntervalInSeconds\":null,\"prune\":true,\"force\":false},\"infra\":{\"name\":\"infra\",\"path\":\"./infrastructure\",\"dependsOn\":null,\"timeoutInSeconds\":600,\"syncIntervalInSeconds\":600,\"retryIntervalInSeconds\":null,\"prune\":true,\"force\":false}},\"configurationProtectedSettings\":{},\"repositoryPublicKey\":\"\",\"sourceUpdatedAt\":\"2022-05-20T11:03:06+00:00\",\"statusUpdatedAt\":\"2022-05-20T11:03:17.874+00:00\",\"sourceSyncedCommitId\":\"main/c4e327286379495f8b6edc2c9c208095b6cc53ab\",\"complianceState\":\"Non-Compliant\",\"provisioningState\":\"Succeeded\",\"errorMessage\":\"\",\"statuses\":[{\"name\":\"a68b7j\",\"namespace\":\"namespace-t01\",\"kind\":\"GitRepository\",\"complianceState\":\"Compliant\",\"appliedBy\":null,\"statusConditions\":null,\"helmReleaseProperties\":null},{\"name\":\"a68b7j-apps\",\"namespace\":\"namespace-t01\",\"kind\":\"Kustomization\",\"complianceState\":\"Non-Compliant\",\"appliedBy\":null,\"statusConditions\":null,\"helmReleaseProperties\":null},{\"name\":\"a68b7j-infra\",\"namespace\":\"namespace-t01\",\"kind\":\"Kustomization\",\"complianceState\":\"Non-Compliant\",\"appliedBy\":null,\"statusConditions\":null,\"helmReleaseProperties\":null}]},\"systemData\":{\"createdBy\":null,\"createdByType\":null,\"createdAt\":\"2022-05-20T11:02:46.1375744+00:00\",\"lastModifiedBy\":null,\"lastModifiedByType\":null,\"lastModifiedAt\":\"2022-05-20T11:02:46.1375744+00:00\"}}],\"nextLink\":null}", + "isContentBase64": false + } + }, + "AzKubernetesConfigurationFlux+[NoContext]+K8sGet+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/a68b7j?api-version=2022-03-01+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/a68b7j?api-version=2022-03-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "46" ], + "x-ms-client-request-id": [ "285b9ca2-da32-4ec3-9728-0759c5c20f91" ], + "CommandName": [ "Az.KubernetesConfiguration.internal\\Get-AzKubernetesConfigurationFlux" ], + "FullCommandName": [ "Get-AzKubernetesConfigurationFlux_Get" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.2", "Az.KubernetesConfiguration/0.2.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11968" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "api-supported-versions": [ "2021-06-01-preview, 2021-11-01-preview, 2022-01-01-preview, 2022-03-01" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "39e1973a-e4b4-4ef6-a582-6e6e52d1590c" ], + "x-ms-correlation-request-id": [ "39e1973a-e4b4-4ef6-a582-6e6e52d1590c" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20220520T110356Z:39e1973a-e4b4-4ef6-a582-6e6e52d1590c" ], + "Date": [ "Fri, 20 May 2022 11:03:56 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "2994" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/a68b7j\",\"name\":\"a68b7j\",\"type\":\"Microsoft.KubernetesConfiguration/fluxConfigurations\",\"properties\":{\"scope\":\"cluster\",\"namespace\":\"namespace-t01\",\"sourceKind\":\"GitRepository\",\"suspend\":false,\"gitRepository\":{\"url\":\"https://github.com/Azure/gitops-flux2-kustomize-helm-mt\",\"timeoutInSeconds\":600,\"syncIntervalInSeconds\":600,\"repositoryRef\":{\"branch\":\"main\",\"tag\":null,\"semver\":null,\"commit\":null},\"sshKnownHosts\":null,\"httpsUser\":null,\"httpsCACert\":null,\"localAuthRef\":null},\"bucket\":null,\"kustomizations\":{\"apps\":{\"name\":\"apps\",\"path\":\"./apps/staging\",\"dependsOn\":[\"infra\"],\"timeoutInSeconds\":600,\"syncIntervalInSeconds\":600,\"retryIntervalInSeconds\":null,\"prune\":true,\"force\":false},\"infra\":{\"name\":\"infra\",\"path\":\"./infrastructure\",\"dependsOn\":null,\"timeoutInSeconds\":600,\"syncIntervalInSeconds\":600,\"retryIntervalInSeconds\":null,\"prune\":true,\"force\":false}},\"configurationProtectedSettings\":{},\"repositoryPublicKey\":\"\",\"sourceUpdatedAt\":\"2022-05-20T11:03:06+00:00\",\"statusUpdatedAt\":\"2022-05-20T11:03:17.874+00:00\",\"sourceSyncedCommitId\":\"main/c4e327286379495f8b6edc2c9c208095b6cc53ab\",\"complianceState\":\"Non-Compliant\",\"provisioningState\":\"Succeeded\",\"errorMessage\":\"\",\"statuses\":[{\"name\":\"a68b7j\",\"namespace\":\"namespace-t01\",\"kind\":\"GitRepository\",\"complianceState\":\"Compliant\",\"appliedBy\":null,\"statusConditions\":[{\"lastTransitionTime\":\"2022-05-20T11:03:06+00:00\",\"message\":\"stored artifact for revision \u0027main/c4e327286379495f8b6edc2c9c208095b6cc53ab\u0027\",\"reason\":\"Succeeded\",\"status\":\"True\",\"type\":\"Ready\"},{\"lastTransitionTime\":\"2022-05-20T11:03:06+00:00\",\"message\":\"stored artifact for revision \u0027main/c4e327286379495f8b6edc2c9c208095b6cc53ab\u0027\",\"reason\":\"Succeeded\",\"status\":\"True\",\"type\":\"ArtifactInStorage\"}],\"helmReleaseProperties\":null},{\"name\":\"a68b7j-apps\",\"namespace\":\"namespace-t01\",\"kind\":\"Kustomization\",\"complianceState\":\"Non-Compliant\",\"appliedBy\":null,\"statusConditions\":[{\"lastTransitionTime\":\"2022-05-20T11:03:05+00:00\",\"message\":\"dependency \u0027namespace-t01/a68b7j-infra\u0027 is not ready\",\"reason\":\"DependencyNotReady\",\"status\":\"False\",\"type\":\"Ready\"}],\"helmReleaseProperties\":null},{\"name\":\"a68b7j-infra\",\"namespace\":\"namespace-t01\",\"kind\":\"Kustomization\",\"complianceState\":\"Non-Compliant\",\"appliedBy\":null,\"statusConditions\":[{\"lastTransitionTime\":\"2022-05-20T11:03:07+00:00\",\"message\":\"ConfigMap/cluster-config/redis-values-dc97h9995t namespace not specified, error: namespaces \\\"cluster-config\\\" not found\\nNamespace/nginx configured\\nNamespace/redis configured\\n\",\"reason\":\"ReconciliationFailed\",\"status\":\"False\",\"type\":\"Ready\"}],\"helmReleaseProperties\":null}]},\"systemData\":{\"createdBy\":null,\"createdByType\":null,\"createdAt\":\"2022-05-20T11:02:46.1375744+00:00\",\"lastModifiedBy\":null,\"lastModifiedByType\":null,\"lastModifiedAt\":\"2022-05-20T11:02:46.1375744+00:00\"}}", + "isContentBase64": false + } + }, + "AzKubernetesConfigurationFlux+[NoContext]+K8sGetAzK8sConfigFluxOperationStatus+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/a68b7j/operations/e9871335-7ba8-4100-8cb4-73b3464eb863?api-version=2022-03-01+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/a68b7j/operations/e9871335-7ba8-4100-8cb4-73b3464eb863?api-version=2022-03-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "47" ], + "x-ms-client-request-id": [ "f26cb3a7-083e-42a8-b430-14ff9710402a" ], + "CommandName": [ "Az.KubernetesConfiguration.internal\\Get-AzKubernetesConfigFluxOperationStatus" ], + "FullCommandName": [ "Get-AzKubernetesConfigFluxOperationStatus_Get" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.2", "Az.KubernetesConfiguration/0.2.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11967" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "api-supported-versions": [ "2019-11-01-Preview, 2021-05-01-preview, 2021-06-01-preview, 2021-09-01, 2021-11-01-preview, 2022-01-01-preview, 2022-03-01, 2022-04-02-preview" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "9e2ebd10-9db0-4cf9-8711-12cf48205cbd" ], + "x-ms-correlation-request-id": [ "9e2ebd10-9db0-4cf9-8711-12cf48205cbd" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20220520T110359Z:9e2ebd10-9db0-4cf9-8711-12cf48205cbd" ], + "Date": [ "Fri, 20 May 2022 11:03:59 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "332" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/a68b7j/operations/e9871335-7ba8-4100-8cb4-73b3464eb863\",\"name\":\"e9871335-7ba8-4100-8cb4-73b3464eb863\",\"status\":\"Succeeded\"}", + "isContentBase64": false + } + }, + "AzKubernetesConfigurationFlux+[NoContext]+K8sUpdateExpanded+$PATCH+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/a68b7j?api-version=2022-03-01+1": { + "Request": { + "Method": "PATCH", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/a68b7j?api-version=2022-03-01", + "Content": "{\r\n \"properties\": {\r\n \"gitRepository\": {\r\n \"repositoryRef\": {\r\n \"branch\": \"main\"\r\n },\r\n \"url\": \"https://github.com/Azure/gitops-flux2-kustomize-helm-mt\",\r\n \"timeoutInSeconds\": 600,\r\n \"syncIntervalInSeconds\": 600\r\n },\r\n \"sourceKind\": \"GitRepository\",\r\n \"suspend\": false\r\n }\r\n}", + "isContentBase64": false, + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "321" ] + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1190" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "api-supported-versions": [ "2021-06-01-preview, 2021-11-01-preview, 2022-01-01-preview, 2022-03-01" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "bddd1a2e-b94c-404d-8f60-4349b75955fd" ], + "x-ms-correlation-request-id": [ "bddd1a2e-b94c-404d-8f60-4349b75955fd" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20220520T110401Z:bddd1a2e-b94c-404d-8f60-4349b75955fd" ], + "Date": [ "Fri, 20 May 2022 11:04:01 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "2994" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/a68b7j\",\"name\":\"a68b7j\",\"type\":\"Microsoft.KubernetesConfiguration/fluxConfigurations\",\"properties\":{\"scope\":\"cluster\",\"namespace\":\"namespace-t01\",\"sourceKind\":\"GitRepository\",\"suspend\":false,\"gitRepository\":{\"url\":\"https://github.com/Azure/gitops-flux2-kustomize-helm-mt\",\"timeoutInSeconds\":600,\"syncIntervalInSeconds\":600,\"repositoryRef\":{\"branch\":\"main\",\"tag\":null,\"semver\":null,\"commit\":null},\"sshKnownHosts\":null,\"httpsUser\":null,\"httpsCACert\":null,\"localAuthRef\":null},\"bucket\":null,\"kustomizations\":{\"apps\":{\"name\":\"apps\",\"path\":\"./apps/staging\",\"dependsOn\":[\"infra\"],\"timeoutInSeconds\":600,\"syncIntervalInSeconds\":600,\"retryIntervalInSeconds\":null,\"prune\":true,\"force\":false},\"infra\":{\"name\":\"infra\",\"path\":\"./infrastructure\",\"dependsOn\":null,\"timeoutInSeconds\":600,\"syncIntervalInSeconds\":600,\"retryIntervalInSeconds\":null,\"prune\":true,\"force\":false}},\"configurationProtectedSettings\":{},\"repositoryPublicKey\":\"\",\"sourceUpdatedAt\":\"2022-05-20T11:03:06+00:00\",\"statusUpdatedAt\":\"2022-05-20T11:03:17.874+00:00\",\"sourceSyncedCommitId\":\"main/c4e327286379495f8b6edc2c9c208095b6cc53ab\",\"complianceState\":\"Non-Compliant\",\"provisioningState\":\"Succeeded\",\"errorMessage\":\"\",\"statuses\":[{\"name\":\"a68b7j\",\"namespace\":\"namespace-t01\",\"kind\":\"GitRepository\",\"complianceState\":\"Compliant\",\"appliedBy\":null,\"statusConditions\":[{\"lastTransitionTime\":\"2022-05-20T11:03:06+00:00\",\"message\":\"stored artifact for revision \u0027main/c4e327286379495f8b6edc2c9c208095b6cc53ab\u0027\",\"reason\":\"Succeeded\",\"status\":\"True\",\"type\":\"Ready\"},{\"lastTransitionTime\":\"2022-05-20T11:03:06+00:00\",\"message\":\"stored artifact for revision \u0027main/c4e327286379495f8b6edc2c9c208095b6cc53ab\u0027\",\"reason\":\"Succeeded\",\"status\":\"True\",\"type\":\"ArtifactInStorage\"}],\"helmReleaseProperties\":null},{\"name\":\"a68b7j-apps\",\"namespace\":\"namespace-t01\",\"kind\":\"Kustomization\",\"complianceState\":\"Non-Compliant\",\"appliedBy\":null,\"statusConditions\":[{\"lastTransitionTime\":\"2022-05-20T11:03:05+00:00\",\"message\":\"dependency \u0027namespace-t01/a68b7j-infra\u0027 is not ready\",\"reason\":\"DependencyNotReady\",\"status\":\"False\",\"type\":\"Ready\"}],\"helmReleaseProperties\":null},{\"name\":\"a68b7j-infra\",\"namespace\":\"namespace-t01\",\"kind\":\"Kustomization\",\"complianceState\":\"Non-Compliant\",\"appliedBy\":null,\"statusConditions\":[{\"lastTransitionTime\":\"2022-05-20T11:03:07+00:00\",\"message\":\"ConfigMap/cluster-config/redis-values-dc97h9995t namespace not specified, error: namespaces \\\"cluster-config\\\" not found\\nNamespace/nginx configured\\nNamespace/redis configured\\n\",\"reason\":\"ReconciliationFailed\",\"status\":\"False\",\"type\":\"Ready\"}],\"helmReleaseProperties\":null}]},\"systemData\":{\"createdBy\":null,\"createdByType\":null,\"createdAt\":\"2022-05-20T11:02:46.1375744+00:00\",\"lastModifiedBy\":null,\"lastModifiedByType\":null,\"lastModifiedAt\":\"2022-05-20T11:02:46.1375744+00:00\"}}", + "isContentBase64": false + } + }, + "AzKubernetesConfigurationFlux+[NoContext]+K8sUpdateViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/a68b7j?api-version=2022-03-01+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/a68b7j?api-version=2022-03-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "49" ], + "x-ms-client-request-id": [ "124bf188-98ec-47eb-905f-055c28986cba" ], + "CommandName": [ "Az.KubernetesConfiguration.internal\\Get-AzKubernetesConfigurationFlux" ], + "FullCommandName": [ "Get-AzKubernetesConfigurationFlux_Get" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.2", "Az.KubernetesConfiguration/0.2.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11966" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "api-supported-versions": [ "2021-06-01-preview, 2021-11-01-preview, 2022-01-01-preview, 2022-03-01" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "b13436c0-64ff-47dc-9137-746252f21b07" ], + "x-ms-correlation-request-id": [ "b13436c0-64ff-47dc-9137-746252f21b07" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20220520T110403Z:b13436c0-64ff-47dc-9137-746252f21b07" ], + "Date": [ "Fri, 20 May 2022 11:04:03 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "2994" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/a68b7j\",\"name\":\"a68b7j\",\"type\":\"Microsoft.KubernetesConfiguration/fluxConfigurations\",\"properties\":{\"scope\":\"cluster\",\"namespace\":\"namespace-t01\",\"sourceKind\":\"GitRepository\",\"suspend\":false,\"gitRepository\":{\"url\":\"https://github.com/Azure/gitops-flux2-kustomize-helm-mt\",\"timeoutInSeconds\":600,\"syncIntervalInSeconds\":600,\"repositoryRef\":{\"branch\":\"main\",\"tag\":null,\"semver\":null,\"commit\":null},\"sshKnownHosts\":null,\"httpsUser\":null,\"httpsCACert\":null,\"localAuthRef\":null},\"bucket\":null,\"kustomizations\":{\"apps\":{\"name\":\"apps\",\"path\":\"./apps/staging\",\"dependsOn\":[\"infra\"],\"timeoutInSeconds\":600,\"syncIntervalInSeconds\":600,\"retryIntervalInSeconds\":null,\"prune\":true,\"force\":false},\"infra\":{\"name\":\"infra\",\"path\":\"./infrastructure\",\"dependsOn\":null,\"timeoutInSeconds\":600,\"syncIntervalInSeconds\":600,\"retryIntervalInSeconds\":null,\"prune\":true,\"force\":false}},\"configurationProtectedSettings\":{},\"repositoryPublicKey\":\"\",\"sourceUpdatedAt\":\"2022-05-20T11:03:06+00:00\",\"statusUpdatedAt\":\"2022-05-20T11:03:17.874+00:00\",\"sourceSyncedCommitId\":\"main/c4e327286379495f8b6edc2c9c208095b6cc53ab\",\"complianceState\":\"Non-Compliant\",\"provisioningState\":\"Succeeded\",\"errorMessage\":\"\",\"statuses\":[{\"name\":\"a68b7j\",\"namespace\":\"namespace-t01\",\"kind\":\"GitRepository\",\"complianceState\":\"Compliant\",\"appliedBy\":null,\"statusConditions\":[{\"lastTransitionTime\":\"2022-05-20T11:03:06+00:00\",\"message\":\"stored artifact for revision \u0027main/c4e327286379495f8b6edc2c9c208095b6cc53ab\u0027\",\"reason\":\"Succeeded\",\"status\":\"True\",\"type\":\"Ready\"},{\"lastTransitionTime\":\"2022-05-20T11:03:06+00:00\",\"message\":\"stored artifact for revision \u0027main/c4e327286379495f8b6edc2c9c208095b6cc53ab\u0027\",\"reason\":\"Succeeded\",\"status\":\"True\",\"type\":\"ArtifactInStorage\"}],\"helmReleaseProperties\":null},{\"name\":\"a68b7j-apps\",\"namespace\":\"namespace-t01\",\"kind\":\"Kustomization\",\"complianceState\":\"Non-Compliant\",\"appliedBy\":null,\"statusConditions\":[{\"lastTransitionTime\":\"2022-05-20T11:03:05+00:00\",\"message\":\"dependency \u0027namespace-t01/a68b7j-infra\u0027 is not ready\",\"reason\":\"DependencyNotReady\",\"status\":\"False\",\"type\":\"Ready\"}],\"helmReleaseProperties\":null},{\"name\":\"a68b7j-infra\",\"namespace\":\"namespace-t01\",\"kind\":\"Kustomization\",\"complianceState\":\"Non-Compliant\",\"appliedBy\":null,\"statusConditions\":[{\"lastTransitionTime\":\"2022-05-20T11:03:07+00:00\",\"message\":\"ConfigMap/cluster-config/redis-values-dc97h9995t namespace not specified, error: namespaces \\\"cluster-config\\\" not found\\nNamespace/nginx configured\\nNamespace/redis configured\\n\",\"reason\":\"ReconciliationFailed\",\"status\":\"False\",\"type\":\"Ready\"}],\"helmReleaseProperties\":null}]},\"systemData\":{\"createdBy\":null,\"createdByType\":null,\"createdAt\":\"2022-05-20T11:02:46.1375744+00:00\",\"lastModifiedBy\":null,\"lastModifiedByType\":null,\"lastModifiedAt\":\"2022-05-20T11:02:46.1375744+00:00\"}}", + "isContentBase64": false + } + }, + "AzKubernetesConfigurationFlux+[NoContext]+K8sUpdateViaIdentityExpanded+$PATCH+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/a68b7j?api-version=2022-03-01+2": { + "Request": { + "Method": "PATCH", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/a68b7j?api-version=2022-03-01", + "Content": "{\r\n \"properties\": {\r\n \"gitRepository\": {\r\n \"repositoryRef\": {\r\n \"branch\": \"main\"\r\n },\r\n \"url\": \"https://github.com/Azure/gitops-flux2-kustomize-helm-mt\",\r\n \"timeoutInSeconds\": 600,\r\n \"syncIntervalInSeconds\": 600\r\n },\r\n \"sourceKind\": \"GitRepository\",\r\n \"suspend\": false\r\n }\r\n}", + "isContentBase64": false, + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "321" ] + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1189" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "api-supported-versions": [ "2021-06-01-preview, 2021-11-01-preview, 2022-01-01-preview, 2022-03-01" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "b4668ac9-dc80-42c0-a84d-cd7c89632dc2" ], + "x-ms-correlation-request-id": [ "b4668ac9-dc80-42c0-a84d-cd7c89632dc2" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20220520T110407Z:b4668ac9-dc80-42c0-a84d-cd7c89632dc2" ], + "Date": [ "Fri, 20 May 2022 11:04:07 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "2994" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/a68b7j\",\"name\":\"a68b7j\",\"type\":\"Microsoft.KubernetesConfiguration/fluxConfigurations\",\"properties\":{\"scope\":\"cluster\",\"namespace\":\"namespace-t01\",\"sourceKind\":\"GitRepository\",\"suspend\":false,\"gitRepository\":{\"url\":\"https://github.com/Azure/gitops-flux2-kustomize-helm-mt\",\"timeoutInSeconds\":600,\"syncIntervalInSeconds\":600,\"repositoryRef\":{\"branch\":\"main\",\"tag\":null,\"semver\":null,\"commit\":null},\"sshKnownHosts\":null,\"httpsUser\":null,\"httpsCACert\":null,\"localAuthRef\":null},\"bucket\":null,\"kustomizations\":{\"apps\":{\"name\":\"apps\",\"path\":\"./apps/staging\",\"dependsOn\":[\"infra\"],\"timeoutInSeconds\":600,\"syncIntervalInSeconds\":600,\"retryIntervalInSeconds\":null,\"prune\":true,\"force\":false},\"infra\":{\"name\":\"infra\",\"path\":\"./infrastructure\",\"dependsOn\":null,\"timeoutInSeconds\":600,\"syncIntervalInSeconds\":600,\"retryIntervalInSeconds\":null,\"prune\":true,\"force\":false}},\"configurationProtectedSettings\":{},\"repositoryPublicKey\":\"\",\"sourceUpdatedAt\":\"2022-05-20T11:03:06+00:00\",\"statusUpdatedAt\":\"2022-05-20T11:03:17.874+00:00\",\"sourceSyncedCommitId\":\"main/c4e327286379495f8b6edc2c9c208095b6cc53ab\",\"complianceState\":\"Non-Compliant\",\"provisioningState\":\"Succeeded\",\"errorMessage\":\"\",\"statuses\":[{\"name\":\"a68b7j\",\"namespace\":\"namespace-t01\",\"kind\":\"GitRepository\",\"complianceState\":\"Compliant\",\"appliedBy\":null,\"statusConditions\":[{\"lastTransitionTime\":\"2022-05-20T11:03:06+00:00\",\"message\":\"stored artifact for revision \u0027main/c4e327286379495f8b6edc2c9c208095b6cc53ab\u0027\",\"reason\":\"Succeeded\",\"status\":\"True\",\"type\":\"Ready\"},{\"lastTransitionTime\":\"2022-05-20T11:03:06+00:00\",\"message\":\"stored artifact for revision \u0027main/c4e327286379495f8b6edc2c9c208095b6cc53ab\u0027\",\"reason\":\"Succeeded\",\"status\":\"True\",\"type\":\"ArtifactInStorage\"}],\"helmReleaseProperties\":null},{\"name\":\"a68b7j-apps\",\"namespace\":\"namespace-t01\",\"kind\":\"Kustomization\",\"complianceState\":\"Non-Compliant\",\"appliedBy\":null,\"statusConditions\":[{\"lastTransitionTime\":\"2022-05-20T11:03:05+00:00\",\"message\":\"dependency \u0027namespace-t01/a68b7j-infra\u0027 is not ready\",\"reason\":\"DependencyNotReady\",\"status\":\"False\",\"type\":\"Ready\"}],\"helmReleaseProperties\":null},{\"name\":\"a68b7j-infra\",\"namespace\":\"namespace-t01\",\"kind\":\"Kustomization\",\"complianceState\":\"Non-Compliant\",\"appliedBy\":null,\"statusConditions\":[{\"lastTransitionTime\":\"2022-05-20T11:03:07+00:00\",\"message\":\"ConfigMap/cluster-config/redis-values-dc97h9995t namespace not specified, error: namespaces \\\"cluster-config\\\" not found\\nNamespace/nginx configured\\nNamespace/redis configured\\n\",\"reason\":\"ReconciliationFailed\",\"status\":\"False\",\"type\":\"Ready\"}],\"helmReleaseProperties\":null}]},\"systemData\":{\"createdBy\":null,\"createdByType\":null,\"createdAt\":\"2022-05-20T11:02:46.1375744+00:00\",\"lastModifiedBy\":null,\"lastModifiedByType\":null,\"lastModifiedAt\":\"2022-05-20T11:02:46.1375744+00:00\"}}", + "isContentBase64": false + } + }, + "AzKubernetesConfigurationFlux+[NoContext]+K8sDeleteViaIdentity+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/a68b7j?api-version=2022-03-01+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/a68b7j?api-version=2022-03-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "51" ], + "x-ms-client-request-id": [ "5fe96a11-f529-4861-b254-c488ac24adc3" ], + "CommandName": [ "Az.KubernetesConfiguration.internal\\Get-AzKubernetesConfigurationFlux" ], + "FullCommandName": [ "Get-AzKubernetesConfigurationFlux_Get" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.2", "Az.KubernetesConfiguration/0.2.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11965" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "api-supported-versions": [ "2021-06-01-preview, 2021-11-01-preview, 2022-01-01-preview, 2022-03-01" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "c19c8d79-551e-4e8d-b3ef-80c5d50b1270" ], + "x-ms-correlation-request-id": [ "c19c8d79-551e-4e8d-b3ef-80c5d50b1270" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20220520T110409Z:c19c8d79-551e-4e8d-b3ef-80c5d50b1270" ], + "Date": [ "Fri, 20 May 2022 11:04:09 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "2994" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/a68b7j\",\"name\":\"a68b7j\",\"type\":\"Microsoft.KubernetesConfiguration/fluxConfigurations\",\"properties\":{\"scope\":\"cluster\",\"namespace\":\"namespace-t01\",\"sourceKind\":\"GitRepository\",\"suspend\":false,\"gitRepository\":{\"url\":\"https://github.com/Azure/gitops-flux2-kustomize-helm-mt\",\"timeoutInSeconds\":600,\"syncIntervalInSeconds\":600,\"repositoryRef\":{\"branch\":\"main\",\"tag\":null,\"semver\":null,\"commit\":null},\"sshKnownHosts\":null,\"httpsUser\":null,\"httpsCACert\":null,\"localAuthRef\":null},\"bucket\":null,\"kustomizations\":{\"apps\":{\"name\":\"apps\",\"path\":\"./apps/staging\",\"dependsOn\":[\"infra\"],\"timeoutInSeconds\":600,\"syncIntervalInSeconds\":600,\"retryIntervalInSeconds\":null,\"prune\":true,\"force\":false},\"infra\":{\"name\":\"infra\",\"path\":\"./infrastructure\",\"dependsOn\":null,\"timeoutInSeconds\":600,\"syncIntervalInSeconds\":600,\"retryIntervalInSeconds\":null,\"prune\":true,\"force\":false}},\"configurationProtectedSettings\":{},\"repositoryPublicKey\":\"\",\"sourceUpdatedAt\":\"2022-05-20T11:03:06+00:00\",\"statusUpdatedAt\":\"2022-05-20T11:03:17.874+00:00\",\"sourceSyncedCommitId\":\"main/c4e327286379495f8b6edc2c9c208095b6cc53ab\",\"complianceState\":\"Non-Compliant\",\"provisioningState\":\"Succeeded\",\"errorMessage\":\"\",\"statuses\":[{\"name\":\"a68b7j\",\"namespace\":\"namespace-t01\",\"kind\":\"GitRepository\",\"complianceState\":\"Compliant\",\"appliedBy\":null,\"statusConditions\":[{\"lastTransitionTime\":\"2022-05-20T11:03:06+00:00\",\"message\":\"stored artifact for revision \u0027main/c4e327286379495f8b6edc2c9c208095b6cc53ab\u0027\",\"reason\":\"Succeeded\",\"status\":\"True\",\"type\":\"Ready\"},{\"lastTransitionTime\":\"2022-05-20T11:03:06+00:00\",\"message\":\"stored artifact for revision \u0027main/c4e327286379495f8b6edc2c9c208095b6cc53ab\u0027\",\"reason\":\"Succeeded\",\"status\":\"True\",\"type\":\"ArtifactInStorage\"}],\"helmReleaseProperties\":null},{\"name\":\"a68b7j-apps\",\"namespace\":\"namespace-t01\",\"kind\":\"Kustomization\",\"complianceState\":\"Non-Compliant\",\"appliedBy\":null,\"statusConditions\":[{\"lastTransitionTime\":\"2022-05-20T11:03:05+00:00\",\"message\":\"dependency \u0027namespace-t01/a68b7j-infra\u0027 is not ready\",\"reason\":\"DependencyNotReady\",\"status\":\"False\",\"type\":\"Ready\"}],\"helmReleaseProperties\":null},{\"name\":\"a68b7j-infra\",\"namespace\":\"namespace-t01\",\"kind\":\"Kustomization\",\"complianceState\":\"Non-Compliant\",\"appliedBy\":null,\"statusConditions\":[{\"lastTransitionTime\":\"2022-05-20T11:03:07+00:00\",\"message\":\"ConfigMap/cluster-config/redis-values-dc97h9995t namespace not specified, error: namespaces \\\"cluster-config\\\" not found\\nNamespace/nginx configured\\nNamespace/redis configured\\n\",\"reason\":\"ReconciliationFailed\",\"status\":\"False\",\"type\":\"Ready\"}],\"helmReleaseProperties\":null}]},\"systemData\":{\"createdBy\":null,\"createdByType\":null,\"createdAt\":\"2022-05-20T11:02:46.1375744+00:00\",\"lastModifiedBy\":null,\"lastModifiedByType\":null,\"lastModifiedAt\":\"2022-05-20T11:02:46.1375744+00:00\"}}", + "isContentBase64": false + } + }, + "AzKubernetesConfigurationFlux+[NoContext]+K8sDeleteViaIdentity+$DELETE+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/a68b7j?api-version=2022-03-01+2": { + "Request": { + "Method": "DELETE", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/a68b7j?api-version=2022-03-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "52" ], + "x-ms-client-request-id": [ "aa6f0198-7597-4662-8f36-a786774a386e" ], + "CommandName": [ "Az.KubernetesConfiguration.internal\\Remove-AzKubernetesConfigurationFlux" ], + "FullCommandName": [ "Remove-AzKubernetesConfigurationFlux_DeleteViaIdentity" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.2", "Az.KubernetesConfiguration/0.2.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 202, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-deletes": [ "14994" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "Azure-AsyncOperation": [ "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/a68b7j/operations/f47289d9-f96a-40de-a268-f00aba2073c6?api-version=2022-03-01" ], + "api-supported-versions": [ "2021-06-01-preview, 2021-11-01-preview, 2022-01-01-preview, 2022-03-01" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "a578d25f-ee3f-4076-9e09-ab9aa75ebed2" ], + "x-ms-correlation-request-id": [ "a578d25f-ee3f-4076-9e09-ab9aa75ebed2" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20220520T110411Z:a578d25f-ee3f-4076-9e09-ab9aa75ebed2" ], + "Date": [ "Fri, 20 May 2022 11:04:11 GMT" ] + }, + "ContentHeaders": { + "Expires": [ "-1" ], + "Content-Length": [ "0" ] + }, + "Content": null, + "isContentBase64": false + } + }, + "AzKubernetesConfigurationFlux+[NoContext]+K8sDeleteViaIdentity+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/a68b7j/operations/f47289d9-f96a-40de-a268-f00aba2073c6?api-version=2022-03-01+3": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/a68b7j/operations/f47289d9-f96a-40de-a268-f00aba2073c6?api-version=2022-03-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "53" ], + "x-ms-client-request-id": [ "aa6f0198-7597-4662-8f36-a786774a386e" ], + "CommandName": [ "Az.KubernetesConfiguration.internal\\Remove-AzKubernetesConfigurationFlux" ], + "FullCommandName": [ "Remove-AzKubernetesConfigurationFlux_DeleteViaIdentity" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.2", "Az.KubernetesConfiguration/0.2.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11964" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "api-supported-versions": [ "2019-11-01-Preview, 2021-05-01-preview, 2021-06-01-preview, 2021-09-01, 2021-11-01-preview, 2022-01-01-preview, 2022-03-01, 2022-04-02-preview" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "4fd937bc-be09-446b-8b32-0cb747d674fc" ], + "x-ms-correlation-request-id": [ "4fd937bc-be09-446b-8b32-0cb747d674fc" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20220520T110443Z:4fd937bc-be09-446b-8b32-0cb747d674fc" ], + "Date": [ "Fri, 20 May 2022 11:04:42 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "331" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/a68b7j/operations/f47289d9-f96a-40de-a268-f00aba2073c6\",\"name\":\"f47289d9-f96a-40de-a268-f00aba2073c6\",\"status\":\"Deleting\"}", + "isContentBase64": false + } + }, + "AzKubernetesConfigurationFlux+[NoContext]+K8sDeleteViaIdentity+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/a68b7j/operations/f47289d9-f96a-40de-a268-f00aba2073c6?api-version=2022-03-01+4": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/a68b7j/operations/f47289d9-f96a-40de-a268-f00aba2073c6?api-version=2022-03-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "54" ], + "x-ms-client-request-id": [ "aa6f0198-7597-4662-8f36-a786774a386e" ], + "CommandName": [ "Az.KubernetesConfiguration.internal\\Remove-AzKubernetesConfigurationFlux" ], + "FullCommandName": [ "Remove-AzKubernetesConfigurationFlux_DeleteViaIdentity" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.2", "Az.KubernetesConfiguration/0.2.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11963" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "api-supported-versions": [ "2019-11-01-Preview, 2021-05-01-preview, 2021-06-01-preview, 2021-09-01, 2021-11-01-preview, 2022-01-01-preview, 2022-03-01, 2022-04-02-preview" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "2701f56e-abf1-4ad2-a2f6-2503d191ddb2" ], + "x-ms-correlation-request-id": [ "2701f56e-abf1-4ad2-a2f6-2503d191ddb2" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20220520T110515Z:2701f56e-abf1-4ad2-a2f6-2503d191ddb2" ], + "Date": [ "Fri, 20 May 2022 11:05:14 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "331" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/a68b7j/operations/f47289d9-f96a-40de-a268-f00aba2073c6\",\"name\":\"f47289d9-f96a-40de-a268-f00aba2073c6\",\"status\":\"Deleting\"}", + "isContentBase64": false + } + }, + "AzKubernetesConfigurationFlux+[NoContext]+K8sDeleteViaIdentity+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/a68b7j/operations/f47289d9-f96a-40de-a268-f00aba2073c6?api-version=2022-03-01+5": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/a68b7j/operations/f47289d9-f96a-40de-a268-f00aba2073c6?api-version=2022-03-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "55" ], + "x-ms-client-request-id": [ "aa6f0198-7597-4662-8f36-a786774a386e" ], + "CommandName": [ "Az.KubernetesConfiguration.internal\\Remove-AzKubernetesConfigurationFlux" ], + "FullCommandName": [ "Remove-AzKubernetesConfigurationFlux_DeleteViaIdentity" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.2", "Az.KubernetesConfiguration/0.2.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11962" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "api-supported-versions": [ "2019-11-01-Preview, 2021-05-01-preview, 2021-06-01-preview, 2021-09-01, 2021-11-01-preview, 2022-01-01-preview, 2022-03-01, 2022-04-02-preview" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "328d9c1c-6c83-4e12-ab94-1595dbab9c2c" ], + "x-ms-correlation-request-id": [ "328d9c1c-6c83-4e12-ab94-1595dbab9c2c" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20220520T110547Z:328d9c1c-6c83-4e12-ab94-1595dbab9c2c" ], + "Date": [ "Fri, 20 May 2022 11:05:46 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "332" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/a68b7j/operations/f47289d9-f96a-40de-a268-f00aba2073c6\",\"name\":\"f47289d9-f96a-40de-a268-f00aba2073c6\",\"status\":\"Succeeded\"}", + "isContentBase64": false + } + }, + "AzKubernetesConfigurationFlux+[NoContext]+K8sDeleteViaIdentity+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/a68b7j/operations/f47289d9-f96a-40de-a268-f00aba2073c6?api-version=2022-03-01+6": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/a68b7j/operations/f47289d9-f96a-40de-a268-f00aba2073c6?api-version=2022-03-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "56" ], + "x-ms-client-request-id": [ "aa6f0198-7597-4662-8f36-a786774a386e" ], + "CommandName": [ "Az.KubernetesConfiguration.internal\\Remove-AzKubernetesConfigurationFlux" ], + "FullCommandName": [ "Remove-AzKubernetesConfigurationFlux_DeleteViaIdentity" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.2", "Az.KubernetesConfiguration/0.2.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11961" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "api-supported-versions": [ "2019-11-01-Preview, 2021-05-01-preview, 2021-06-01-preview, 2021-09-01, 2021-11-01-preview, 2022-01-01-preview, 2022-03-01, 2022-04-02-preview" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "1bbf496a-c4e5-4bc0-b989-972919f05506" ], + "x-ms-correlation-request-id": [ "1bbf496a-c4e5-4bc0-b989-972919f05506" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20220520T110548Z:1bbf496a-c4e5-4bc0-b989-972919f05506" ], + "Date": [ "Fri, 20 May 2022 11:05:48 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "332" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/a68b7j/operations/f47289d9-f96a-40de-a268-f00aba2073c6\",\"name\":\"f47289d9-f96a-40de-a268-f00aba2073c6\",\"status\":\"Succeeded\"}", + "isContentBase64": false + } + }, + "AzKubernetesConfigurationFlux+[NoContext]+K8sDeleteViaIdentity+$DELETE+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/extensions/flux?api-version=2022-03-01+7": { + "Request": { + "Method": "DELETE", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/extensions/flux?api-version=2022-03-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "57" ], + "x-ms-client-request-id": [ "1bd2bb70-6b00-40f8-8823-ff8b0ac6ea46" ], + "CommandName": [ "Az.KubernetesConfiguration.internal\\Remove-AzKubernetesExtension" ], + "FullCommandName": [ "Remove-AzKubernetesExtension_Delete" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.2", "Az.KubernetesConfiguration/0.2.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 202, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-deletes": [ "14993" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "Azure-AsyncOperation": [ "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/extensions/flux/operations/c7f187f8-d9ea-4f02-af24-2ea0ac6748f1?api-Version=2022-03-01" ], + "api-supported-versions": [ "2022-03-01" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "720b3a19-3eef-4a4c-8fb3-84845f29514a" ], + "x-ms-correlation-request-id": [ "720b3a19-3eef-4a4c-8fb3-84845f29514a" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20220520T110551Z:720b3a19-3eef-4a4c-8fb3-84845f29514a" ], + "Date": [ "Fri, 20 May 2022 11:05:51 GMT" ] + }, + "ContentHeaders": { + "Expires": [ "-1" ], + "Content-Length": [ "0" ] + }, + "Content": null, + "isContentBase64": false + } + }, + "AzKubernetesConfigurationFlux+[NoContext]+K8sDeleteViaIdentity+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/extensions/flux/operations/c7f187f8-d9ea-4f02-af24-2ea0ac6748f1?api-Version=2022-03-01+8": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/extensions/flux/operations/c7f187f8-d9ea-4f02-af24-2ea0ac6748f1?api-Version=2022-03-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "58" ], + "x-ms-client-request-id": [ "1bd2bb70-6b00-40f8-8823-ff8b0ac6ea46" ], + "CommandName": [ "Az.KubernetesConfiguration.internal\\Remove-AzKubernetesExtension" ], + "FullCommandName": [ "Remove-AzKubernetesExtension_Delete" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.2", "Az.KubernetesConfiguration/0.2.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11960" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "api-supported-versions": [ "2019-11-01-Preview, 2021-05-01-preview, 2021-06-01-preview, 2021-09-01, 2021-11-01-preview, 2022-01-01-preview, 2022-03-01, 2022-04-02-preview" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "54ee11c9-896a-4f8b-b6a4-5e3d9dc64e05" ], + "x-ms-correlation-request-id": [ "54ee11c9-896a-4f8b-b6a4-5e3d9dc64e05" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20220520T110623Z:54ee11c9-896a-4f8b-b6a4-5e3d9dc64e05" ], + "Date": [ "Fri, 20 May 2022 11:06:22 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "321" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/extensions/flux/operations/c7f187f8-d9ea-4f02-af24-2ea0ac6748f1\",\"name\":\"c7f187f8-d9ea-4f02-af24-2ea0ac6748f1\",\"status\":\"Deleting\"}", + "isContentBase64": false + } + }, + "AzKubernetesConfigurationFlux+[NoContext]+K8sDeleteViaIdentity+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/extensions/flux/operations/c7f187f8-d9ea-4f02-af24-2ea0ac6748f1?api-Version=2022-03-01+9": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/extensions/flux/operations/c7f187f8-d9ea-4f02-af24-2ea0ac6748f1?api-Version=2022-03-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "59" ], + "x-ms-client-request-id": [ "1bd2bb70-6b00-40f8-8823-ff8b0ac6ea46" ], + "CommandName": [ "Az.KubernetesConfiguration.internal\\Remove-AzKubernetesExtension" ], + "FullCommandName": [ "Remove-AzKubernetesExtension_Delete" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.2", "Az.KubernetesConfiguration/0.2.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11959" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "api-supported-versions": [ "2019-11-01-Preview, 2021-05-01-preview, 2021-06-01-preview, 2021-09-01, 2021-11-01-preview, 2022-01-01-preview, 2022-03-01, 2022-04-02-preview" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "37fdc306-1903-4c40-bc03-d7c8629feb2a" ], + "x-ms-correlation-request-id": [ "37fdc306-1903-4c40-bc03-d7c8629feb2a" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20220520T110655Z:37fdc306-1903-4c40-bc03-d7c8629feb2a" ], + "Date": [ "Fri, 20 May 2022 11:06:55 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "322" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/extensions/flux/operations/c7f187f8-d9ea-4f02-af24-2ea0ac6748f1\",\"name\":\"c7f187f8-d9ea-4f02-af24-2ea0ac6748f1\",\"status\":\"Succeeded\"}", + "isContentBase64": false + } + }, + "AzKubernetesConfigurationFlux+[NoContext]+K8sDeleteViaIdentity+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/extensions/flux/operations/c7f187f8-d9ea-4f02-af24-2ea0ac6748f1?api-Version=2022-03-01+10": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/extensions/flux/operations/c7f187f8-d9ea-4f02-af24-2ea0ac6748f1?api-Version=2022-03-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "60" ], + "x-ms-client-request-id": [ "1bd2bb70-6b00-40f8-8823-ff8b0ac6ea46" ], + "CommandName": [ "Az.KubernetesConfiguration.internal\\Remove-AzKubernetesExtension" ], + "FullCommandName": [ "Remove-AzKubernetesExtension_Delete" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.2", "Az.KubernetesConfiguration/0.2.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11958" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "api-supported-versions": [ "2019-11-01-Preview, 2021-05-01-preview, 2021-06-01-preview, 2021-09-01, 2021-11-01-preview, 2022-01-01-preview, 2022-03-01, 2022-04-02-preview" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "1cc4c057-7cb3-4224-aa55-7e4e9e4328d5" ], + "x-ms-correlation-request-id": [ "1cc4c057-7cb3-4224-aa55-7e4e9e4328d5" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20220520T110657Z:1cc4c057-7cb3-4224-aa55-7e4e9e4328d5" ], + "Date": [ "Fri, 20 May 2022 11:06:57 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "322" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/extensions/flux/operations/c7f187f8-d9ea-4f02-af24-2ea0ac6748f1\",\"name\":\"c7f187f8-d9ea-4f02-af24-2ea0ac6748f1\",\"status\":\"Succeeded\"}", + "isContentBase64": false + } + } +} \ No newline at end of file diff --git a/src/KubernetesConfiguration/test/AzKubernetesConfigurationFlux.Tests.ps1 b/src/KubernetesConfiguration/test/AzKubernetesConfigurationFlux.Tests.ps1 new file mode 100644 index 000000000000..f948156c3745 --- /dev/null +++ b/src/KubernetesConfiguration/test/AzKubernetesConfigurationFlux.Tests.ps1 @@ -0,0 +1,147 @@ +if(($null -eq $TestName) -or ($TestName -contains 'AzKubernetesConfigurationFlux')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'AzKubernetesConfigurationFlux.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'AzKubernetesConfigurationFlux' { + It 'CreateExpanded' { + { + $kustomizations = @{ + infra=@{ + Name = "infra" + Path = "./infrastructure" + Prune = "true" + }; + apps=@{ + Name = "apps" + Path = "./apps/staging" + Prune = "true" + DependsOn = @("infra") + } + } + $config = New-AzKubernetesExtension -ClusterName $env.clusterName -ClusterType ConnectedClusters -Name flux -ResourceGroupName $env.resourceGroup -ExtensionType microsoft.flux -AutoUpgradeMinorVersion -ClusterReleaseNamespace flux-system -IdentityType 'SystemAssigned' + $config.Name | Should -Be "flux" + + $config = New-AzKubernetesConfigurationFlux -ClusterName $env.clusterName -ClusterType ConnectedClusters -Name $env.flux1 -ResourceGroupName $env.resourceGroup -Namespace namespace-t01 -Scope 'cluster' -GitRepositoryUrl https://github.com/Azure/gitops-flux2-kustomize-helm-mt -RepositoryRefBranch main -SourceKind 'GitRepository' -GitRepositorySyncIntervalInSecond 600 -GitRepositoryTimeoutInSecond 600 -Suspend:$false -Kustomization $kustomizations + $config.Name | Should -Be $env.flux1 + } | Should -Not -Throw + } + + It 'List' { + { + $config = Get-AzKubernetesConfigurationFlux -ClusterName $env.clusterName -ClusterType ConnectedClusters -ResourceGroupName $env.resourceGroup + $config.Count | Should -BeGreaterThan 0 + } | Should -Not -Throw + } + + It 'Get' { + { + $config = Get-AzKubernetesConfigurationFlux -Name $env.flux1 -ClusterName $env.clusterName -ClusterType ConnectedClusters -ResourceGroupName $env.resourceGroup + $config.Name | Should -Be $env.flux1 + } | Should -Not -Throw + } + + It 'GetAzKubernetesConfigFluxOperationStatus' { + { + $config = Get-AzKubernetesConfigFluxOperationStatus -FluxConfigurationName $env.flux1 -ClusterName $env.clusterName -ClusterType ConnectedClusters -ResourceGroupName $env.resourceGroup -OperationId e9871335-7ba8-4100-8cb4-73b3464eb863 + $config.Count | Should -BeGreaterThan 0 + } | Should -Not -Throw + } + + It 'UpdateExpanded' { + { + $config = Update-AzKubernetesConfigurationFlux -Name $env.flux1 -ClusterName $env.clusterName -ClusterType ConnectedClusters -ResourceGroupName $env.resourceGroup -GitRepositoryUrl https://github.com/Azure/gitops-flux2-kustomize-helm-mt -RepositoryRefBranch main -SourceKind 'GitRepository' -GitRepositorySyncIntervalInSecond 600 -GitRepositoryTimeoutInSecond 600 -Suspend:$false + $config.Name | Should -Be $env.flux1 + } | Should -Not -Throw + } + + It 'UpdateViaIdentityExpanded' { + { + $config = Get-AzKubernetesConfigurationFlux -Name $env.flux1 -ClusterName $env.clusterName -ClusterType ConnectedClusters -ResourceGroupName $env.resourceGroup + $config = Update-AzKubernetesConfigurationFlux -InputObject $config -GitRepositoryUrl https://github.com/Azure/gitops-flux2-kustomize-helm-mt -RepositoryRefBranch main -SourceKind 'GitRepository' -GitRepositorySyncIntervalInSecond 600 -GitRepositoryTimeoutInSecond 600 -Suspend:$false + $config.Name | Should -Be $env.flux1 + } | Should -Not -Throw + } + + It 'Delete' { + { + Remove-AzKubernetesConfigurationFlux -Name $env.flux1 -ClusterName $env.clusterName -ClusterType ConnectedClusters -ResourceGroupName $env.resourceGroup + } | Should -Not -Throw + } + + It 'K8sCreateExpanded' { + { + $kustomizations = @{ + infra=@{ + Name = "infra" + Path = "./infrastructure" + Prune = "true" + }; + apps=@{ + Name = "apps" + Path = "./apps/staging" + Prune = "true" + DependsOn = @("infra") + } + } + $config = New-AzK8sConfigurationFlux -ClusterName $env.clusterName -ClusterType ConnectedClusters -Name $env.flux2 -ResourceGroupName $env.resourceGroup -Namespace namespace-t01 -Scope 'cluster' -GitRepositoryUrl https://github.com/Azure/gitops-flux2-kustomize-helm-mt -RepositoryRefBranch main -SourceKind 'GitRepository' -GitRepositorySyncIntervalInSecond 600 -GitRepositoryTimeoutInSecond 600 -Suspend:$false -Kustomization $kustomizations + $config.Name | Should -Be $env.flux2 + } | Should -Not -Throw + } + + It 'K8sList' { + { + $config = Get-AzK8sConfigurationFlux -ClusterName $env.clusterName -ClusterType ConnectedClusters -ResourceGroupName $env.resourceGroup + $config.Count | Should -BeGreaterThan 0 + } | Should -Not -Throw + } + + It 'K8sGet' { + { + $config = Get-AzK8sConfigurationFlux -Name $env.flux2 -ClusterName $env.clusterName -ClusterType ConnectedClusters -ResourceGroupName $env.resourceGroup + $config.Name | Should -Be $env.flux2 + } | Should -Not -Throw + } + + It 'K8sGetAzK8sConfigFluxOperationStatus' { + { + $config = Get-AzK8sConfigFluxOperationStatus -FluxConfigurationName $env.flux2 -ClusterName $env.clusterName -ClusterType ConnectedClusters -ResourceGroupName $env.resourceGroup -OperationId e9871335-7ba8-4100-8cb4-73b3464eb863 + $config.Count | Should -BeGreaterThan 0 + } | Should -Not -Throw + } + + It 'K8sUpdateExpanded' { + { + $config = Update-AzK8sConfigurationFlux -Name $env.flux2 -ClusterName $env.clusterName -ClusterType ConnectedClusters -ResourceGroupName $env.resourceGroup -GitRepositoryUrl https://github.com/Azure/gitops-flux2-kustomize-helm-mt -RepositoryRefBranch main -SourceKind 'GitRepository' -GitRepositorySyncIntervalInSecond 600 -GitRepositoryTimeoutInSecond 600 -Suspend:$false + $config.Name | Should -Be $env.flux2 + } | Should -Not -Throw + } + + It 'K8sUpdateViaIdentityExpanded' { + { + $config = Get-AzK8sConfigurationFlux -Name $env.flux2 -ClusterName $env.clusterName -ClusterType ConnectedClusters -ResourceGroupName $env.resourceGroup + $config = Update-AzK8sConfigurationFlux -InputObject $config -GitRepositoryUrl https://github.com/Azure/gitops-flux2-kustomize-helm-mt -RepositoryRefBranch main -SourceKind 'GitRepository' -GitRepositorySyncIntervalInSecond 600 -GitRepositoryTimeoutInSecond 600 -Suspend:$false + $config.Name | Should -Be $env.flux2 + } | Should -Not -Throw + } + + It 'K8sDeleteViaIdentity' { + { + $config = Get-AzK8sConfigurationFlux -Name $env.flux2 -ClusterName $env.clusterName -ClusterType ConnectedClusters -ResourceGroupName $env.resourceGroup + Remove-AzK8sConfigurationFlux -InputObject $config + + Remove-AzK8sExtension -ClusterName $env.clusterName -ClusterType ConnectedClusters -Name flux -ResourceGroupName $env.resourceGroup + } | Should -Not -Throw + } +} diff --git a/src/KubernetesConfiguration/test/AzKubernetesExtension.Recording.json b/src/KubernetesConfiguration/test/AzKubernetesExtension.Recording.json index 46a1b1aaddc3..f4b2d96eabc5 100644 --- a/src/KubernetesConfiguration/test/AzKubernetesExtension.Recording.json +++ b/src/KubernetesConfiguration/test/AzKubernetesExtension.Recording.json @@ -1,15 +1,15 @@ { - "AzKubernetesExtension+[NoContext]+CreateExpanded+$PUT+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupeastus2euap/providers/Microsoft.Kubernetes/ConnectedClusters/9chyz2/providers/Microsoft.KubernetesConfiguration/extensions/xtrsd6?api-version=2021-09-01+1": { + "AzKubernetesExtension+[NoContext]+CreateExpanded+$PUT+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/extensions/07lsbw?api-version=2022-03-01+1": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupeastus2euap/providers/Microsoft.Kubernetes/ConnectedClusters/9chyz2/providers/Microsoft.KubernetesConfiguration/extensions/xtrsd6?api-version=2021-09-01", - "Content": "{\r\n \"properties\": {\r\n \"extensionType\": \"Microsoft.Arcdataservices\"\r\n }\r\n}", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/extensions/07lsbw?api-version=2022-03-01", + "Content": "{\r\n \"properties\": {\r\n \"extensionType\": \"azuremonitor-containers\"\r\n }\r\n}", "isContentBase64": false, "Headers": { }, "ContentHeaders": { "Content-Type": [ "application/json" ], - "Content-Length": [ "78" ] + "Content-Length": [ "76" ] } }, "Response": { @@ -17,40 +17,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Location": [ "https://eastus2euap.rp.kubernetesconfiguration.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupeastus2euap/providers/Microsoft.Kubernetes/ConnectedClusters/9chyz2/providers/Microsoft.KubernetesConfiguration/extensions/xtrsd6" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1195" ], + "Location": [ "https://eastus.rp.kubernetesconfiguration.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/extensions/07lsbw" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1188" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "Azure-AsyncOperation": [ "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupeastus2euap/providers/Microsoft.Kubernetes/ConnectedClusters/9chyz2/providers/Microsoft.KubernetesConfiguration/extensions/xtrsd6/operations/ebc64651-c2f5-43e7-a1d5-9a110946b112?api-Version=2021-09-01" ], - "api-supported-versions": [ "2020-07-01-Preview, 2021-05-01-preview, 2021-09-01" ], + "Azure-AsyncOperation": [ "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/extensions/07lsbw/operations/73a06595-43db-4c0e-865f-9791b2c8943b?api-Version=2022-03-01" ], + "api-supported-versions": [ "2022-03-01" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "fd5a00d0-888e-444f-8d9d-8c13230b444d" ], - "x-ms-correlation-request-id": [ "fd5a00d0-888e-444f-8d9d-8c13230b444d" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20211028T030552Z:fd5a00d0-888e-444f-8d9d-8c13230b444d" ], - "Date": [ "Thu, 28 Oct 2021 03:05:51 GMT" ] + "x-ms-request-id": [ "40ce6d4a-ac72-4b6a-92ac-f68ae769cf03" ], + "x-ms-correlation-request-id": [ "40ce6d4a-ac72-4b6a-92ac-f68ae769cf03" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20220520T110701Z:40ce6d4a-ac72-4b6a-92ac-f68ae769cf03" ], + "Date": [ "Fri, 20 May 2022 11:07:00 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "822" ], + "Content-Length": [ "798" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupeastus2euap/providers/Microsoft.Kubernetes/ConnectedClusters/9chyz2/providers/Microsoft.KubernetesConfiguration/extensions/xtrsd6\",\"name\":\"xtrsd6\",\"type\":\"Microsoft.KubernetesConfiguration/extensions\",\"properties\":{\"extensionType\":\"Microsoft.Arcdataservices\",\"autoUpgradeMinorVersion\":true,\"releaseTrain\":\"Stable\",\"version\":null,\"scope\":{\"cluster\":{\"releaseNamespace\":\"arc\"}},\"provisioningState\":\"Creating\",\"installState\":\"Unknown\",\"configurationSettings\":{},\"configurationProtectedSettings\":{},\"statuses\":[],\"aksAssignedIdentity\":null},\"systemData\":{\"createdBy\":null,\"createdByType\":null,\"createdAt\":\"2021-10-28T03:05:52.0947322+00:00\",\"lastModifiedBy\":null,\"lastModifiedByType\":null,\"lastModifiedAt\":\"2021-10-28T03:05:52.0947322+00:00\"}}", + "Content": "{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/extensions/07lsbw\",\"name\":\"07lsbw\",\"type\":\"Microsoft.KubernetesConfiguration/extensions\",\"properties\":{\"extensionType\":\"azuremonitor-containers\",\"autoUpgradeMinorVersion\":true,\"releaseTrain\":\"Stable\",\"version\":null,\"scope\":{\"cluster\":{\"releaseNamespace\":\"kube-system\"}},\"provisioningState\":\"Creating\",\"configurationSettings\":{},\"configurationProtectedSettings\":{},\"statuses\":[],\"aksAssignedIdentity\":null},\"systemData\":{\"createdBy\":null,\"createdByType\":null,\"createdAt\":\"2022-05-20T11:07:01.2544635+00:00\",\"lastModifiedBy\":null,\"lastModifiedByType\":null,\"lastModifiedAt\":\"2022-05-20T11:07:01.2544635+00:00\"}}", "isContentBase64": false } }, - "AzKubernetesExtension+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupeastus2euap/providers/Microsoft.Kubernetes/ConnectedClusters/9chyz2/providers/Microsoft.KubernetesConfiguration/extensions/xtrsd6/operations/ebc64651-c2f5-43e7-a1d5-9a110946b112?api-Version=2021-09-01+2": { + "AzKubernetesExtension+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/extensions/07lsbw/operations/73a06595-43db-4c0e-865f-9791b2c8943b?api-Version=2022-03-01+2": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupeastus2euap/providers/Microsoft.Kubernetes/ConnectedClusters/9chyz2/providers/Microsoft.KubernetesConfiguration/extensions/xtrsd6/operations/ebc64651-c2f5-43e7-a1d5-9a110946b112?api-Version=2021-09-01", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/extensions/07lsbw/operations/73a06595-43db-4c0e-865f-9791b2c8943b?api-Version=2022-03-01", "Content": null, "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "20" ], - "x-ms-client-request-id": [ "850cf65a-7d37-4468-a8cb-88354d80a8e2" ], + "x-ms-unique-id": [ "62" ], + "x-ms-client-request-id": [ "67d84f42-4e23-4d6b-93b8-ca9e8a2a4f8e" ], "CommandName": [ "Az.KubernetesConfiguration.internal\\New-AzKubernetesExtension" ], "FullCommandName": [ "New-AzKubernetesExtension_CreateExpanded" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0" ] + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.2", "Az.KubernetesConfiguration/0.2.0" ] }, "ContentHeaders": { } @@ -60,38 +60,38 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11989" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11957" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "api-supported-versions": [ "2019-11-01-Preview, 2021-05-01-preview, 2021-06-01-preview, 2021-09-01, 2021-11-01-preview" ], + "api-supported-versions": [ "2019-11-01-Preview, 2021-05-01-preview, 2021-06-01-preview, 2021-09-01, 2021-11-01-preview, 2022-01-01-preview, 2022-03-01, 2022-04-02-preview" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "dc40ebd0-e95a-4b0c-8b9d-76a68cebe82a" ], - "x-ms-correlation-request-id": [ "dc40ebd0-e95a-4b0c-8b9d-76a68cebe82a" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20211028T030623Z:dc40ebd0-e95a-4b0c-8b9d-76a68cebe82a" ], - "Date": [ "Thu, 28 Oct 2021 03:06:22 GMT" ] + "x-ms-request-id": [ "082f8088-e1ec-4195-84ce-a1c4fc3c8362" ], + "x-ms-correlation-request-id": [ "082f8088-e1ec-4195-84ce-a1c4fc3c8362" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20220520T110733Z:082f8088-e1ec-4195-84ce-a1c4fc3c8362" ], + "Date": [ "Fri, 20 May 2022 11:07:32 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "328" ], + "Content-Length": [ "323" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupeastus2euap/providers/Microsoft.Kubernetes/ConnectedClusters/9chyz2/providers/Microsoft.KubernetesConfiguration/extensions/xtrsd6/operations/ebc64651-c2f5-43e7-a1d5-9a110946b112\",\"name\":\"ebc64651-c2f5-43e7-a1d5-9a110946b112\",\"status\":\"Creating\"}", + "Content": "{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/extensions/07lsbw/operations/73a06595-43db-4c0e-865f-9791b2c8943b\",\"name\":\"73a06595-43db-4c0e-865f-9791b2c8943b\",\"status\":\"Creating\"}", "isContentBase64": false } }, - "AzKubernetesExtension+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupeastus2euap/providers/Microsoft.Kubernetes/ConnectedClusters/9chyz2/providers/Microsoft.KubernetesConfiguration/extensions/xtrsd6/operations/ebc64651-c2f5-43e7-a1d5-9a110946b112?api-Version=2021-09-01+3": { + "AzKubernetesExtension+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/extensions/07lsbw/operations/73a06595-43db-4c0e-865f-9791b2c8943b?api-Version=2022-03-01+3": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupeastus2euap/providers/Microsoft.Kubernetes/ConnectedClusters/9chyz2/providers/Microsoft.KubernetesConfiguration/extensions/xtrsd6/operations/ebc64651-c2f5-43e7-a1d5-9a110946b112?api-Version=2021-09-01", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/extensions/07lsbw/operations/73a06595-43db-4c0e-865f-9791b2c8943b?api-Version=2022-03-01", "Content": null, "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "21" ], - "x-ms-client-request-id": [ "850cf65a-7d37-4468-a8cb-88354d80a8e2" ], + "x-ms-unique-id": [ "63" ], + "x-ms-client-request-id": [ "67d84f42-4e23-4d6b-93b8-ca9e8a2a4f8e" ], "CommandName": [ "Az.KubernetesConfiguration.internal\\New-AzKubernetesExtension" ], "FullCommandName": [ "New-AzKubernetesExtension_CreateExpanded" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0" ] + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.2", "Az.KubernetesConfiguration/0.2.0" ] }, "ContentHeaders": { } @@ -101,38 +101,38 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11988" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11956" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "api-supported-versions": [ "2019-11-01-Preview, 2021-05-01-preview, 2021-06-01-preview, 2021-09-01, 2021-11-01-preview" ], + "api-supported-versions": [ "2019-11-01-Preview, 2021-05-01-preview, 2021-06-01-preview, 2021-09-01, 2021-11-01-preview, 2022-01-01-preview, 2022-03-01, 2022-04-02-preview" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "d168e76b-ac24-4074-8315-4e9c8765ca3e" ], - "x-ms-correlation-request-id": [ "d168e76b-ac24-4074-8315-4e9c8765ca3e" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20211028T030655Z:d168e76b-ac24-4074-8315-4e9c8765ca3e" ], - "Date": [ "Thu, 28 Oct 2021 03:06:54 GMT" ] + "x-ms-request-id": [ "96cab611-e8a9-4d85-aaf4-2719888c1f90" ], + "x-ms-correlation-request-id": [ "96cab611-e8a9-4d85-aaf4-2719888c1f90" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20220520T110804Z:96cab611-e8a9-4d85-aaf4-2719888c1f90" ], + "Date": [ "Fri, 20 May 2022 11:08:04 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "328" ], + "Content-Length": [ "324" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupeastus2euap/providers/Microsoft.Kubernetes/ConnectedClusters/9chyz2/providers/Microsoft.KubernetesConfiguration/extensions/xtrsd6/operations/ebc64651-c2f5-43e7-a1d5-9a110946b112\",\"name\":\"ebc64651-c2f5-43e7-a1d5-9a110946b112\",\"status\":\"Creating\"}", + "Content": "{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/extensions/07lsbw/operations/73a06595-43db-4c0e-865f-9791b2c8943b\",\"name\":\"73a06595-43db-4c0e-865f-9791b2c8943b\",\"status\":\"Succeeded\"}", "isContentBase64": false } }, - "AzKubernetesExtension+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupeastus2euap/providers/Microsoft.Kubernetes/ConnectedClusters/9chyz2/providers/Microsoft.KubernetesConfiguration/extensions/xtrsd6/operations/ebc64651-c2f5-43e7-a1d5-9a110946b112?api-Version=2021-09-01+4": { + "AzKubernetesExtension+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/extensions/07lsbw?api-version=2022-03-01+4": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupeastus2euap/providers/Microsoft.Kubernetes/ConnectedClusters/9chyz2/providers/Microsoft.KubernetesConfiguration/extensions/xtrsd6/operations/ebc64651-c2f5-43e7-a1d5-9a110946b112?api-Version=2021-09-01", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/extensions/07lsbw?api-version=2022-03-01", "Content": null, "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "22" ], - "x-ms-client-request-id": [ "850cf65a-7d37-4468-a8cb-88354d80a8e2" ], + "x-ms-unique-id": [ "64" ], + "x-ms-client-request-id": [ "67d84f42-4e23-4d6b-93b8-ca9e8a2a4f8e" ], "CommandName": [ "Az.KubernetesConfiguration.internal\\New-AzKubernetesExtension" ], "FullCommandName": [ "New-AzKubernetesExtension_CreateExpanded" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0" ] + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.2", "Az.KubernetesConfiguration/0.2.0" ] }, "ContentHeaders": { } @@ -142,119 +142,37 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11987" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11955" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "api-supported-versions": [ "2019-11-01-Preview, 2021-05-01-preview, 2021-06-01-preview, 2021-09-01, 2021-11-01-preview" ], + "api-supported-versions": [ "2022-03-01" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "83e17ac3-3da9-46fa-8858-d2b0c5f70fee" ], - "x-ms-correlation-request-id": [ "83e17ac3-3da9-46fa-8858-d2b0c5f70fee" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20211028T030726Z:83e17ac3-3da9-46fa-8858-d2b0c5f70fee" ], - "Date": [ "Thu, 28 Oct 2021 03:07:26 GMT" ] + "x-ms-request-id": [ "bfc1bd8e-cd85-4f51-adf8-f9cb98f696af" ], + "x-ms-correlation-request-id": [ "bfc1bd8e-cd85-4f51-adf8-f9cb98f696af" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20220520T110806Z:bfc1bd8e-cd85-4f51-adf8-f9cb98f696af" ], + "Date": [ "Fri, 20 May 2022 11:08:06 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "328" ], + "Content-Length": [ "802" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupeastus2euap/providers/Microsoft.Kubernetes/ConnectedClusters/9chyz2/providers/Microsoft.KubernetesConfiguration/extensions/xtrsd6/operations/ebc64651-c2f5-43e7-a1d5-9a110946b112\",\"name\":\"ebc64651-c2f5-43e7-a1d5-9a110946b112\",\"status\":\"Creating\"}", + "Content": "{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/extensions/07lsbw\",\"name\":\"07lsbw\",\"type\":\"Microsoft.KubernetesConfiguration/extensions\",\"properties\":{\"extensionType\":\"azuremonitor-containers\",\"autoUpgradeMinorVersion\":true,\"releaseTrain\":\"Stable\",\"version\":\"2.9.2\",\"scope\":{\"cluster\":{\"releaseNamespace\":\"kube-system\"}},\"provisioningState\":\"Succeeded\",\"configurationSettings\":{},\"configurationProtectedSettings\":{},\"statuses\":[],\"aksAssignedIdentity\":null},\"systemData\":{\"createdBy\":null,\"createdByType\":null,\"createdAt\":\"2022-05-20T11:07:01.2544635+00:00\",\"lastModifiedBy\":null,\"lastModifiedByType\":null,\"lastModifiedAt\":\"2022-05-20T11:07:01.2544635+00:00\"}}", "isContentBase64": false } }, - "AzKubernetesExtension+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupeastus2euap/providers/Microsoft.Kubernetes/ConnectedClusters/9chyz2/providers/Microsoft.KubernetesConfiguration/extensions/xtrsd6/operations/ebc64651-c2f5-43e7-a1d5-9a110946b112?api-Version=2021-09-01+5": { + "AzKubernetesExtension+[NoContext]+List+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/extensions?api-version=2022-03-01+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupeastus2euap/providers/Microsoft.Kubernetes/ConnectedClusters/9chyz2/providers/Microsoft.KubernetesConfiguration/extensions/xtrsd6/operations/ebc64651-c2f5-43e7-a1d5-9a110946b112?api-Version=2021-09-01", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/extensions?api-version=2022-03-01", "Content": null, "isContentBase64": false, "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "23" ], - "x-ms-client-request-id": [ "850cf65a-7d37-4468-a8cb-88354d80a8e2" ], - "CommandName": [ "Az.KubernetesConfiguration.internal\\New-AzKubernetesExtension" ], - "FullCommandName": [ "New-AzKubernetesExtension_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11986" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "api-supported-versions": [ "2019-11-01-Preview, 2021-05-01-preview, 2021-06-01-preview, 2021-09-01, 2021-11-01-preview" ], - "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "50544278-49f9-48cc-adf5-101cdbd2ec15" ], - "x-ms-correlation-request-id": [ "50544278-49f9-48cc-adf5-101cdbd2ec15" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20211028T030758Z:50544278-49f9-48cc-adf5-101cdbd2ec15" ], - "Date": [ "Thu, 28 Oct 2021 03:07:57 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "329" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupeastus2euap/providers/Microsoft.Kubernetes/ConnectedClusters/9chyz2/providers/Microsoft.KubernetesConfiguration/extensions/xtrsd6/operations/ebc64651-c2f5-43e7-a1d5-9a110946b112\",\"name\":\"ebc64651-c2f5-43e7-a1d5-9a110946b112\",\"status\":\"Succeeded\"}", - "isContentBase64": false - } - }, - "AzKubernetesExtension+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupeastus2euap/providers/Microsoft.Kubernetes/ConnectedClusters/9chyz2/providers/Microsoft.KubernetesConfiguration/extensions/xtrsd6?api-version=2021-09-01+6": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupeastus2euap/providers/Microsoft.Kubernetes/ConnectedClusters/9chyz2/providers/Microsoft.KubernetesConfiguration/extensions/xtrsd6?api-version=2021-09-01", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "24" ], - "x-ms-client-request-id": [ "850cf65a-7d37-4468-a8cb-88354d80a8e2" ], - "CommandName": [ "Az.KubernetesConfiguration.internal\\New-AzKubernetesExtension" ], - "FullCommandName": [ "New-AzKubernetesExtension_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11985" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "api-supported-versions": [ "2020-07-01-Preview, 2021-05-01-preview, 2021-09-01" ], - "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "af63eab0-a291-4de4-a1dd-cebdbab9edc1" ], - "x-ms-correlation-request-id": [ "af63eab0-a291-4de4-a1dd-cebdbab9edc1" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20211028T030759Z:af63eab0-a291-4de4-a1dd-cebdbab9edc1" ], - "Date": [ "Thu, 28 Oct 2021 03:07:59 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "835" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupeastus2euap/providers/Microsoft.Kubernetes/ConnectedClusters/9chyz2/providers/Microsoft.KubernetesConfiguration/extensions/xtrsd6\",\"name\":\"xtrsd6\",\"type\":\"Microsoft.KubernetesConfiguration/extensions\",\"properties\":{\"extensionType\":\"Microsoft.Arcdataservices\",\"autoUpgradeMinorVersion\":true,\"releaseTrain\":\"Stable\",\"version\":\"1.0.16701001\",\"scope\":{\"cluster\":{\"releaseNamespace\":\"arc\"}},\"provisioningState\":\"Succeeded\",\"installState\":\"Installed\",\"configurationSettings\":{},\"configurationProtectedSettings\":{},\"statuses\":[],\"aksAssignedIdentity\":null},\"systemData\":{\"createdBy\":null,\"createdByType\":null,\"createdAt\":\"2021-10-28T03:05:52.0947322+00:00\",\"lastModifiedBy\":null,\"lastModifiedByType\":null,\"lastModifiedAt\":\"2021-10-28T03:05:52.0947322+00:00\"}}", - "isContentBase64": false - } - }, - "AzKubernetesExtension+[NoContext]+List+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupeastus2euap/providers/Microsoft.Kubernetes/ConnectedClusters/9chyz2/providers/Microsoft.KubernetesConfiguration/extensions?api-version=2021-09-01+1": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupeastus2euap/providers/Microsoft.Kubernetes/ConnectedClusters/9chyz2/providers/Microsoft.KubernetesConfiguration/extensions?api-version=2021-09-01", - "Content": null, - "isContentBase64": false, - "Headers": { - "x-ms-unique-id": [ "25" ], - "x-ms-client-request-id": [ "a229e970-8888-4a06-a3fd-33ca2a3211e8" ], + "x-ms-unique-id": [ "65" ], + "x-ms-client-request-id": [ "5f88c0d6-caca-409e-ad10-c920b02751ae" ], "CommandName": [ "Az.KubernetesConfiguration.internal\\Get-AzKubernetesExtension" ], "FullCommandName": [ "Get-AzKubernetesExtension_List" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.2", "Az.KubernetesConfiguration/0.2.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -265,37 +183,37 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11984" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11954" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "api-supported-versions": [ "2020-07-01-Preview, 2021-05-01-preview, 2021-09-01" ], + "api-supported-versions": [ "2022-03-01" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "4876f28e-06e0-46bf-bba5-5ec71c642b17" ], - "x-ms-correlation-request-id": [ "4876f28e-06e0-46bf-bba5-5ec71c642b17" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20211028T030802Z:4876f28e-06e0-46bf-bba5-5ec71c642b17" ], - "Date": [ "Thu, 28 Oct 2021 03:08:01 GMT" ] + "x-ms-request-id": [ "7698d926-a606-4106-99d6-805b39e79525" ], + "x-ms-correlation-request-id": [ "7698d926-a606-4106-99d6-805b39e79525" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20220520T110808Z:7698d926-a606-4106-99d6-805b39e79525" ], + "Date": [ "Fri, 20 May 2022 11:08:08 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "863" ], + "Content-Length": [ "830" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"value\":[{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupeastus2euap/providers/Microsoft.Kubernetes/ConnectedClusters/9chyz2/providers/Microsoft.KubernetesConfiguration/extensions/xtrsd6\",\"name\":\"xtrsd6\",\"type\":\"Microsoft.KubernetesConfiguration/extensions\",\"properties\":{\"extensionType\":\"Microsoft.Arcdataservices\",\"autoUpgradeMinorVersion\":true,\"releaseTrain\":\"Stable\",\"version\":\"1.0.16701001\",\"scope\":{\"cluster\":{\"releaseNamespace\":\"arc\"}},\"provisioningState\":\"Succeeded\",\"installState\":\"Installed\",\"configurationSettings\":{},\"configurationProtectedSettings\":{},\"statuses\":[],\"aksAssignedIdentity\":null},\"systemData\":{\"createdBy\":null,\"createdByType\":null,\"createdAt\":\"2021-10-28T03:05:52.0947322+00:00\",\"lastModifiedBy\":null,\"lastModifiedByType\":null,\"lastModifiedAt\":\"2021-10-28T03:05:52.0947322+00:00\"}}],\"nextLink\":null}", + "Content": "{\"value\":[{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/extensions/07lsbw\",\"name\":\"07lsbw\",\"type\":\"Microsoft.KubernetesConfiguration/extensions\",\"properties\":{\"extensionType\":\"azuremonitor-containers\",\"autoUpgradeMinorVersion\":true,\"releaseTrain\":\"Stable\",\"version\":\"2.9.2\",\"scope\":{\"cluster\":{\"releaseNamespace\":\"kube-system\"}},\"provisioningState\":\"Succeeded\",\"configurationSettings\":{},\"configurationProtectedSettings\":{},\"statuses\":[],\"aksAssignedIdentity\":null},\"systemData\":{\"createdBy\":null,\"createdByType\":null,\"createdAt\":\"2022-05-20T11:07:01.2544635+00:00\",\"lastModifiedBy\":null,\"lastModifiedByType\":null,\"lastModifiedAt\":\"2022-05-20T11:07:01.2544635+00:00\"}}],\"nextLink\":null}", "isContentBase64": false } }, - "AzKubernetesExtension+[NoContext]+Get+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupeastus2euap/providers/Microsoft.Kubernetes/ConnectedClusters/9chyz2/providers/Microsoft.KubernetesConfiguration/extensions/xtrsd6?api-version=2021-09-01+1": { + "AzKubernetesExtension+[NoContext]+Get+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/extensions/07lsbw?api-version=2022-03-01+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupeastus2euap/providers/Microsoft.Kubernetes/ConnectedClusters/9chyz2/providers/Microsoft.KubernetesConfiguration/extensions/xtrsd6?api-version=2021-09-01", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/extensions/07lsbw?api-version=2022-03-01", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "26" ], - "x-ms-client-request-id": [ "98710ba4-3405-4ddc-91ae-513e4ccdead4" ], + "x-ms-unique-id": [ "66" ], + "x-ms-client-request-id": [ "43cf423f-3b1c-403e-8ece-ad8dcd5e5a0d" ], "CommandName": [ "Az.KubernetesConfiguration.internal\\Get-AzKubernetesExtension" ], "FullCommandName": [ "Get-AzKubernetesExtension_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.2", "Az.KubernetesConfiguration/0.2.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -306,28 +224,28 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11983" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11953" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "api-supported-versions": [ "2020-07-01-Preview, 2021-05-01-preview, 2021-09-01" ], + "api-supported-versions": [ "2022-03-01" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "c5673301-6733-4f2a-8e52-53b0dfc16134" ], - "x-ms-correlation-request-id": [ "c5673301-6733-4f2a-8e52-53b0dfc16134" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20211028T030804Z:c5673301-6733-4f2a-8e52-53b0dfc16134" ], - "Date": [ "Thu, 28 Oct 2021 03:08:04 GMT" ] + "x-ms-request-id": [ "594f9190-d650-4ca0-9c74-47b05c1827ce" ], + "x-ms-correlation-request-id": [ "594f9190-d650-4ca0-9c74-47b05c1827ce" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20220520T110811Z:594f9190-d650-4ca0-9c74-47b05c1827ce" ], + "Date": [ "Fri, 20 May 2022 11:08:11 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "835" ], + "Content-Length": [ "802" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupeastus2euap/providers/Microsoft.Kubernetes/ConnectedClusters/9chyz2/providers/Microsoft.KubernetesConfiguration/extensions/xtrsd6\",\"name\":\"xtrsd6\",\"type\":\"Microsoft.KubernetesConfiguration/extensions\",\"properties\":{\"extensionType\":\"Microsoft.Arcdataservices\",\"autoUpgradeMinorVersion\":true,\"releaseTrain\":\"Stable\",\"version\":\"1.0.16701001\",\"scope\":{\"cluster\":{\"releaseNamespace\":\"arc\"}},\"provisioningState\":\"Succeeded\",\"installState\":\"Installed\",\"configurationSettings\":{},\"configurationProtectedSettings\":{},\"statuses\":[],\"aksAssignedIdentity\":null},\"systemData\":{\"createdBy\":null,\"createdByType\":null,\"createdAt\":\"2021-10-28T03:05:52.0947322+00:00\",\"lastModifiedBy\":null,\"lastModifiedByType\":null,\"lastModifiedAt\":\"2021-10-28T03:05:52.0947322+00:00\"}}", + "Content": "{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/extensions/07lsbw\",\"name\":\"07lsbw\",\"type\":\"Microsoft.KubernetesConfiguration/extensions\",\"properties\":{\"extensionType\":\"azuremonitor-containers\",\"autoUpgradeMinorVersion\":true,\"releaseTrain\":\"Stable\",\"version\":\"2.9.2\",\"scope\":{\"cluster\":{\"releaseNamespace\":\"kube-system\"}},\"provisioningState\":\"Succeeded\",\"configurationSettings\":{},\"configurationProtectedSettings\":{},\"statuses\":[],\"aksAssignedIdentity\":null},\"systemData\":{\"createdBy\":null,\"createdByType\":null,\"createdAt\":\"2022-05-20T11:07:01.2544635+00:00\",\"lastModifiedBy\":null,\"lastModifiedByType\":null,\"lastModifiedAt\":\"2022-05-20T11:07:01.2544635+00:00\"}}", "isContentBase64": false } }, - "AzKubernetesExtension+[NoContext]+Update+$PATCH+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupeastus2euap/providers/Microsoft.Kubernetes/ConnectedClusters/9chyz2/providers/Microsoft.KubernetesConfiguration/extensions/xtrsd6?api-version=2021-09-01+1": { + "AzKubernetesExtension+[NoContext]+Update+$PATCH+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/extensions/07lsbw?api-version=2022-03-01+1": { "Request": { "Method": "PATCH", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupeastus2euap/providers/Microsoft.Kubernetes/ConnectedClusters/9chyz2/providers/Microsoft.KubernetesConfiguration/extensions/xtrsd6?api-version=2021-09-01", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/extensions/07lsbw?api-version=2022-03-01", "Content": "{\r\n \"properties\": {\r\n \"configurationProtectedSettings\": {\r\n \"aa\": \"bb\"\r\n }\r\n }\r\n}", "isContentBase64": false, "Headers": { @@ -342,81 +260,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Location": [ "https://eastus2euap.rp.kubernetesconfiguration.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupeastus2euap/providers/Microsoft.Kubernetes/ConnectedClusters/9chyz2/providers/Microsoft.KubernetesConfiguration/extensions/xtrsd6" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1194" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "Azure-AsyncOperation": [ "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupeastus2euap/providers/Microsoft.Kubernetes/ConnectedClusters/9chyz2/providers/Microsoft.KubernetesConfiguration/extensions/xtrsd6/operations/7a0d98fd-ba07-4fbe-98e9-c4dc6fb2f4f1?api-Version=2021-09-01" ], - "api-supported-versions": [ "2020-07-01-Preview, 2021-05-01-preview, 2021-09-01" ], - "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "07f1cb42-0491-4c82-8f1b-8e20d47d6a89" ], - "x-ms-correlation-request-id": [ "07f1cb42-0491-4c82-8f1b-8e20d47d6a89" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20211028T030807Z:07f1cb42-0491-4c82-8f1b-8e20d47d6a89" ], - "Date": [ "Thu, 28 Oct 2021 03:08:06 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "839" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupeastus2euap/providers/Microsoft.Kubernetes/ConnectedClusters/9chyz2/providers/Microsoft.KubernetesConfiguration/extensions/xtrsd6\",\"name\":\"xtrsd6\",\"type\":\"Microsoft.KubernetesConfiguration/extensions\",\"properties\":{\"extensionType\":\"Microsoft.Arcdataservices\",\"autoUpgradeMinorVersion\":true,\"releaseTrain\":\"Stable\",\"version\":\"1.0.16701001\",\"scope\":{\"cluster\":{\"releaseNamespace\":\"arc\"}},\"provisioningState\":\"Updating\",\"installState\":\"Unknown\",\"configurationSettings\":{},\"configurationProtectedSettings\":{\"aa\":\"\"},\"statuses\":[],\"aksAssignedIdentity\":null},\"systemData\":{\"createdBy\":null,\"createdByType\":null,\"createdAt\":\"2021-10-28T03:05:52.0947322+00:00\",\"lastModifiedBy\":null,\"lastModifiedByType\":null,\"lastModifiedAt\":\"2021-10-28T03:08:07.0362102+00:00\"}}", - "isContentBase64": false - } - }, - "AzKubernetesExtension+[NoContext]+Update+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupeastus2euap/providers/Microsoft.Kubernetes/ConnectedClusters/9chyz2/providers/Microsoft.KubernetesConfiguration/extensions/xtrsd6/operations/7a0d98fd-ba07-4fbe-98e9-c4dc6fb2f4f1?api-Version=2021-09-01+2": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupeastus2euap/providers/Microsoft.Kubernetes/ConnectedClusters/9chyz2/providers/Microsoft.KubernetesConfiguration/extensions/xtrsd6/operations/7a0d98fd-ba07-4fbe-98e9-c4dc6fb2f4f1?api-Version=2021-09-01", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "28" ], - "x-ms-client-request-id": [ "c9138f04-d2d3-4980-8991-c893251be348" ], - "CommandName": [ "Az.KubernetesConfiguration.internal\\Update-AzKubernetesExtension" ], - "FullCommandName": [ "Update-AzKubernetesExtension_UpdateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11982" ], + "Location": [ "https://eastus.rp.kubernetesconfiguration.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/extensions/07lsbw" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1187" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "api-supported-versions": [ "2019-11-01-Preview, 2021-05-01-preview, 2021-06-01-preview, 2021-09-01, 2021-11-01-preview" ], + "Azure-AsyncOperation": [ "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/extensions/07lsbw/operations/a05a472c-b5d6-45ca-9bd4-f21d90a7e699?api-Version=2022-03-01" ], + "api-supported-versions": [ "2022-03-01" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "47a73910-1e08-43de-b8f0-32701cb3bb9e" ], - "x-ms-correlation-request-id": [ "47a73910-1e08-43de-b8f0-32701cb3bb9e" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20211028T030838Z:47a73910-1e08-43de-b8f0-32701cb3bb9e" ], - "Date": [ "Thu, 28 Oct 2021 03:08:38 GMT" ] + "x-ms-request-id": [ "34d3848c-605a-4610-8858-dd31fadea0fd" ], + "x-ms-correlation-request-id": [ "34d3848c-605a-4610-8858-dd31fadea0fd" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20220520T110814Z:34d3848c-605a-4610-8858-dd31fadea0fd" ], + "Date": [ "Fri, 20 May 2022 11:08:13 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "328" ], + "Content-Length": [ "808" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupeastus2euap/providers/Microsoft.Kubernetes/ConnectedClusters/9chyz2/providers/Microsoft.KubernetesConfiguration/extensions/xtrsd6/operations/7a0d98fd-ba07-4fbe-98e9-c4dc6fb2f4f1\",\"name\":\"7a0d98fd-ba07-4fbe-98e9-c4dc6fb2f4f1\",\"status\":\"Updating\"}", + "Content": "{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/extensions/07lsbw\",\"name\":\"07lsbw\",\"type\":\"Microsoft.KubernetesConfiguration/extensions\",\"properties\":{\"extensionType\":\"azuremonitor-containers\",\"autoUpgradeMinorVersion\":true,\"releaseTrain\":\"Stable\",\"version\":\"2.9.2\",\"scope\":{\"cluster\":{\"releaseNamespace\":\"kube-system\"}},\"provisioningState\":\"Updating\",\"configurationSettings\":{},\"configurationProtectedSettings\":{\"aa\":\"\"},\"statuses\":[],\"aksAssignedIdentity\":null},\"systemData\":{\"createdBy\":null,\"createdByType\":null,\"createdAt\":\"2022-05-20T11:07:01.2544635+00:00\",\"lastModifiedBy\":null,\"lastModifiedByType\":null,\"lastModifiedAt\":\"2022-05-20T11:08:14.0479428+00:00\"}}", "isContentBase64": false } }, - "AzKubernetesExtension+[NoContext]+Update+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupeastus2euap/providers/Microsoft.Kubernetes/ConnectedClusters/9chyz2/providers/Microsoft.KubernetesConfiguration/extensions/xtrsd6/operations/7a0d98fd-ba07-4fbe-98e9-c4dc6fb2f4f1?api-Version=2021-09-01+3": { + "AzKubernetesExtension+[NoContext]+Update+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/extensions/07lsbw/operations/a05a472c-b5d6-45ca-9bd4-f21d90a7e699?api-Version=2022-03-01+2": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupeastus2euap/providers/Microsoft.Kubernetes/ConnectedClusters/9chyz2/providers/Microsoft.KubernetesConfiguration/extensions/xtrsd6/operations/7a0d98fd-ba07-4fbe-98e9-c4dc6fb2f4f1?api-Version=2021-09-01", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/extensions/07lsbw/operations/a05a472c-b5d6-45ca-9bd4-f21d90a7e699?api-Version=2022-03-01", "Content": null, "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "29" ], - "x-ms-client-request-id": [ "c9138f04-d2d3-4980-8991-c893251be348" ], + "x-ms-unique-id": [ "68" ], + "x-ms-client-request-id": [ "19359625-5266-42f7-8e6f-c5ff16d0e596" ], "CommandName": [ "Az.KubernetesConfiguration.internal\\Update-AzKubernetesExtension" ], "FullCommandName": [ "Update-AzKubernetesExtension_UpdateExpanded" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0" ] + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.2", "Az.KubernetesConfiguration/0.2.0" ] }, "ContentHeaders": { } @@ -426,38 +303,38 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11981" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11952" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "api-supported-versions": [ "2019-11-01-Preview, 2021-05-01-preview, 2021-06-01-preview, 2021-09-01, 2021-11-01-preview" ], + "api-supported-versions": [ "2019-11-01-Preview, 2021-05-01-preview, 2021-06-01-preview, 2021-09-01, 2021-11-01-preview, 2022-01-01-preview, 2022-03-01, 2022-04-02-preview" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "b9ca0e52-0f53-4033-a206-b91593e204b5" ], - "x-ms-correlation-request-id": [ "b9ca0e52-0f53-4033-a206-b91593e204b5" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20211028T030910Z:b9ca0e52-0f53-4033-a206-b91593e204b5" ], - "Date": [ "Thu, 28 Oct 2021 03:09:09 GMT" ] + "x-ms-request-id": [ "3d475474-5086-4049-8bdf-8091849d5dda" ], + "x-ms-correlation-request-id": [ "3d475474-5086-4049-8bdf-8091849d5dda" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20220520T110845Z:3d475474-5086-4049-8bdf-8091849d5dda" ], + "Date": [ "Fri, 20 May 2022 11:08:45 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "328" ], + "Content-Length": [ "323" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupeastus2euap/providers/Microsoft.Kubernetes/ConnectedClusters/9chyz2/providers/Microsoft.KubernetesConfiguration/extensions/xtrsd6/operations/7a0d98fd-ba07-4fbe-98e9-c4dc6fb2f4f1\",\"name\":\"7a0d98fd-ba07-4fbe-98e9-c4dc6fb2f4f1\",\"status\":\"Updating\"}", + "Content": "{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/extensions/07lsbw/operations/a05a472c-b5d6-45ca-9bd4-f21d90a7e699\",\"name\":\"a05a472c-b5d6-45ca-9bd4-f21d90a7e699\",\"status\":\"Updating\"}", "isContentBase64": false } }, - "AzKubernetesExtension+[NoContext]+Update+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupeastus2euap/providers/Microsoft.Kubernetes/ConnectedClusters/9chyz2/providers/Microsoft.KubernetesConfiguration/extensions/xtrsd6/operations/7a0d98fd-ba07-4fbe-98e9-c4dc6fb2f4f1?api-Version=2021-09-01+4": { + "AzKubernetesExtension+[NoContext]+Update+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/extensions/07lsbw/operations/a05a472c-b5d6-45ca-9bd4-f21d90a7e699?api-Version=2022-03-01+3": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupeastus2euap/providers/Microsoft.Kubernetes/ConnectedClusters/9chyz2/providers/Microsoft.KubernetesConfiguration/extensions/xtrsd6/operations/7a0d98fd-ba07-4fbe-98e9-c4dc6fb2f4f1?api-Version=2021-09-01", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/extensions/07lsbw/operations/a05a472c-b5d6-45ca-9bd4-f21d90a7e699?api-Version=2022-03-01", "Content": null, "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "30" ], - "x-ms-client-request-id": [ "c9138f04-d2d3-4980-8991-c893251be348" ], + "x-ms-unique-id": [ "69" ], + "x-ms-client-request-id": [ "19359625-5266-42f7-8e6f-c5ff16d0e596" ], "CommandName": [ "Az.KubernetesConfiguration.internal\\Update-AzKubernetesExtension" ], "FullCommandName": [ "Update-AzKubernetesExtension_UpdateExpanded" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0" ] + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.2", "Az.KubernetesConfiguration/0.2.0" ] }, "ContentHeaders": { } @@ -467,38 +344,38 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11980" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11951" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "api-supported-versions": [ "2019-11-01-Preview, 2021-05-01-preview, 2021-06-01-preview, 2021-09-01, 2021-11-01-preview" ], + "api-supported-versions": [ "2019-11-01-Preview, 2021-05-01-preview, 2021-06-01-preview, 2021-09-01, 2021-11-01-preview, 2022-01-01-preview, 2022-03-01, 2022-04-02-preview" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "64201f4d-5afc-430a-9a83-e7b1c516c760" ], - "x-ms-correlation-request-id": [ "64201f4d-5afc-430a-9a83-e7b1c516c760" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20211028T030941Z:64201f4d-5afc-430a-9a83-e7b1c516c760" ], - "Date": [ "Thu, 28 Oct 2021 03:09:40 GMT" ] + "x-ms-request-id": [ "0dba00a6-add0-4403-a079-6d719b3136ea" ], + "x-ms-correlation-request-id": [ "0dba00a6-add0-4403-a079-6d719b3136ea" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20220520T110917Z:0dba00a6-add0-4403-a079-6d719b3136ea" ], + "Date": [ "Fri, 20 May 2022 11:09:17 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "329" ], + "Content-Length": [ "324" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupeastus2euap/providers/Microsoft.Kubernetes/ConnectedClusters/9chyz2/providers/Microsoft.KubernetesConfiguration/extensions/xtrsd6/operations/7a0d98fd-ba07-4fbe-98e9-c4dc6fb2f4f1\",\"name\":\"7a0d98fd-ba07-4fbe-98e9-c4dc6fb2f4f1\",\"status\":\"Succeeded\"}", + "Content": "{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/extensions/07lsbw/operations/a05a472c-b5d6-45ca-9bd4-f21d90a7e699\",\"name\":\"a05a472c-b5d6-45ca-9bd4-f21d90a7e699\",\"status\":\"Succeeded\"}", "isContentBase64": false } }, - "AzKubernetesExtension+[NoContext]+Update+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupeastus2euap/providers/Microsoft.Kubernetes/ConnectedClusters/9chyz2/providers/Microsoft.KubernetesConfiguration/extensions/xtrsd6?api-version=2021-09-01+5": { + "AzKubernetesExtension+[NoContext]+Update+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/extensions/07lsbw?api-version=2022-03-01+4": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupeastus2euap/providers/Microsoft.Kubernetes/ConnectedClusters/9chyz2/providers/Microsoft.KubernetesConfiguration/extensions/xtrsd6?api-version=2021-09-01", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/extensions/07lsbw?api-version=2022-03-01", "Content": null, "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "31" ], - "x-ms-client-request-id": [ "c9138f04-d2d3-4980-8991-c893251be348" ], + "x-ms-unique-id": [ "70" ], + "x-ms-client-request-id": [ "19359625-5266-42f7-8e6f-c5ff16d0e596" ], "CommandName": [ "Az.KubernetesConfiguration.internal\\Update-AzKubernetesExtension" ], "FullCommandName": [ "Update-AzKubernetesExtension_UpdateExpanded" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0" ] + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.2", "Az.KubernetesConfiguration/0.2.0" ] }, "ContentHeaders": { } @@ -508,37 +385,37 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11979" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11950" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "api-supported-versions": [ "2020-07-01-Preview, 2021-05-01-preview, 2021-09-01" ], + "api-supported-versions": [ "2022-03-01" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "28207294-93a5-4e0f-91a6-0c137879cea9" ], - "x-ms-correlation-request-id": [ "28207294-93a5-4e0f-91a6-0c137879cea9" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20211028T030942Z:28207294-93a5-4e0f-91a6-0c137879cea9" ], - "Date": [ "Thu, 28 Oct 2021 03:09:42 GMT" ] + "x-ms-request-id": [ "abe73474-8969-4ecb-8186-ad6e0d2b3cb8" ], + "x-ms-correlation-request-id": [ "abe73474-8969-4ecb-8186-ad6e0d2b3cb8" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20220520T110919Z:abe73474-8969-4ecb-8186-ad6e0d2b3cb8" ], + "Date": [ "Fri, 20 May 2022 11:09:19 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "842" ], + "Content-Length": [ "809" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupeastus2euap/providers/Microsoft.Kubernetes/ConnectedClusters/9chyz2/providers/Microsoft.KubernetesConfiguration/extensions/xtrsd6\",\"name\":\"xtrsd6\",\"type\":\"Microsoft.KubernetesConfiguration/extensions\",\"properties\":{\"extensionType\":\"Microsoft.Arcdataservices\",\"autoUpgradeMinorVersion\":true,\"releaseTrain\":\"Stable\",\"version\":\"1.0.16701001\",\"scope\":{\"cluster\":{\"releaseNamespace\":\"arc\"}},\"provisioningState\":\"Succeeded\",\"installState\":\"Installed\",\"configurationSettings\":{},\"configurationProtectedSettings\":{\"aa\":\"\"},\"statuses\":[],\"aksAssignedIdentity\":null},\"systemData\":{\"createdBy\":null,\"createdByType\":null,\"createdAt\":\"2021-10-28T03:05:52.0947322+00:00\",\"lastModifiedBy\":null,\"lastModifiedByType\":null,\"lastModifiedAt\":\"2021-10-28T03:08:07.0362102+00:00\"}}", + "Content": "{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/extensions/07lsbw\",\"name\":\"07lsbw\",\"type\":\"Microsoft.KubernetesConfiguration/extensions\",\"properties\":{\"extensionType\":\"azuremonitor-containers\",\"autoUpgradeMinorVersion\":true,\"releaseTrain\":\"Stable\",\"version\":\"2.9.2\",\"scope\":{\"cluster\":{\"releaseNamespace\":\"kube-system\"}},\"provisioningState\":\"Succeeded\",\"configurationSettings\":{},\"configurationProtectedSettings\":{\"aa\":\"\"},\"statuses\":[],\"aksAssignedIdentity\":null},\"systemData\":{\"createdBy\":null,\"createdByType\":null,\"createdAt\":\"2022-05-20T11:07:01.2544635+00:00\",\"lastModifiedBy\":null,\"lastModifiedByType\":null,\"lastModifiedAt\":\"2022-05-20T11:08:14.0479428+00:00\"}}", "isContentBase64": false } }, - "AzKubernetesExtension+[NoContext]+Delete+$DELETE+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupeastus2euap/providers/Microsoft.Kubernetes/ConnectedClusters/9chyz2/providers/Microsoft.KubernetesConfiguration/extensions/xtrsd6?api-version=2021-09-01+1": { + "AzKubernetesExtension+[NoContext]+Delete+$DELETE+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/extensions/07lsbw?api-version=2022-03-01+1": { "Request": { "Method": "DELETE", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupeastus2euap/providers/Microsoft.Kubernetes/ConnectedClusters/9chyz2/providers/Microsoft.KubernetesConfiguration/extensions/xtrsd6?api-version=2021-09-01", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/extensions/07lsbw?api-version=2022-03-01", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "32" ], - "x-ms-client-request-id": [ "a2e30b0b-5092-4f6f-a955-c7b62b4880c8" ], + "x-ms-unique-id": [ "71" ], + "x-ms-client-request-id": [ "9cbac59c-3ad5-41c8-8f5b-a3303669301c" ], "CommandName": [ "Az.KubernetesConfiguration.internal\\Remove-AzKubernetesExtension" ], "FullCommandName": [ "Remove-AzKubernetesExtension_Delete" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.2", "Az.KubernetesConfiguration/0.2.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -549,15 +426,15 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-deletes": [ "14995" ], + "x-ms-ratelimit-remaining-subscription-deletes": [ "14992" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "Azure-AsyncOperation": [ "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupeastus2euap/providers/Microsoft.Kubernetes/ConnectedClusters/9chyz2/providers/Microsoft.KubernetesConfiguration/extensions/xtrsd6/operations/4352c9d0-a463-4f2f-9fc5-b19e7341b0ff?api-Version=2021-09-01" ], - "api-supported-versions": [ "2020-07-01-Preview, 2021-05-01-preview, 2021-09-01" ], + "Azure-AsyncOperation": [ "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/extensions/07lsbw/operations/a33c72e0-956c-4684-8afa-1430e9890589?api-Version=2022-03-01" ], + "api-supported-versions": [ "2022-03-01" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "d6b54526-09a8-4392-9328-5b1db48dd52c" ], - "x-ms-correlation-request-id": [ "d6b54526-09a8-4392-9328-5b1db48dd52c" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20211028T030945Z:d6b54526-09a8-4392-9328-5b1db48dd52c" ], - "Date": [ "Thu, 28 Oct 2021 03:09:44 GMT" ] + "x-ms-request-id": [ "86691511-f4d4-4672-80c5-21c15190abc1" ], + "x-ms-correlation-request-id": [ "86691511-f4d4-4672-80c5-21c15190abc1" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20220520T110922Z:86691511-f4d4-4672-80c5-21c15190abc1" ], + "Date": [ "Fri, 20 May 2022 11:09:22 GMT" ] }, "ContentHeaders": { "Expires": [ "-1" ], @@ -567,20 +444,20 @@ "isContentBase64": false } }, - "AzKubernetesExtension+[NoContext]+Delete+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupeastus2euap/providers/Microsoft.Kubernetes/ConnectedClusters/9chyz2/providers/Microsoft.KubernetesConfiguration/extensions/xtrsd6/operations/4352c9d0-a463-4f2f-9fc5-b19e7341b0ff?api-Version=2021-09-01+2": { + "AzKubernetesExtension+[NoContext]+Delete+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/extensions/07lsbw/operations/a33c72e0-956c-4684-8afa-1430e9890589?api-Version=2022-03-01+2": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupeastus2euap/providers/Microsoft.Kubernetes/ConnectedClusters/9chyz2/providers/Microsoft.KubernetesConfiguration/extensions/xtrsd6/operations/4352c9d0-a463-4f2f-9fc5-b19e7341b0ff?api-Version=2021-09-01", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/extensions/07lsbw/operations/a33c72e0-956c-4684-8afa-1430e9890589?api-Version=2022-03-01", "Content": null, "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "33" ], - "x-ms-client-request-id": [ "a2e30b0b-5092-4f6f-a955-c7b62b4880c8" ], + "x-ms-unique-id": [ "72" ], + "x-ms-client-request-id": [ "9cbac59c-3ad5-41c8-8f5b-a3303669301c" ], "CommandName": [ "Az.KubernetesConfiguration.internal\\Remove-AzKubernetesExtension" ], "FullCommandName": [ "Remove-AzKubernetesExtension_Delete" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0" ] + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.2", "Az.KubernetesConfiguration/0.2.0" ] }, "ContentHeaders": { } @@ -590,38 +467,38 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11978" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11949" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "api-supported-versions": [ "2019-11-01-Preview, 2021-05-01-preview, 2021-06-01-preview, 2021-09-01, 2021-11-01-preview" ], + "api-supported-versions": [ "2019-11-01-Preview, 2021-05-01-preview, 2021-06-01-preview, 2021-09-01, 2021-11-01-preview, 2022-01-01-preview, 2022-03-01, 2022-04-02-preview" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "b7a13015-767b-47fa-94ae-93eb0301e308" ], - "x-ms-correlation-request-id": [ "b7a13015-767b-47fa-94ae-93eb0301e308" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20211028T031016Z:b7a13015-767b-47fa-94ae-93eb0301e308" ], - "Date": [ "Thu, 28 Oct 2021 03:10:16 GMT" ] + "x-ms-request-id": [ "c18f3700-f4d2-494d-bf2f-67c70238a8c2" ], + "x-ms-correlation-request-id": [ "c18f3700-f4d2-494d-bf2f-67c70238a8c2" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20220520T110954Z:c18f3700-f4d2-494d-bf2f-67c70238a8c2" ], + "Date": [ "Fri, 20 May 2022 11:09:53 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "328" ], + "Content-Length": [ "323" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupeastus2euap/providers/Microsoft.Kubernetes/ConnectedClusters/9chyz2/providers/Microsoft.KubernetesConfiguration/extensions/xtrsd6/operations/4352c9d0-a463-4f2f-9fc5-b19e7341b0ff\",\"name\":\"4352c9d0-a463-4f2f-9fc5-b19e7341b0ff\",\"status\":\"Deleting\"}", + "Content": "{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/extensions/07lsbw/operations/a33c72e0-956c-4684-8afa-1430e9890589\",\"name\":\"a33c72e0-956c-4684-8afa-1430e9890589\",\"status\":\"Deleting\"}", "isContentBase64": false } }, - "AzKubernetesExtension+[NoContext]+Delete+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupeastus2euap/providers/Microsoft.Kubernetes/ConnectedClusters/9chyz2/providers/Microsoft.KubernetesConfiguration/extensions/xtrsd6/operations/4352c9d0-a463-4f2f-9fc5-b19e7341b0ff?api-Version=2021-09-01+3": { + "AzKubernetesExtension+[NoContext]+Delete+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/extensions/07lsbw/operations/a33c72e0-956c-4684-8afa-1430e9890589?api-Version=2022-03-01+3": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupeastus2euap/providers/Microsoft.Kubernetes/ConnectedClusters/9chyz2/providers/Microsoft.KubernetesConfiguration/extensions/xtrsd6/operations/4352c9d0-a463-4f2f-9fc5-b19e7341b0ff?api-Version=2021-09-01", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/extensions/07lsbw/operations/a33c72e0-956c-4684-8afa-1430e9890589?api-Version=2022-03-01", "Content": null, "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "34" ], - "x-ms-client-request-id": [ "a2e30b0b-5092-4f6f-a955-c7b62b4880c8" ], + "x-ms-unique-id": [ "73" ], + "x-ms-client-request-id": [ "9cbac59c-3ad5-41c8-8f5b-a3303669301c" ], "CommandName": [ "Az.KubernetesConfiguration.internal\\Remove-AzKubernetesExtension" ], "FullCommandName": [ "Remove-AzKubernetesExtension_Delete" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0" ] + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.2", "Az.KubernetesConfiguration/0.2.0" ] }, "ContentHeaders": { } @@ -631,38 +508,38 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11977" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11948" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "api-supported-versions": [ "2019-11-01-Preview, 2021-05-01-preview, 2021-06-01-preview, 2021-09-01, 2021-11-01-preview" ], + "api-supported-versions": [ "2019-11-01-Preview, 2021-05-01-preview, 2021-06-01-preview, 2021-09-01, 2021-11-01-preview, 2022-01-01-preview, 2022-03-01, 2022-04-02-preview" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "9843e1e2-cb0f-46bd-a14b-681cece32751" ], - "x-ms-correlation-request-id": [ "9843e1e2-cb0f-46bd-a14b-681cece32751" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20211028T031048Z:9843e1e2-cb0f-46bd-a14b-681cece32751" ], - "Date": [ "Thu, 28 Oct 2021 03:10:48 GMT" ] + "x-ms-request-id": [ "6fe46f78-0c89-47cb-b850-5539d87e4fb9" ], + "x-ms-correlation-request-id": [ "6fe46f78-0c89-47cb-b850-5539d87e4fb9" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20220520T111026Z:6fe46f78-0c89-47cb-b850-5539d87e4fb9" ], + "Date": [ "Fri, 20 May 2022 11:10:25 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "329" ], + "Content-Length": [ "323" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupeastus2euap/providers/Microsoft.Kubernetes/ConnectedClusters/9chyz2/providers/Microsoft.KubernetesConfiguration/extensions/xtrsd6/operations/4352c9d0-a463-4f2f-9fc5-b19e7341b0ff\",\"name\":\"4352c9d0-a463-4f2f-9fc5-b19e7341b0ff\",\"status\":\"Succeeded\"}", + "Content": "{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/extensions/07lsbw/operations/a33c72e0-956c-4684-8afa-1430e9890589\",\"name\":\"a33c72e0-956c-4684-8afa-1430e9890589\",\"status\":\"Deleting\"}", "isContentBase64": false } }, - "AzKubernetesExtension+[NoContext]+Delete+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupeastus2euap/providers/Microsoft.Kubernetes/ConnectedClusters/9chyz2/providers/Microsoft.KubernetesConfiguration/extensions/xtrsd6/operations/4352c9d0-a463-4f2f-9fc5-b19e7341b0ff?api-Version=2021-09-01+4": { + "AzKubernetesExtension+[NoContext]+Delete+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/extensions/07lsbw/operations/a33c72e0-956c-4684-8afa-1430e9890589?api-Version=2022-03-01+4": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupeastus2euap/providers/Microsoft.Kubernetes/ConnectedClusters/9chyz2/providers/Microsoft.KubernetesConfiguration/extensions/xtrsd6/operations/4352c9d0-a463-4f2f-9fc5-b19e7341b0ff?api-Version=2021-09-01", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/extensions/07lsbw/operations/a33c72e0-956c-4684-8afa-1430e9890589?api-Version=2022-03-01", "Content": null, "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "35" ], - "x-ms-client-request-id": [ "a2e30b0b-5092-4f6f-a955-c7b62b4880c8" ], + "x-ms-unique-id": [ "74" ], + "x-ms-client-request-id": [ "9cbac59c-3ad5-41c8-8f5b-a3303669301c" ], "CommandName": [ "Az.KubernetesConfiguration.internal\\Remove-AzKubernetesExtension" ], "FullCommandName": [ "Remove-AzKubernetesExtension_Delete" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0" ] + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.2", "Az.KubernetesConfiguration/0.2.0" ] }, "ContentHeaders": { } @@ -672,117 +549,117 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11976" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11947" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "api-supported-versions": [ "2019-11-01-Preview, 2021-05-01-preview, 2021-06-01-preview, 2021-09-01, 2021-11-01-preview" ], + "api-supported-versions": [ "2019-11-01-Preview, 2021-05-01-preview, 2021-06-01-preview, 2021-09-01, 2021-11-01-preview, 2022-01-01-preview, 2022-03-01, 2022-04-02-preview" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "4c3c1fbd-3f70-4a19-ae9e-471bef5ca384" ], - "x-ms-correlation-request-id": [ "4c3c1fbd-3f70-4a19-ae9e-471bef5ca384" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20211028T031049Z:4c3c1fbd-3f70-4a19-ae9e-471bef5ca384" ], - "Date": [ "Thu, 28 Oct 2021 03:10:49 GMT" ] + "x-ms-request-id": [ "4453527a-8d7e-4a80-86d2-33bc4dcd7229" ], + "x-ms-correlation-request-id": [ "4453527a-8d7e-4a80-86d2-33bc4dcd7229" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20220520T111057Z:4453527a-8d7e-4a80-86d2-33bc4dcd7229" ], + "Date": [ "Fri, 20 May 2022 11:10:57 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "329" ], + "Content-Length": [ "324" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupeastus2euap/providers/Microsoft.Kubernetes/ConnectedClusters/9chyz2/providers/Microsoft.KubernetesConfiguration/extensions/xtrsd6/operations/4352c9d0-a463-4f2f-9fc5-b19e7341b0ff\",\"name\":\"4352c9d0-a463-4f2f-9fc5-b19e7341b0ff\",\"status\":\"Succeeded\"}", + "Content": "{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/extensions/07lsbw/operations/a33c72e0-956c-4684-8afa-1430e9890589\",\"name\":\"a33c72e0-956c-4684-8afa-1430e9890589\",\"status\":\"Succeeded\"}", "isContentBase64": false } }, - "AzKubernetesExtension+[NoContext]+K8sCreateExpanded+$PUT+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupeastus2euap/providers/Microsoft.Kubernetes/ConnectedClusters/9chyz2/providers/Microsoft.KubernetesConfiguration/extensions/xtrsd6?api-version=2021-09-01+1": { + "AzKubernetesExtension+[NoContext]+Delete+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/extensions/07lsbw/operations/a33c72e0-956c-4684-8afa-1430e9890589?api-Version=2022-03-01+5": { "Request": { - "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupeastus2euap/providers/Microsoft.Kubernetes/ConnectedClusters/9chyz2/providers/Microsoft.KubernetesConfiguration/extensions/xtrsd6?api-version=2021-09-01", - "Content": "{\r\n \"properties\": {\r\n \"extensionType\": \"Microsoft.Arcdataservices\"\r\n }\r\n}", + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/extensions/07lsbw/operations/a33c72e0-956c-4684-8afa-1430e9890589?api-Version=2022-03-01", + "Content": null, "isContentBase64": false, "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "75" ], + "x-ms-client-request-id": [ "9cbac59c-3ad5-41c8-8f5b-a3303669301c" ], + "CommandName": [ "Az.KubernetesConfiguration.internal\\Remove-AzKubernetesExtension" ], + "FullCommandName": [ "Remove-AzKubernetesExtension_Delete" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.2", "Az.KubernetesConfiguration/0.2.0" ] }, "ContentHeaders": { - "Content-Type": [ "application/json" ], - "Content-Length": [ "78" ] } }, "Response": { - "StatusCode": 201, + "StatusCode": 200, "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Location": [ "https://eastus2euap.rp.kubernetesconfiguration.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupeastus2euap/providers/Microsoft.Kubernetes/ConnectedClusters/9chyz2/providers/Microsoft.KubernetesConfiguration/extensions/xtrsd6" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1193" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11946" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "Azure-AsyncOperation": [ "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupeastus2euap/providers/Microsoft.Kubernetes/ConnectedClusters/9chyz2/providers/Microsoft.KubernetesConfiguration/extensions/xtrsd6/operations/656d8a4a-9a7f-4217-8f1c-18170a635b15?api-Version=2021-09-01" ], - "api-supported-versions": [ "2020-07-01-Preview, 2021-05-01-preview, 2021-09-01" ], + "api-supported-versions": [ "2019-11-01-Preview, 2021-05-01-preview, 2021-06-01-preview, 2021-09-01, 2021-11-01-preview, 2022-01-01-preview, 2022-03-01, 2022-04-02-preview" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "6bbc7de9-e297-4bbe-bee7-6ec2f9cf4e65" ], - "x-ms-correlation-request-id": [ "6bbc7de9-e297-4bbe-bee7-6ec2f9cf4e65" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20211028T031053Z:6bbc7de9-e297-4bbe-bee7-6ec2f9cf4e65" ], - "Date": [ "Thu, 28 Oct 2021 03:10:52 GMT" ] + "x-ms-request-id": [ "68d4f2a0-009d-432a-8281-87f3272df98d" ], + "x-ms-correlation-request-id": [ "68d4f2a0-009d-432a-8281-87f3272df98d" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20220520T111059Z:68d4f2a0-009d-432a-8281-87f3272df98d" ], + "Date": [ "Fri, 20 May 2022 11:10:59 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "822" ], + "Content-Length": [ "324" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupeastus2euap/providers/Microsoft.Kubernetes/ConnectedClusters/9chyz2/providers/Microsoft.KubernetesConfiguration/extensions/xtrsd6\",\"name\":\"xtrsd6\",\"type\":\"Microsoft.KubernetesConfiguration/extensions\",\"properties\":{\"extensionType\":\"Microsoft.Arcdataservices\",\"autoUpgradeMinorVersion\":true,\"releaseTrain\":\"Stable\",\"version\":null,\"scope\":{\"cluster\":{\"releaseNamespace\":\"arc\"}},\"provisioningState\":\"Creating\",\"installState\":\"Unknown\",\"configurationSettings\":{},\"configurationProtectedSettings\":{},\"statuses\":[],\"aksAssignedIdentity\":null},\"systemData\":{\"createdBy\":null,\"createdByType\":null,\"createdAt\":\"2021-10-28T03:10:53.1982314+00:00\",\"lastModifiedBy\":null,\"lastModifiedByType\":null,\"lastModifiedAt\":\"2021-10-28T03:10:53.1982314+00:00\"}}", + "Content": "{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/extensions/07lsbw/operations/a33c72e0-956c-4684-8afa-1430e9890589\",\"name\":\"a33c72e0-956c-4684-8afa-1430e9890589\",\"status\":\"Succeeded\"}", "isContentBase64": false } }, - "AzKubernetesExtension+[NoContext]+K8sCreateExpanded+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupeastus2euap/providers/Microsoft.Kubernetes/ConnectedClusters/9chyz2/providers/Microsoft.KubernetesConfiguration/extensions/xtrsd6/operations/656d8a4a-9a7f-4217-8f1c-18170a635b15?api-Version=2021-09-01+2": { + "AzKubernetesExtension+[NoContext]+K8sCreateExpanded+$PUT+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/extensions/07lsbw?api-version=2022-03-01+1": { "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupeastus2euap/providers/Microsoft.Kubernetes/ConnectedClusters/9chyz2/providers/Microsoft.KubernetesConfiguration/extensions/xtrsd6/operations/656d8a4a-9a7f-4217-8f1c-18170a635b15?api-Version=2021-09-01", - "Content": null, + "Method": "PUT", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/extensions/07lsbw?api-version=2022-03-01", + "Content": "{\r\n \"properties\": {\r\n \"extensionType\": \"azuremonitor-containers\"\r\n }\r\n}", "isContentBase64": false, "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "37" ], - "x-ms-client-request-id": [ "79a6b8d7-ec60-4133-a2c2-00e451df4170" ], - "CommandName": [ "Az.KubernetesConfiguration.internal\\New-AzKubernetesExtension" ], - "FullCommandName": [ "New-AzKubernetesExtension_CreateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0" ] }, "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "76" ] } }, "Response": { - "StatusCode": 200, + "StatusCode": 201, "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11975" ], + "Location": [ "https://eastus.rp.kubernetesconfiguration.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/extensions/07lsbw" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1186" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "api-supported-versions": [ "2019-11-01-Preview, 2021-05-01-preview, 2021-06-01-preview, 2021-09-01, 2021-11-01-preview" ], + "Azure-AsyncOperation": [ "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/extensions/07lsbw/operations/fe748ffe-a455-4c43-b898-4e200288172a?api-Version=2022-03-01" ], + "api-supported-versions": [ "2022-03-01" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "68c16c27-f65e-4984-8432-f4ff301a2518" ], - "x-ms-correlation-request-id": [ "68c16c27-f65e-4984-8432-f4ff301a2518" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20211028T031124Z:68c16c27-f65e-4984-8432-f4ff301a2518" ], - "Date": [ "Thu, 28 Oct 2021 03:11:23 GMT" ] + "x-ms-request-id": [ "b275e07b-67b3-48eb-bccd-7e703e1c2f85" ], + "x-ms-correlation-request-id": [ "b275e07b-67b3-48eb-bccd-7e703e1c2f85" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20220520T111103Z:b275e07b-67b3-48eb-bccd-7e703e1c2f85" ], + "Date": [ "Fri, 20 May 2022 11:11:03 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "328" ], + "Content-Length": [ "798" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupeastus2euap/providers/Microsoft.Kubernetes/ConnectedClusters/9chyz2/providers/Microsoft.KubernetesConfiguration/extensions/xtrsd6/operations/656d8a4a-9a7f-4217-8f1c-18170a635b15\",\"name\":\"656d8a4a-9a7f-4217-8f1c-18170a635b15\",\"status\":\"Creating\"}", + "Content": "{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/extensions/07lsbw\",\"name\":\"07lsbw\",\"type\":\"Microsoft.KubernetesConfiguration/extensions\",\"properties\":{\"extensionType\":\"azuremonitor-containers\",\"autoUpgradeMinorVersion\":true,\"releaseTrain\":\"Stable\",\"version\":null,\"scope\":{\"cluster\":{\"releaseNamespace\":\"kube-system\"}},\"provisioningState\":\"Creating\",\"configurationSettings\":{},\"configurationProtectedSettings\":{},\"statuses\":[],\"aksAssignedIdentity\":null},\"systemData\":{\"createdBy\":null,\"createdByType\":null,\"createdAt\":\"2022-05-20T11:11:03.2038385+00:00\",\"lastModifiedBy\":null,\"lastModifiedByType\":null,\"lastModifiedAt\":\"2022-05-20T11:11:03.2038385+00:00\"}}", "isContentBase64": false } }, - "AzKubernetesExtension+[NoContext]+K8sCreateExpanded+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupeastus2euap/providers/Microsoft.Kubernetes/ConnectedClusters/9chyz2/providers/Microsoft.KubernetesConfiguration/extensions/xtrsd6/operations/656d8a4a-9a7f-4217-8f1c-18170a635b15?api-Version=2021-09-01+3": { + "AzKubernetesExtension+[NoContext]+K8sCreateExpanded+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/extensions/07lsbw/operations/fe748ffe-a455-4c43-b898-4e200288172a?api-Version=2022-03-01+2": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupeastus2euap/providers/Microsoft.Kubernetes/ConnectedClusters/9chyz2/providers/Microsoft.KubernetesConfiguration/extensions/xtrsd6/operations/656d8a4a-9a7f-4217-8f1c-18170a635b15?api-Version=2021-09-01", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/extensions/07lsbw/operations/fe748ffe-a455-4c43-b898-4e200288172a?api-Version=2022-03-01", "Content": null, "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "38" ], - "x-ms-client-request-id": [ "79a6b8d7-ec60-4133-a2c2-00e451df4170" ], + "x-ms-unique-id": [ "77" ], + "x-ms-client-request-id": [ "bbd3f022-6810-4ece-a585-415ade5725c4" ], "CommandName": [ "Az.KubernetesConfiguration.internal\\New-AzKubernetesExtension" ], "FullCommandName": [ "New-AzKubernetesExtension_CreateExpanded" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0" ] + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.2", "Az.KubernetesConfiguration/0.2.0" ] }, "ContentHeaders": { } @@ -792,38 +669,38 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11974" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11945" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "api-supported-versions": [ "2019-11-01-Preview, 2021-05-01-preview, 2021-06-01-preview, 2021-09-01, 2021-11-01-preview" ], + "api-supported-versions": [ "2019-11-01-Preview, 2021-05-01-preview, 2021-06-01-preview, 2021-09-01, 2021-11-01-preview, 2022-01-01-preview, 2022-03-01, 2022-04-02-preview" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "2bb0630b-8b68-46fa-a49f-42a746947ca4" ], - "x-ms-correlation-request-id": [ "2bb0630b-8b68-46fa-a49f-42a746947ca4" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20211028T031156Z:2bb0630b-8b68-46fa-a49f-42a746947ca4" ], - "Date": [ "Thu, 28 Oct 2021 03:11:56 GMT" ] + "x-ms-request-id": [ "b3fdd14e-72ed-436b-b4c3-44163385bfd4" ], + "x-ms-correlation-request-id": [ "b3fdd14e-72ed-436b-b4c3-44163385bfd4" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20220520T111135Z:b3fdd14e-72ed-436b-b4c3-44163385bfd4" ], + "Date": [ "Fri, 20 May 2022 11:11:34 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "328" ], + "Content-Length": [ "323" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupeastus2euap/providers/Microsoft.Kubernetes/ConnectedClusters/9chyz2/providers/Microsoft.KubernetesConfiguration/extensions/xtrsd6/operations/656d8a4a-9a7f-4217-8f1c-18170a635b15\",\"name\":\"656d8a4a-9a7f-4217-8f1c-18170a635b15\",\"status\":\"Creating\"}", + "Content": "{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/extensions/07lsbw/operations/fe748ffe-a455-4c43-b898-4e200288172a\",\"name\":\"fe748ffe-a455-4c43-b898-4e200288172a\",\"status\":\"Creating\"}", "isContentBase64": false } }, - "AzKubernetesExtension+[NoContext]+K8sCreateExpanded+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupeastus2euap/providers/Microsoft.Kubernetes/ConnectedClusters/9chyz2/providers/Microsoft.KubernetesConfiguration/extensions/xtrsd6/operations/656d8a4a-9a7f-4217-8f1c-18170a635b15?api-Version=2021-09-01+4": { + "AzKubernetesExtension+[NoContext]+K8sCreateExpanded+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/extensions/07lsbw/operations/fe748ffe-a455-4c43-b898-4e200288172a?api-Version=2022-03-01+3": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupeastus2euap/providers/Microsoft.Kubernetes/ConnectedClusters/9chyz2/providers/Microsoft.KubernetesConfiguration/extensions/xtrsd6/operations/656d8a4a-9a7f-4217-8f1c-18170a635b15?api-Version=2021-09-01", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/extensions/07lsbw/operations/fe748ffe-a455-4c43-b898-4e200288172a?api-Version=2022-03-01", "Content": null, "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "39" ], - "x-ms-client-request-id": [ "79a6b8d7-ec60-4133-a2c2-00e451df4170" ], + "x-ms-unique-id": [ "78" ], + "x-ms-client-request-id": [ "bbd3f022-6810-4ece-a585-415ade5725c4" ], "CommandName": [ "Az.KubernetesConfiguration.internal\\New-AzKubernetesExtension" ], "FullCommandName": [ "New-AzKubernetesExtension_CreateExpanded" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0" ] + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.2", "Az.KubernetesConfiguration/0.2.0" ] }, "ContentHeaders": { } @@ -833,38 +710,38 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11973" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11944" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "api-supported-versions": [ "2019-11-01-Preview, 2021-05-01-preview, 2021-06-01-preview, 2021-09-01, 2021-11-01-preview" ], + "api-supported-versions": [ "2019-11-01-Preview, 2021-05-01-preview, 2021-06-01-preview, 2021-09-01, 2021-11-01-preview, 2022-01-01-preview, 2022-03-01, 2022-04-02-preview" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "6176c9c3-adab-48e7-9038-0a1b3ece34ed" ], - "x-ms-correlation-request-id": [ "6176c9c3-adab-48e7-9038-0a1b3ece34ed" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20211028T031228Z:6176c9c3-adab-48e7-9038-0a1b3ece34ed" ], - "Date": [ "Thu, 28 Oct 2021 03:12:27 GMT" ] + "x-ms-request-id": [ "c7aee6e7-af21-4077-8c1f-dc470d41ff42" ], + "x-ms-correlation-request-id": [ "c7aee6e7-af21-4077-8c1f-dc470d41ff42" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20220520T111207Z:c7aee6e7-af21-4077-8c1f-dc470d41ff42" ], + "Date": [ "Fri, 20 May 2022 11:12:06 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "329" ], + "Content-Length": [ "324" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupeastus2euap/providers/Microsoft.Kubernetes/ConnectedClusters/9chyz2/providers/Microsoft.KubernetesConfiguration/extensions/xtrsd6/operations/656d8a4a-9a7f-4217-8f1c-18170a635b15\",\"name\":\"656d8a4a-9a7f-4217-8f1c-18170a635b15\",\"status\":\"Succeeded\"}", + "Content": "{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/extensions/07lsbw/operations/fe748ffe-a455-4c43-b898-4e200288172a\",\"name\":\"fe748ffe-a455-4c43-b898-4e200288172a\",\"status\":\"Succeeded\"}", "isContentBase64": false } }, - "AzKubernetesExtension+[NoContext]+K8sCreateExpanded+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupeastus2euap/providers/Microsoft.Kubernetes/ConnectedClusters/9chyz2/providers/Microsoft.KubernetesConfiguration/extensions/xtrsd6?api-version=2021-09-01+5": { + "AzKubernetesExtension+[NoContext]+K8sCreateExpanded+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/extensions/07lsbw?api-version=2022-03-01+4": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupeastus2euap/providers/Microsoft.Kubernetes/ConnectedClusters/9chyz2/providers/Microsoft.KubernetesConfiguration/extensions/xtrsd6?api-version=2021-09-01", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/extensions/07lsbw?api-version=2022-03-01", "Content": null, "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "40" ], - "x-ms-client-request-id": [ "79a6b8d7-ec60-4133-a2c2-00e451df4170" ], + "x-ms-unique-id": [ "79" ], + "x-ms-client-request-id": [ "bbd3f022-6810-4ece-a585-415ade5725c4" ], "CommandName": [ "Az.KubernetesConfiguration.internal\\New-AzKubernetesExtension" ], "FullCommandName": [ "New-AzKubernetesExtension_CreateExpanded" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0" ] + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.2", "Az.KubernetesConfiguration/0.2.0" ] }, "ContentHeaders": { } @@ -874,37 +751,37 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11972" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11943" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "api-supported-versions": [ "2020-07-01-Preview, 2021-05-01-preview, 2021-09-01" ], + "api-supported-versions": [ "2022-03-01" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "1d513ff7-1037-46bd-9bd5-b1330bb0d95d" ], - "x-ms-correlation-request-id": [ "1d513ff7-1037-46bd-9bd5-b1330bb0d95d" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20211028T031229Z:1d513ff7-1037-46bd-9bd5-b1330bb0d95d" ], - "Date": [ "Thu, 28 Oct 2021 03:12:29 GMT" ] + "x-ms-request-id": [ "107b3de3-1d80-4156-81b8-583bd1120607" ], + "x-ms-correlation-request-id": [ "107b3de3-1d80-4156-81b8-583bd1120607" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20220520T111208Z:107b3de3-1d80-4156-81b8-583bd1120607" ], + "Date": [ "Fri, 20 May 2022 11:12:07 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "835" ], + "Content-Length": [ "802" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupeastus2euap/providers/Microsoft.Kubernetes/ConnectedClusters/9chyz2/providers/Microsoft.KubernetesConfiguration/extensions/xtrsd6\",\"name\":\"xtrsd6\",\"type\":\"Microsoft.KubernetesConfiguration/extensions\",\"properties\":{\"extensionType\":\"Microsoft.Arcdataservices\",\"autoUpgradeMinorVersion\":true,\"releaseTrain\":\"Stable\",\"version\":\"1.0.16701001\",\"scope\":{\"cluster\":{\"releaseNamespace\":\"arc\"}},\"provisioningState\":\"Succeeded\",\"installState\":\"Installed\",\"configurationSettings\":{},\"configurationProtectedSettings\":{},\"statuses\":[],\"aksAssignedIdentity\":null},\"systemData\":{\"createdBy\":null,\"createdByType\":null,\"createdAt\":\"2021-10-28T03:10:53.1982314+00:00\",\"lastModifiedBy\":null,\"lastModifiedByType\":null,\"lastModifiedAt\":\"2021-10-28T03:10:53.1982314+00:00\"}}", + "Content": "{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/extensions/07lsbw\",\"name\":\"07lsbw\",\"type\":\"Microsoft.KubernetesConfiguration/extensions\",\"properties\":{\"extensionType\":\"azuremonitor-containers\",\"autoUpgradeMinorVersion\":true,\"releaseTrain\":\"Stable\",\"version\":\"2.9.2\",\"scope\":{\"cluster\":{\"releaseNamespace\":\"kube-system\"}},\"provisioningState\":\"Succeeded\",\"configurationSettings\":{},\"configurationProtectedSettings\":{},\"statuses\":[],\"aksAssignedIdentity\":null},\"systemData\":{\"createdBy\":null,\"createdByType\":null,\"createdAt\":\"2022-05-20T11:11:03.2038385+00:00\",\"lastModifiedBy\":null,\"lastModifiedByType\":null,\"lastModifiedAt\":\"2022-05-20T11:11:03.2038385+00:00\"}}", "isContentBase64": false } }, - "AzKubernetesExtension+[NoContext]+K8sList+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupeastus2euap/providers/Microsoft.Kubernetes/ConnectedClusters/9chyz2/providers/Microsoft.KubernetesConfiguration/extensions?api-version=2021-09-01+1": { + "AzKubernetesExtension+[NoContext]+K8sList+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/extensions?api-version=2022-03-01+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupeastus2euap/providers/Microsoft.Kubernetes/ConnectedClusters/9chyz2/providers/Microsoft.KubernetesConfiguration/extensions?api-version=2021-09-01", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/extensions?api-version=2022-03-01", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "41" ], - "x-ms-client-request-id": [ "b5a03f96-fccf-4d03-a587-6c5b42e9680d" ], + "x-ms-unique-id": [ "80" ], + "x-ms-client-request-id": [ "14138a6a-75f1-417a-9bc3-eb6b83167b8a" ], "CommandName": [ "Az.KubernetesConfiguration.internal\\Get-AzKubernetesExtension" ], "FullCommandName": [ "Get-AzKubernetesExtension_List" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.2", "Az.KubernetesConfiguration/0.2.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -915,37 +792,37 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11971" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11942" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "api-supported-versions": [ "2020-07-01-Preview, 2021-05-01-preview, 2021-09-01" ], + "api-supported-versions": [ "2022-03-01" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "0faef5d0-ad59-49ea-9857-7fe76ff3d991" ], - "x-ms-correlation-request-id": [ "0faef5d0-ad59-49ea-9857-7fe76ff3d991" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20211028T031232Z:0faef5d0-ad59-49ea-9857-7fe76ff3d991" ], - "Date": [ "Thu, 28 Oct 2021 03:12:31 GMT" ] + "x-ms-request-id": [ "f8de5ac9-7a2d-4be2-8dab-d0aa9c35bdb6" ], + "x-ms-correlation-request-id": [ "f8de5ac9-7a2d-4be2-8dab-d0aa9c35bdb6" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20220520T111211Z:f8de5ac9-7a2d-4be2-8dab-d0aa9c35bdb6" ], + "Date": [ "Fri, 20 May 2022 11:12:10 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "863" ], + "Content-Length": [ "830" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"value\":[{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupeastus2euap/providers/Microsoft.Kubernetes/ConnectedClusters/9chyz2/providers/Microsoft.KubernetesConfiguration/extensions/xtrsd6\",\"name\":\"xtrsd6\",\"type\":\"Microsoft.KubernetesConfiguration/extensions\",\"properties\":{\"extensionType\":\"Microsoft.Arcdataservices\",\"autoUpgradeMinorVersion\":true,\"releaseTrain\":\"Stable\",\"version\":\"1.0.16701001\",\"scope\":{\"cluster\":{\"releaseNamespace\":\"arc\"}},\"provisioningState\":\"Succeeded\",\"installState\":\"Installed\",\"configurationSettings\":{},\"configurationProtectedSettings\":{},\"statuses\":[],\"aksAssignedIdentity\":null},\"systemData\":{\"createdBy\":null,\"createdByType\":null,\"createdAt\":\"2021-10-28T03:10:53.1982314+00:00\",\"lastModifiedBy\":null,\"lastModifiedByType\":null,\"lastModifiedAt\":\"2021-10-28T03:10:53.1982314+00:00\"}}],\"nextLink\":null}", + "Content": "{\"value\":[{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/extensions/07lsbw\",\"name\":\"07lsbw\",\"type\":\"Microsoft.KubernetesConfiguration/extensions\",\"properties\":{\"extensionType\":\"azuremonitor-containers\",\"autoUpgradeMinorVersion\":true,\"releaseTrain\":\"Stable\",\"version\":\"2.9.2\",\"scope\":{\"cluster\":{\"releaseNamespace\":\"kube-system\"}},\"provisioningState\":\"Succeeded\",\"configurationSettings\":{},\"configurationProtectedSettings\":{},\"statuses\":[],\"aksAssignedIdentity\":null},\"systemData\":{\"createdBy\":null,\"createdByType\":null,\"createdAt\":\"2022-05-20T11:11:03.2038385+00:00\",\"lastModifiedBy\":null,\"lastModifiedByType\":null,\"lastModifiedAt\":\"2022-05-20T11:11:03.2038385+00:00\"}}],\"nextLink\":null}", "isContentBase64": false } }, - "AzKubernetesExtension+[NoContext]+K8sGet+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupeastus2euap/providers/Microsoft.Kubernetes/ConnectedClusters/9chyz2/providers/Microsoft.KubernetesConfiguration/extensions/xtrsd6?api-version=2021-09-01+1": { + "AzKubernetesExtension+[NoContext]+K8sGet+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/extensions/07lsbw?api-version=2022-03-01+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupeastus2euap/providers/Microsoft.Kubernetes/ConnectedClusters/9chyz2/providers/Microsoft.KubernetesConfiguration/extensions/xtrsd6?api-version=2021-09-01", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/extensions/07lsbw?api-version=2022-03-01", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "42" ], - "x-ms-client-request-id": [ "0f62d25b-0ac0-4817-9129-5c8c0fb0af4a" ], + "x-ms-unique-id": [ "81" ], + "x-ms-client-request-id": [ "428bb9a5-ee1e-484a-80a5-282f003801de" ], "CommandName": [ "Az.KubernetesConfiguration.internal\\Get-AzKubernetesExtension" ], "FullCommandName": [ "Get-AzKubernetesExtension_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.2", "Az.KubernetesConfiguration/0.2.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -956,28 +833,28 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11970" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11941" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "api-supported-versions": [ "2020-07-01-Preview, 2021-05-01-preview, 2021-09-01" ], + "api-supported-versions": [ "2022-03-01" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "22f6532a-1e18-4263-9728-f38709dfc8ca" ], - "x-ms-correlation-request-id": [ "22f6532a-1e18-4263-9728-f38709dfc8ca" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20211028T031234Z:22f6532a-1e18-4263-9728-f38709dfc8ca" ], - "Date": [ "Thu, 28 Oct 2021 03:12:33 GMT" ] + "x-ms-request-id": [ "57707088-ad7a-4c61-b372-c5f05f33122e" ], + "x-ms-correlation-request-id": [ "57707088-ad7a-4c61-b372-c5f05f33122e" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20220520T111217Z:57707088-ad7a-4c61-b372-c5f05f33122e" ], + "Date": [ "Fri, 20 May 2022 11:12:16 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "835" ], + "Content-Length": [ "802" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupeastus2euap/providers/Microsoft.Kubernetes/ConnectedClusters/9chyz2/providers/Microsoft.KubernetesConfiguration/extensions/xtrsd6\",\"name\":\"xtrsd6\",\"type\":\"Microsoft.KubernetesConfiguration/extensions\",\"properties\":{\"extensionType\":\"Microsoft.Arcdataservices\",\"autoUpgradeMinorVersion\":true,\"releaseTrain\":\"Stable\",\"version\":\"1.0.16701001\",\"scope\":{\"cluster\":{\"releaseNamespace\":\"arc\"}},\"provisioningState\":\"Succeeded\",\"installState\":\"Installed\",\"configurationSettings\":{},\"configurationProtectedSettings\":{},\"statuses\":[],\"aksAssignedIdentity\":null},\"systemData\":{\"createdBy\":null,\"createdByType\":null,\"createdAt\":\"2021-10-28T03:10:53.1982314+00:00\",\"lastModifiedBy\":null,\"lastModifiedByType\":null,\"lastModifiedAt\":\"2021-10-28T03:10:53.1982314+00:00\"}}", + "Content": "{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/extensions/07lsbw\",\"name\":\"07lsbw\",\"type\":\"Microsoft.KubernetesConfiguration/extensions\",\"properties\":{\"extensionType\":\"azuremonitor-containers\",\"autoUpgradeMinorVersion\":true,\"releaseTrain\":\"Stable\",\"version\":\"2.9.2\",\"scope\":{\"cluster\":{\"releaseNamespace\":\"kube-system\"}},\"provisioningState\":\"Succeeded\",\"configurationSettings\":{},\"configurationProtectedSettings\":{},\"statuses\":[],\"aksAssignedIdentity\":null},\"systemData\":{\"createdBy\":null,\"createdByType\":null,\"createdAt\":\"2022-05-20T11:11:03.2038385+00:00\",\"lastModifiedBy\":null,\"lastModifiedByType\":null,\"lastModifiedAt\":\"2022-05-20T11:11:03.2038385+00:00\"}}", "isContentBase64": false } }, - "AzKubernetesExtension+[NoContext]+K8sUpdate+$PATCH+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupeastus2euap/providers/Microsoft.Kubernetes/ConnectedClusters/9chyz2/providers/Microsoft.KubernetesConfiguration/extensions/xtrsd6?api-version=2021-09-01+1": { + "AzKubernetesExtension+[NoContext]+K8sUpdate+$PATCH+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/extensions/07lsbw?api-version=2022-03-01+1": { "Request": { "Method": "PATCH", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupeastus2euap/providers/Microsoft.Kubernetes/ConnectedClusters/9chyz2/providers/Microsoft.KubernetesConfiguration/extensions/xtrsd6?api-version=2021-09-01", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/extensions/07lsbw?api-version=2022-03-01", "Content": "{\r\n \"properties\": {\r\n \"configurationProtectedSettings\": {\r\n \"aa\": \"bb\"\r\n }\r\n }\r\n}", "isContentBase64": false, "Headers": { @@ -992,81 +869,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Location": [ "https://eastus2euap.rp.kubernetesconfiguration.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupeastus2euap/providers/Microsoft.Kubernetes/ConnectedClusters/9chyz2/providers/Microsoft.KubernetesConfiguration/extensions/xtrsd6" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1192" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "Azure-AsyncOperation": [ "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupeastus2euap/providers/Microsoft.Kubernetes/ConnectedClusters/9chyz2/providers/Microsoft.KubernetesConfiguration/extensions/xtrsd6/operations/f1c9e0d9-9792-40cf-b14e-605d1d824401?api-Version=2021-09-01" ], - "api-supported-versions": [ "2020-07-01-Preview, 2021-05-01-preview, 2021-09-01" ], - "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "9267e1ff-f66a-461d-97ef-01165b252f9d" ], - "x-ms-correlation-request-id": [ "9267e1ff-f66a-461d-97ef-01165b252f9d" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20211028T031237Z:9267e1ff-f66a-461d-97ef-01165b252f9d" ], - "Date": [ "Thu, 28 Oct 2021 03:12:36 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "839" ], - "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ "-1" ] - }, - "Content": "{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupeastus2euap/providers/Microsoft.Kubernetes/ConnectedClusters/9chyz2/providers/Microsoft.KubernetesConfiguration/extensions/xtrsd6\",\"name\":\"xtrsd6\",\"type\":\"Microsoft.KubernetesConfiguration/extensions\",\"properties\":{\"extensionType\":\"Microsoft.Arcdataservices\",\"autoUpgradeMinorVersion\":true,\"releaseTrain\":\"Stable\",\"version\":\"1.0.16701001\",\"scope\":{\"cluster\":{\"releaseNamespace\":\"arc\"}},\"provisioningState\":\"Updating\",\"installState\":\"Unknown\",\"configurationSettings\":{},\"configurationProtectedSettings\":{\"aa\":\"\"},\"statuses\":[],\"aksAssignedIdentity\":null},\"systemData\":{\"createdBy\":null,\"createdByType\":null,\"createdAt\":\"2021-10-28T03:10:53.1982314+00:00\",\"lastModifiedBy\":null,\"lastModifiedByType\":null,\"lastModifiedAt\":\"2021-10-28T03:12:37.0119548+00:00\"}}", - "isContentBase64": false - } - }, - "AzKubernetesExtension+[NoContext]+K8sUpdate+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupeastus2euap/providers/Microsoft.Kubernetes/ConnectedClusters/9chyz2/providers/Microsoft.KubernetesConfiguration/extensions/xtrsd6/operations/f1c9e0d9-9792-40cf-b14e-605d1d824401?api-Version=2021-09-01+2": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupeastus2euap/providers/Microsoft.Kubernetes/ConnectedClusters/9chyz2/providers/Microsoft.KubernetesConfiguration/extensions/xtrsd6/operations/f1c9e0d9-9792-40cf-b14e-605d1d824401?api-Version=2021-09-01", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "44" ], - "x-ms-client-request-id": [ "ea4bc742-3e36-4610-afd3-a1daf2386ce5" ], - "CommandName": [ "Az.KubernetesConfiguration.internal\\Update-AzKubernetesExtension" ], - "FullCommandName": [ "Update-AzKubernetesExtension_UpdateExpanded" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11969" ], + "Location": [ "https://eastus.rp.kubernetesconfiguration.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/extensions/07lsbw" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1185" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "api-supported-versions": [ "2019-11-01-Preview, 2021-05-01-preview, 2021-06-01-preview, 2021-09-01, 2021-11-01-preview" ], + "Azure-AsyncOperation": [ "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/extensions/07lsbw/operations/6fa88328-74f1-4108-9858-270522e61782?api-Version=2022-03-01" ], + "api-supported-versions": [ "2022-03-01" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "3ddbfa26-25fe-4804-bc93-3dd454b14538" ], - "x-ms-correlation-request-id": [ "3ddbfa26-25fe-4804-bc93-3dd454b14538" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20211028T031308Z:3ddbfa26-25fe-4804-bc93-3dd454b14538" ], - "Date": [ "Thu, 28 Oct 2021 03:13:07 GMT" ] + "x-ms-request-id": [ "8497e686-1e27-41e9-b12d-1665c21ffc45" ], + "x-ms-correlation-request-id": [ "8497e686-1e27-41e9-b12d-1665c21ffc45" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20220520T111219Z:8497e686-1e27-41e9-b12d-1665c21ffc45" ], + "Date": [ "Fri, 20 May 2022 11:12:18 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "328" ], + "Content-Length": [ "808" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupeastus2euap/providers/Microsoft.Kubernetes/ConnectedClusters/9chyz2/providers/Microsoft.KubernetesConfiguration/extensions/xtrsd6/operations/f1c9e0d9-9792-40cf-b14e-605d1d824401\",\"name\":\"f1c9e0d9-9792-40cf-b14e-605d1d824401\",\"status\":\"Updating\"}", + "Content": "{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/extensions/07lsbw\",\"name\":\"07lsbw\",\"type\":\"Microsoft.KubernetesConfiguration/extensions\",\"properties\":{\"extensionType\":\"azuremonitor-containers\",\"autoUpgradeMinorVersion\":true,\"releaseTrain\":\"Stable\",\"version\":\"2.9.2\",\"scope\":{\"cluster\":{\"releaseNamespace\":\"kube-system\"}},\"provisioningState\":\"Updating\",\"configurationSettings\":{},\"configurationProtectedSettings\":{\"aa\":\"\"},\"statuses\":[],\"aksAssignedIdentity\":null},\"systemData\":{\"createdBy\":null,\"createdByType\":null,\"createdAt\":\"2022-05-20T11:11:03.2038385+00:00\",\"lastModifiedBy\":null,\"lastModifiedByType\":null,\"lastModifiedAt\":\"2022-05-20T11:12:19.5646696+00:00\"}}", "isContentBase64": false } }, - "AzKubernetesExtension+[NoContext]+K8sUpdate+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupeastus2euap/providers/Microsoft.Kubernetes/ConnectedClusters/9chyz2/providers/Microsoft.KubernetesConfiguration/extensions/xtrsd6/operations/f1c9e0d9-9792-40cf-b14e-605d1d824401?api-Version=2021-09-01+3": { + "AzKubernetesExtension+[NoContext]+K8sUpdate+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/extensions/07lsbw/operations/6fa88328-74f1-4108-9858-270522e61782?api-Version=2022-03-01+2": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupeastus2euap/providers/Microsoft.Kubernetes/ConnectedClusters/9chyz2/providers/Microsoft.KubernetesConfiguration/extensions/xtrsd6/operations/f1c9e0d9-9792-40cf-b14e-605d1d824401?api-Version=2021-09-01", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/extensions/07lsbw/operations/6fa88328-74f1-4108-9858-270522e61782?api-Version=2022-03-01", "Content": null, "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "45" ], - "x-ms-client-request-id": [ "ea4bc742-3e36-4610-afd3-a1daf2386ce5" ], + "x-ms-unique-id": [ "83" ], + "x-ms-client-request-id": [ "11619ef1-2afb-4da3-8c45-aa1e257ee134" ], "CommandName": [ "Az.KubernetesConfiguration.internal\\Update-AzKubernetesExtension" ], "FullCommandName": [ "Update-AzKubernetesExtension_UpdateExpanded" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0" ] + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.2", "Az.KubernetesConfiguration/0.2.0" ] }, "ContentHeaders": { } @@ -1076,38 +912,38 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11968" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11940" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "api-supported-versions": [ "2019-11-01-Preview, 2021-05-01-preview, 2021-06-01-preview, 2021-09-01, 2021-11-01-preview" ], + "api-supported-versions": [ "2019-11-01-Preview, 2021-05-01-preview, 2021-06-01-preview, 2021-09-01, 2021-11-01-preview, 2022-01-01-preview, 2022-03-01, 2022-04-02-preview" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "a921c155-0d32-4be0-8a7d-c02124c366fa" ], - "x-ms-correlation-request-id": [ "a921c155-0d32-4be0-8a7d-c02124c366fa" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20211028T031340Z:a921c155-0d32-4be0-8a7d-c02124c366fa" ], - "Date": [ "Thu, 28 Oct 2021 03:13:40 GMT" ] + "x-ms-request-id": [ "013b4a90-33b2-4680-ae93-65aafa438e0c" ], + "x-ms-correlation-request-id": [ "013b4a90-33b2-4680-ae93-65aafa438e0c" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20220520T111251Z:013b4a90-33b2-4680-ae93-65aafa438e0c" ], + "Date": [ "Fri, 20 May 2022 11:12:51 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "329" ], + "Content-Length": [ "324" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupeastus2euap/providers/Microsoft.Kubernetes/ConnectedClusters/9chyz2/providers/Microsoft.KubernetesConfiguration/extensions/xtrsd6/operations/f1c9e0d9-9792-40cf-b14e-605d1d824401\",\"name\":\"f1c9e0d9-9792-40cf-b14e-605d1d824401\",\"status\":\"Succeeded\"}", + "Content": "{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/extensions/07lsbw/operations/6fa88328-74f1-4108-9858-270522e61782\",\"name\":\"6fa88328-74f1-4108-9858-270522e61782\",\"status\":\"Succeeded\"}", "isContentBase64": false } }, - "AzKubernetesExtension+[NoContext]+K8sUpdate+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupeastus2euap/providers/Microsoft.Kubernetes/ConnectedClusters/9chyz2/providers/Microsoft.KubernetesConfiguration/extensions/xtrsd6?api-version=2021-09-01+4": { + "AzKubernetesExtension+[NoContext]+K8sUpdate+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/extensions/07lsbw?api-version=2022-03-01+3": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupeastus2euap/providers/Microsoft.Kubernetes/ConnectedClusters/9chyz2/providers/Microsoft.KubernetesConfiguration/extensions/xtrsd6?api-version=2021-09-01", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/extensions/07lsbw?api-version=2022-03-01", "Content": null, "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "46" ], - "x-ms-client-request-id": [ "ea4bc742-3e36-4610-afd3-a1daf2386ce5" ], + "x-ms-unique-id": [ "84" ], + "x-ms-client-request-id": [ "11619ef1-2afb-4da3-8c45-aa1e257ee134" ], "CommandName": [ "Az.KubernetesConfiguration.internal\\Update-AzKubernetesExtension" ], "FullCommandName": [ "Update-AzKubernetesExtension_UpdateExpanded" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0" ] + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.2", "Az.KubernetesConfiguration/0.2.0" ] }, "ContentHeaders": { } @@ -1117,37 +953,37 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11967" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11939" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "api-supported-versions": [ "2020-07-01-Preview, 2021-05-01-preview, 2021-09-01" ], + "api-supported-versions": [ "2022-03-01" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "7faa1f6f-93d1-4baa-9122-2dac60c0f014" ], - "x-ms-correlation-request-id": [ "7faa1f6f-93d1-4baa-9122-2dac60c0f014" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20211028T031341Z:7faa1f6f-93d1-4baa-9122-2dac60c0f014" ], - "Date": [ "Thu, 28 Oct 2021 03:13:41 GMT" ] + "x-ms-request-id": [ "154d784c-ecda-47fa-a8b0-1f2b49d2af02" ], + "x-ms-correlation-request-id": [ "154d784c-ecda-47fa-a8b0-1f2b49d2af02" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20220520T111253Z:154d784c-ecda-47fa-a8b0-1f2b49d2af02" ], + "Date": [ "Fri, 20 May 2022 11:12:53 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "842" ], + "Content-Length": [ "809" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupeastus2euap/providers/Microsoft.Kubernetes/ConnectedClusters/9chyz2/providers/Microsoft.KubernetesConfiguration/extensions/xtrsd6\",\"name\":\"xtrsd6\",\"type\":\"Microsoft.KubernetesConfiguration/extensions\",\"properties\":{\"extensionType\":\"Microsoft.Arcdataservices\",\"autoUpgradeMinorVersion\":true,\"releaseTrain\":\"Stable\",\"version\":\"1.0.16701001\",\"scope\":{\"cluster\":{\"releaseNamespace\":\"arc\"}},\"provisioningState\":\"Succeeded\",\"installState\":\"Installed\",\"configurationSettings\":{},\"configurationProtectedSettings\":{\"aa\":\"\"},\"statuses\":[],\"aksAssignedIdentity\":null},\"systemData\":{\"createdBy\":null,\"createdByType\":null,\"createdAt\":\"2021-10-28T03:10:53.1982314+00:00\",\"lastModifiedBy\":null,\"lastModifiedByType\":null,\"lastModifiedAt\":\"2021-10-28T03:12:37.0119548+00:00\"}}", + "Content": "{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/extensions/07lsbw\",\"name\":\"07lsbw\",\"type\":\"Microsoft.KubernetesConfiguration/extensions\",\"properties\":{\"extensionType\":\"azuremonitor-containers\",\"autoUpgradeMinorVersion\":true,\"releaseTrain\":\"Stable\",\"version\":\"2.9.2\",\"scope\":{\"cluster\":{\"releaseNamespace\":\"kube-system\"}},\"provisioningState\":\"Succeeded\",\"configurationSettings\":{},\"configurationProtectedSettings\":{\"aa\":\"\"},\"statuses\":[],\"aksAssignedIdentity\":null},\"systemData\":{\"createdBy\":null,\"createdByType\":null,\"createdAt\":\"2022-05-20T11:11:03.2038385+00:00\",\"lastModifiedBy\":null,\"lastModifiedByType\":null,\"lastModifiedAt\":\"2022-05-20T11:12:19.5646696+00:00\"}}", "isContentBase64": false } }, - "AzKubernetesExtension+[NoContext]+K8sDelete+$DELETE+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupeastus2euap/providers/Microsoft.Kubernetes/ConnectedClusters/9chyz2/providers/Microsoft.KubernetesConfiguration/extensions/xtrsd6?api-version=2021-09-01+1": { + "AzKubernetesExtension+[NoContext]+K8sDelete+$DELETE+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/extensions/07lsbw?api-version=2022-03-01+1": { "Request": { "Method": "DELETE", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupeastus2euap/providers/Microsoft.Kubernetes/ConnectedClusters/9chyz2/providers/Microsoft.KubernetesConfiguration/extensions/xtrsd6?api-version=2021-09-01", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/extensions/07lsbw?api-version=2022-03-01", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "47" ], - "x-ms-client-request-id": [ "cbfd22d5-91c9-44e6-a16a-166667e283f8" ], + "x-ms-unique-id": [ "85" ], + "x-ms-client-request-id": [ "15a63e40-6895-4f08-b243-04877b30fffc" ], "CommandName": [ "Az.KubernetesConfiguration.internal\\Remove-AzKubernetesExtension" ], "FullCommandName": [ "Remove-AzKubernetesExtension_Delete" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.2", "Az.KubernetesConfiguration/0.2.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -1158,15 +994,15 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-deletes": [ "14994" ], + "x-ms-ratelimit-remaining-subscription-deletes": [ "14991" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "Azure-AsyncOperation": [ "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupeastus2euap/providers/Microsoft.Kubernetes/ConnectedClusters/9chyz2/providers/Microsoft.KubernetesConfiguration/extensions/xtrsd6/operations/9a8eccfa-444d-47bf-ba84-98b7d08e03b1?api-Version=2021-09-01" ], - "api-supported-versions": [ "2020-07-01-Preview, 2021-05-01-preview, 2021-09-01" ], + "Azure-AsyncOperation": [ "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/extensions/07lsbw/operations/0cf7e8b2-bd47-4e2d-9405-8bbcb212eb0a?api-Version=2022-03-01" ], + "api-supported-versions": [ "2022-03-01" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "95c71325-e0cf-4f26-a24b-62f0d8452c71" ], - "x-ms-correlation-request-id": [ "95c71325-e0cf-4f26-a24b-62f0d8452c71" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20211028T031344Z:95c71325-e0cf-4f26-a24b-62f0d8452c71" ], - "Date": [ "Thu, 28 Oct 2021 03:13:43 GMT" ] + "x-ms-request-id": [ "6b10b52e-612f-4948-bb7d-41c7f2d03bda" ], + "x-ms-correlation-request-id": [ "6b10b52e-612f-4948-bb7d-41c7f2d03bda" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20220520T111257Z:6b10b52e-612f-4948-bb7d-41c7f2d03bda" ], + "Date": [ "Fri, 20 May 2022 11:12:57 GMT" ] }, "ContentHeaders": { "Expires": [ "-1" ], @@ -1176,20 +1012,20 @@ "isContentBase64": false } }, - "AzKubernetesExtension+[NoContext]+K8sDelete+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupeastus2euap/providers/Microsoft.Kubernetes/ConnectedClusters/9chyz2/providers/Microsoft.KubernetesConfiguration/extensions/xtrsd6/operations/9a8eccfa-444d-47bf-ba84-98b7d08e03b1?api-Version=2021-09-01+2": { + "AzKubernetesExtension+[NoContext]+K8sDelete+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/extensions/07lsbw/operations/0cf7e8b2-bd47-4e2d-9405-8bbcb212eb0a?api-Version=2022-03-01+2": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupeastus2euap/providers/Microsoft.Kubernetes/ConnectedClusters/9chyz2/providers/Microsoft.KubernetesConfiguration/extensions/xtrsd6/operations/9a8eccfa-444d-47bf-ba84-98b7d08e03b1?api-Version=2021-09-01", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/extensions/07lsbw/operations/0cf7e8b2-bd47-4e2d-9405-8bbcb212eb0a?api-Version=2022-03-01", "Content": null, "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "48" ], - "x-ms-client-request-id": [ "cbfd22d5-91c9-44e6-a16a-166667e283f8" ], + "x-ms-unique-id": [ "86" ], + "x-ms-client-request-id": [ "15a63e40-6895-4f08-b243-04877b30fffc" ], "CommandName": [ "Az.KubernetesConfiguration.internal\\Remove-AzKubernetesExtension" ], "FullCommandName": [ "Remove-AzKubernetesExtension_Delete" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0" ] + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.2", "Az.KubernetesConfiguration/0.2.0" ] }, "ContentHeaders": { } @@ -1199,38 +1035,38 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11966" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11938" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "api-supported-versions": [ "2019-11-01-Preview, 2021-05-01-preview, 2021-06-01-preview, 2021-09-01, 2021-11-01-preview" ], + "api-supported-versions": [ "2019-11-01-Preview, 2021-05-01-preview, 2021-06-01-preview, 2021-09-01, 2021-11-01-preview, 2022-01-01-preview, 2022-03-01, 2022-04-02-preview" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "15959f26-8e72-49e9-9418-c97d2ab26165" ], - "x-ms-correlation-request-id": [ "15959f26-8e72-49e9-9418-c97d2ab26165" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20211028T031415Z:15959f26-8e72-49e9-9418-c97d2ab26165" ], - "Date": [ "Thu, 28 Oct 2021 03:14:15 GMT" ] + "x-ms-request-id": [ "7981451c-659d-41a1-82c6-ff567ab5b8a3" ], + "x-ms-correlation-request-id": [ "7981451c-659d-41a1-82c6-ff567ab5b8a3" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20220520T111329Z:7981451c-659d-41a1-82c6-ff567ab5b8a3" ], + "Date": [ "Fri, 20 May 2022 11:13:28 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "328" ], + "Content-Length": [ "323" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupeastus2euap/providers/Microsoft.Kubernetes/ConnectedClusters/9chyz2/providers/Microsoft.KubernetesConfiguration/extensions/xtrsd6/operations/9a8eccfa-444d-47bf-ba84-98b7d08e03b1\",\"name\":\"9a8eccfa-444d-47bf-ba84-98b7d08e03b1\",\"status\":\"Deleting\"}", + "Content": "{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/extensions/07lsbw/operations/0cf7e8b2-bd47-4e2d-9405-8bbcb212eb0a\",\"name\":\"0cf7e8b2-bd47-4e2d-9405-8bbcb212eb0a\",\"status\":\"Deleting\"}", "isContentBase64": false } }, - "AzKubernetesExtension+[NoContext]+K8sDelete+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupeastus2euap/providers/Microsoft.Kubernetes/ConnectedClusters/9chyz2/providers/Microsoft.KubernetesConfiguration/extensions/xtrsd6/operations/9a8eccfa-444d-47bf-ba84-98b7d08e03b1?api-Version=2021-09-01+3": { + "AzKubernetesExtension+[NoContext]+K8sDelete+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/extensions/07lsbw/operations/0cf7e8b2-bd47-4e2d-9405-8bbcb212eb0a?api-Version=2022-03-01+3": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupeastus2euap/providers/Microsoft.Kubernetes/ConnectedClusters/9chyz2/providers/Microsoft.KubernetesConfiguration/extensions/xtrsd6/operations/9a8eccfa-444d-47bf-ba84-98b7d08e03b1?api-Version=2021-09-01", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/extensions/07lsbw/operations/0cf7e8b2-bd47-4e2d-9405-8bbcb212eb0a?api-Version=2022-03-01", "Content": null, "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "49" ], - "x-ms-client-request-id": [ "cbfd22d5-91c9-44e6-a16a-166667e283f8" ], + "x-ms-unique-id": [ "87" ], + "x-ms-client-request-id": [ "15a63e40-6895-4f08-b243-04877b30fffc" ], "CommandName": [ "Az.KubernetesConfiguration.internal\\Remove-AzKubernetesExtension" ], "FullCommandName": [ "Remove-AzKubernetesExtension_Delete" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0" ] + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.2", "Az.KubernetesConfiguration/0.2.0" ] }, "ContentHeaders": { } @@ -1240,38 +1076,38 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11965" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11937" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "api-supported-versions": [ "2019-11-01-Preview, 2021-05-01-preview, 2021-06-01-preview, 2021-09-01, 2021-11-01-preview" ], + "api-supported-versions": [ "2019-11-01-Preview, 2021-05-01-preview, 2021-06-01-preview, 2021-09-01, 2021-11-01-preview, 2022-01-01-preview, 2022-03-01, 2022-04-02-preview" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "49857432-4f32-4d2f-ad08-0ed51fea9e5c" ], - "x-ms-correlation-request-id": [ "49857432-4f32-4d2f-ad08-0ed51fea9e5c" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20211028T031447Z:49857432-4f32-4d2f-ad08-0ed51fea9e5c" ], - "Date": [ "Thu, 28 Oct 2021 03:14:47 GMT" ] + "x-ms-request-id": [ "30898e3c-0623-44e1-af44-209d6eefda49" ], + "x-ms-correlation-request-id": [ "30898e3c-0623-44e1-af44-209d6eefda49" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20220520T111404Z:30898e3c-0623-44e1-af44-209d6eefda49" ], + "Date": [ "Fri, 20 May 2022 11:14:04 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "329" ], + "Content-Length": [ "324" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupeastus2euap/providers/Microsoft.Kubernetes/ConnectedClusters/9chyz2/providers/Microsoft.KubernetesConfiguration/extensions/xtrsd6/operations/9a8eccfa-444d-47bf-ba84-98b7d08e03b1\",\"name\":\"9a8eccfa-444d-47bf-ba84-98b7d08e03b1\",\"status\":\"Succeeded\"}", + "Content": "{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/extensions/07lsbw/operations/0cf7e8b2-bd47-4e2d-9405-8bbcb212eb0a\",\"name\":\"0cf7e8b2-bd47-4e2d-9405-8bbcb212eb0a\",\"status\":\"Succeeded\"}", "isContentBase64": false } }, - "AzKubernetesExtension+[NoContext]+K8sDelete+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupeastus2euap/providers/Microsoft.Kubernetes/ConnectedClusters/9chyz2/providers/Microsoft.KubernetesConfiguration/extensions/xtrsd6/operations/9a8eccfa-444d-47bf-ba84-98b7d08e03b1?api-Version=2021-09-01+4": { + "AzKubernetesExtension+[NoContext]+K8sDelete+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/extensions/07lsbw/operations/0cf7e8b2-bd47-4e2d-9405-8bbcb212eb0a?api-Version=2022-03-01+4": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupeastus2euap/providers/Microsoft.Kubernetes/ConnectedClusters/9chyz2/providers/Microsoft.KubernetesConfiguration/extensions/xtrsd6/operations/9a8eccfa-444d-47bf-ba84-98b7d08e03b1?api-Version=2021-09-01", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/extensions/07lsbw/operations/0cf7e8b2-bd47-4e2d-9405-8bbcb212eb0a?api-Version=2022-03-01", "Content": null, "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "50" ], - "x-ms-client-request-id": [ "cbfd22d5-91c9-44e6-a16a-166667e283f8" ], + "x-ms-unique-id": [ "88" ], + "x-ms-client-request-id": [ "15a63e40-6895-4f08-b243-04877b30fffc" ], "CommandName": [ "Az.KubernetesConfiguration.internal\\Remove-AzKubernetesExtension" ], "FullCommandName": [ "Remove-AzKubernetesExtension_Delete" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0" ] + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.1.2", "Az.KubernetesConfiguration/0.2.0" ] }, "ContentHeaders": { } @@ -1281,21 +1117,21 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11964" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11936" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "api-supported-versions": [ "2019-11-01-Preview, 2021-05-01-preview, 2021-06-01-preview, 2021-09-01, 2021-11-01-preview" ], + "api-supported-versions": [ "2019-11-01-Preview, 2021-05-01-preview, 2021-06-01-preview, 2021-09-01, 2021-11-01-preview, 2022-01-01-preview, 2022-03-01, 2022-04-02-preview" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "8e966231-3048-418b-a1b6-ee4b39586928" ], - "x-ms-correlation-request-id": [ "8e966231-3048-418b-a1b6-ee4b39586928" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20211028T031448Z:8e966231-3048-418b-a1b6-ee4b39586928" ], - "Date": [ "Thu, 28 Oct 2021 03:14:48 GMT" ] + "x-ms-request-id": [ "58b74269-ae33-4773-ab91-bb72b0ff62b6" ], + "x-ms-correlation-request-id": [ "58b74269-ae33-4773-ab91-bb72b0ff62b6" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20220520T111406Z:58b74269-ae33-4773-ab91-bb72b0ff62b6" ], + "Date": [ "Fri, 20 May 2022 11:14:05 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "329" ], + "Content-Length": [ "324" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroupeastus2euap/providers/Microsoft.Kubernetes/ConnectedClusters/9chyz2/providers/Microsoft.KubernetesConfiguration/extensions/xtrsd6/operations/9a8eccfa-444d-47bf-ba84-98b7d08e03b1\",\"name\":\"9a8eccfa-444d-47bf-ba84-98b7d08e03b1\",\"status\":\"Succeeded\"}", + "Content": "{\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup78kp9q/providers/Microsoft.Kubernetes/ConnectedClusters/ukyplv/providers/Microsoft.KubernetesConfiguration/extensions/07lsbw/operations/0cf7e8b2-bd47-4e2d-9405-8bbcb212eb0a\",\"name\":\"0cf7e8b2-bd47-4e2d-9405-8bbcb212eb0a\",\"status\":\"Succeeded\"}", "isContentBase64": false } } diff --git a/src/KubernetesConfiguration/test/AzKubernetesExtension.Tests.ps1 b/src/KubernetesConfiguration/test/AzKubernetesExtension.Tests.ps1 index 963077fa11a9..136982c45360 100644 --- a/src/KubernetesConfiguration/test/AzKubernetesExtension.Tests.ps1 +++ b/src/KubernetesConfiguration/test/AzKubernetesExtension.Tests.ps1 @@ -14,69 +14,69 @@ while (-not $mockingPath) { Describe 'AzKubernetesExtension' { It 'CreateExpanded' { { - $config = New-AzKubernetesExtension -ClusterName $env.clusterNameEUAP -ClusterType ConnectedClusters -Name $env.extensionNameEUAP1 -ResourceGroupName $env.resourceGroupEUAP -ExtensionType Microsoft.Arcdataservices - $config.Name | Should -Be $env.extensionNameEUAP1 + $config = New-AzKubernetesExtension -ClusterName $env.clusterName -ClusterType ConnectedClusters -Name $env.extensionName -ResourceGroupName $env.resourceGroup -ExtensionType azuremonitor-containers + $config.Name | Should -Be $env.extensionName } | Should -Not -Throw } It 'List' { { - $config = Get-AzKubernetesExtension -ClusterName $env.clusterNameEUAP -ClusterType ConnectedClusters -ResourceGroupName $env.resourceGroupEUAP - $config.Count | Should -Be 1 + $config = Get-AzKubernetesExtension -ClusterName $env.clusterName -ClusterType ConnectedClusters -ResourceGroupName $env.resourceGroup + $config.Count | Should -BeGreaterThan 0 } | Should -Not -Throw } It 'Get' { { - $config = Get-AzKubernetesExtension -Name $env.extensionNameEUAP1 -ClusterName $env.clusterNameEUAP -ClusterType ConnectedClusters -ResourceGroupName $env.resourceGroupEUAP - $config.Name | Should -Be $env.extensionNameEUAP1 + $config = Get-AzKubernetesExtension -Name $env.extensionName -ClusterName $env.clusterName -ClusterType ConnectedClusters -ResourceGroupName $env.resourceGroup + $config.Name | Should -Be $env.extensionName } | Should -Not -Throw } It 'Update' { { - $config = Update-AzKubernetesExtension -Name $env.extensionNameEUAP1 -ClusterName $env.clusterNameEUAP -ClusterType ConnectedClusters -ResourceGroupName $env.resourceGroupEUAP -ConfigurationProtectedSetting @{"aa"="bb"} - $config.Name | Should -Be $env.extensionNameEUAP1 + $config = Update-AzKubernetesExtension -Name $env.extensionName -ClusterName $env.clusterName -ClusterType ConnectedClusters -ResourceGroupName $env.resourceGroup -ConfigurationProtectedSetting @{"aa"="bb"} + $config.Name | Should -Be $env.extensionName } | Should -Not -Throw } It 'Delete' { { - Remove-AzKubernetesExtension -Name $env.extensionNameEUAP1 -ClusterName $env.clusterNameEUAP -ClusterType ConnectedClusters -ResourceGroupName $env.resourceGroupEUAP + Remove-AzKubernetesExtension -Name $env.extensionName -ClusterName $env.clusterName -ClusterType ConnectedClusters -ResourceGroupName $env.resourceGroup } | Should -Not -Throw } It 'K8sCreateExpanded' { { - $config = New-AzK8sExtension -ClusterName $env.clusterNameEUAP -ClusterType ConnectedClusters -Name $env.extensionNameEUAP1 -ResourceGroupName $env.resourceGroupEUAP -ExtensionType Microsoft.Arcdataservices - $config.Name | Should -Be $env.extensionNameEUAP1 + $config = New-AzK8sExtension -ClusterName $env.clusterName -ClusterType ConnectedClusters -Name $env.extensionName -ResourceGroupName $env.resourceGroup -ExtensionType azuremonitor-containers + $config.Name | Should -Be $env.extensionName } | Should -Not -Throw } It 'K8sList' { { - $config = Get-AzK8sExtension -ClusterName $env.clusterNameEUAP -ClusterType ConnectedClusters -ResourceGroupName $env.resourceGroupEUAP - $config.Count | Should -Be 1 + $config = Get-AzK8sExtension -ClusterName $env.clusterName -ClusterType ConnectedClusters -ResourceGroupName $env.resourceGroup + $config.Count | Should -BeGreaterThan 0 } | Should -Not -Throw } It 'K8sGet' { { - $config = Get-AzK8sExtension -Name $env.extensionNameEUAP1 -ClusterName $env.clusterNameEUAP -ClusterType ConnectedClusters -ResourceGroupName $env.resourceGroupEUAP - $config.Name | Should -Be $env.extensionNameEUAP1 + $config = Get-AzK8sExtension -Name $env.extensionName -ClusterName $env.clusterName -ClusterType ConnectedClusters -ResourceGroupName $env.resourceGroup + $config.Name | Should -Be $env.extensionName } | Should -Not -Throw } It 'K8sUpdate' { { - $config = Update-AzK8sExtension -Name $env.extensionNameEUAP1 -ClusterName $env.clusterNameEUAP -ClusterType ConnectedClusters -ResourceGroupName $env.resourceGroupEUAP -ConfigurationProtectedSetting @{"aa"="bb"} - $config.Name | Should -Be $env.extensionNameEUAP1 + $config = Update-AzK8sExtension -Name $env.extensionName -ClusterName $env.clusterName -ClusterType ConnectedClusters -ResourceGroupName $env.resourceGroup -ConfigurationProtectedSetting @{"aa"="bb"} + $config.Name | Should -Be $env.extensionName } | Should -Not -Throw } It 'K8sDelete' { { - Remove-AzK8sExtension -Name $env.extensionNameEUAP1 -ClusterName $env.clusterNameEUAP -ClusterType ConnectedClusters -ResourceGroupName $env.resourceGroupEUAP + Remove-AzK8sExtension -Name $env.extensionName -ClusterName $env.clusterName -ClusterType ConnectedClusters -ResourceGroupName $env.resourceGroup } | Should -Not -Throw } } diff --git a/src/KubernetesConfiguration/test/Get-AzKubernetesConfigFluxOperationStatus.Tests.ps1 b/src/KubernetesConfiguration/test/Get-AzKubernetesConfigFluxOperationStatus.Tests.ps1 new file mode 100644 index 000000000000..53563ce1557a --- /dev/null +++ b/src/KubernetesConfiguration/test/Get-AzKubernetesConfigFluxOperationStatus.Tests.ps1 @@ -0,0 +1,25 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzKubernetesConfigFluxOperationStatus')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzKubernetesConfigFluxOperationStatus.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzKubernetesConfigFluxOperationStatus' { + It 'Get' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'GetViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/KubernetesConfiguration/test/Get-AzKubernetesConfigurationFlux.Tests.ps1 b/src/KubernetesConfiguration/test/Get-AzKubernetesConfigurationFlux.Tests.ps1 new file mode 100644 index 000000000000..f03ae240dcfd --- /dev/null +++ b/src/KubernetesConfiguration/test/Get-AzKubernetesConfigurationFlux.Tests.ps1 @@ -0,0 +1,29 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzKubernetesConfigurationFlux')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzKubernetesConfigurationFlux.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzKubernetesConfigurationFlux' { + It 'List' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'Get' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'GetViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/KubernetesConfiguration/test/New-AzKubernetesConfigurationFlux.Tests.ps1 b/src/KubernetesConfiguration/test/New-AzKubernetesConfigurationFlux.Tests.ps1 new file mode 100644 index 000000000000..d32af3545955 --- /dev/null +++ b/src/KubernetesConfiguration/test/New-AzKubernetesConfigurationFlux.Tests.ps1 @@ -0,0 +1,21 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzKubernetesConfigurationFlux')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzKubernetesConfigurationFlux.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'New-AzKubernetesConfigurationFlux' { + It 'CreateExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/KubernetesConfiguration/test/Remove-AzKubernetesConfigurationFlux.Tests.ps1 b/src/KubernetesConfiguration/test/Remove-AzKubernetesConfigurationFlux.Tests.ps1 new file mode 100644 index 000000000000..d9131a30934b --- /dev/null +++ b/src/KubernetesConfiguration/test/Remove-AzKubernetesConfigurationFlux.Tests.ps1 @@ -0,0 +1,25 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Remove-AzKubernetesConfigurationFlux')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Remove-AzKubernetesConfigurationFlux.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Remove-AzKubernetesConfigurationFlux' { + It 'Delete' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'DeleteViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/KubernetesConfiguration/test/Update-AzKubernetesConfigurationFlux.Tests.ps1 b/src/KubernetesConfiguration/test/Update-AzKubernetesConfigurationFlux.Tests.ps1 new file mode 100644 index 000000000000..70669eaa763c --- /dev/null +++ b/src/KubernetesConfiguration/test/Update-AzKubernetesConfigurationFlux.Tests.ps1 @@ -0,0 +1,25 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Update-AzKubernetesConfigurationFlux')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Update-AzKubernetesConfigurationFlux.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Update-AzKubernetesConfigurationFlux' { + It 'UpdateExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'UpdateViaIdentityExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/KubernetesConfiguration/test/env.json b/src/KubernetesConfiguration/test/env.json index 68e8860ecb0e..736d8af46f74 100644 --- a/src/KubernetesConfiguration/test/env.json +++ b/src/KubernetesConfiguration/test/env.json @@ -1,15 +1,13 @@ { - "resourceGroupEUAP": "testgroupeastus2euap", - "clusterNameEUAP": "9chyz2", - "locationCUS": "centralus", + "flux1": "ol17ds", + "flux2": "a68b7j", + "k8sName1": "78kp9q", "Tenant": "72f988bf-86f1-41af-91ab-2d7cd011db47", - "k8sNameEUAP": "yt3w0k", + "kubernetesConfigurationName1": "u4c2b9", "SubscriptionId": "9e223dbe-3399-4e19-88eb-0975f02ac87f", - "locationEUAP": "eastus2euap", - "extensionNameEUAP1": "xtrsd6", - "kubernetesConfigurationNameCUS1": "ucpk94", - "kubernetesConfigurationNameCUS2": "2htdrc", - "k8sNameCUS": "rs9qam", - "clusterNameCUS": "6bsnda", - "resourceGroupCUS": "testgroupcentralus" + "resourceGroup": "testgroup78kp9q", + "location": "eastus", + "clusterName": "ukyplv", + "kubernetesConfigurationName2": "ha3sxe", + "extensionName": "07lsbw" } diff --git a/src/KubernetesConfiguration/test/utils.ps1 b/src/KubernetesConfiguration/test/utils.ps1 index da7429ee893c..a886909357d9 100644 --- a/src/KubernetesConfiguration/test/utils.ps1 +++ b/src/KubernetesConfiguration/test/utils.ps1 @@ -19,54 +19,46 @@ function setupEnv() { $env.SubscriptionId = (Get-AzContext).Subscription.Id $env.Tenant = (Get-AzContext).Tenant.Id - $k8sNameEUAP = RandomString -allChars $false -len 6 - $k8sNameCUS = RandomString -allChars $false -len 6 + $k8sName1 = RandomString -allChars $false -len 6 - $clusterNameEUAP = RandomString -allChars $false -len 6 - $clusterNameCUS = RandomString -allChars $false -len 6 + $flux1 = RandomString -allChars $false -len 6 + $flux2 = RandomString -allChars $false -len 6 - $extensionNameEUAP1 = RandomString -allChars $false -len 6 + $clusterName = RandomString -allChars $false -len 6 - $kubernetesConfigurationNameCUS1 = RandomString -allChars $false -len 6 - $kubernetesConfigurationNameCUS2 = RandomString -allChars $false -len 6 + $extensionName = RandomString -allChars $false -len 6 - $env.Add("k8sNameEUAP", $k8sNameEUAP) - $env.Add("k8sNameCUS", $k8sNameCUS) + $kubernetesConfigurationName1 = RandomString -allChars $false -len 6 + $kubernetesConfigurationName2 = RandomString -allChars $false -len 6 - $env.Add("clusterNameEUAP", $clusterNameEUAP) - $env.Add("clusterNameCUS", $clusterNameCUS) + $env.Add("k8sName1", $k8sName1) - $env.Add("extensionNameEUAP1", $extensionNameEUAP1) + $env.Add("flux1", $flux1) + $env.Add("flux2", $flux2) - $env.Add("kubernetesConfigurationNameCUS1", $kubernetesConfigurationNameCUS1) - $env.Add("kubernetesConfigurationNameCUS2", $kubernetesConfigurationNameCUS2) + $env.Add("clusterName", $clusterName) - $env.Add("locationEUAP", "eastus2euap") - $env.Add("locationCUS", "centralus") + $env.Add("extensionName", $extensionName) - $resourceGroupEUAP = "testgroup" + $env.locationEUAP - $resourceGroupCUS = "testgroup" + $env.locationCUS + $env.Add("kubernetesConfigurationName1", $kubernetesConfigurationName1) + $env.Add("kubernetesConfigurationName2", $kubernetesConfigurationName2) - $env.Add("resourceGroupEUAP", $resourceGroupEUAP) - $env.Add("resourceGroupCUS", $resourceGroupCUS) + $env.Add("location", "eastus") + + $resourceGroup = "testgroup" + $env.k8sName1 + $env.Add("resourceGroup", $resourceGroup) write-host "1. start to create test group..." - New-AzResourceGroup -Name $env.resourceGroupEUAP -Location "eastus" + New-AzResourceGroup -Name $env.resourceGroup -Location $env.location + write-host "1. az aks create..." - az aks create --name $env.k8sNameEUAP --resource-group $env.resourceGroupEUAP --kubernetes-version 1.20.9 --vm-set-type AvailabilitySet + az aks create --name $env.k8sName1 --resource-group $env.resourceGroup --kubernetes-version 1.22.6 --vm-set-type AvailabilitySet + write-host "1. az aks get-credentials..." - az aks get-credentials --resource-group $env.resourceGroupEUAP --name $env.k8sNameEUAP - write-host "1. az connectedk8s connect..." - az connectedk8s connect --name $env.clusterNameEUAP --resource-group $env.resourceGroupEUAP --location $env.locationEUAP + az aks get-credentials --name $env.k8sName1 --resource-group $env.resourceGroup - write-host "2. start to create test group..." - New-AzResourceGroup -Name $env.resourceGroupCUS -Location "eastus" - write-host "2. az aks create..." - az aks create --name $env.k8sNameCUS --resource-group $env.resourceGroupCUS --kubernetes-version 1.20.9 --vm-set-type AvailabilitySet - write-host "2. az aks get-credentials..." - az aks get-credentials --resource-group $env.resourceGroupCUS --name $env.k8sNameCUS - write-host "2. az connectedk8s connect..." - az connectedk8s connect --name $env.clusterNameCUS --resource-group $env.resourceGroupCUS --location $env.locationCUS + write-host "1. az connectedk8s connect..." + az connectedk8s connect --name $env.clusterName --resource-group $env.resourceGroup --location $env.location # For any resources you created for test, you should add it to $env here. $envFile = 'env.json' @@ -76,6 +68,5 @@ function setupEnv() { set-content -Path (Join-Path $PSScriptRoot $envFile) -Value (ConvertTo-Json $env) } function cleanupEnv() { - Remove-AzResourceGroup -Name $env.resourceGroupEUAP - Remove-AzResourceGroup -Name $env.resourceGroupCUS + Remove-AzResourceGroup -Name $env.resourceGroup } \ No newline at end of file From 63e485124dd7ce0006a8df9072ff20d07bdfa6c8 Mon Sep 17 00:00:00 2001 From: lijinpei2008 Date: Tue, 24 May 2022 15:41:57 +0800 Subject: [PATCH 2/5] update changelog.md --- src/KubernetesConfiguration/ChangeLog.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/KubernetesConfiguration/ChangeLog.md b/src/KubernetesConfiguration/ChangeLog.md index 3a2051406a92..4c1fad1836d2 100644 --- a/src/KubernetesConfiguration/ChangeLog.md +++ b/src/KubernetesConfiguration/ChangeLog.md @@ -18,6 +18,9 @@ - Additional information about change #1 --> ## Upcoming Release + * Create Some cmdlets: + * {Get}-AzKubernetesConfigFluxOperationStatus/AzK8sConfigFluxOperationStatus + * {Get/New/Update/Remove}-AzKubernetesConfigurationFlux/AzK8sConfigurationFlux ## Version 0.5.0 * Onboarded cmdlets `New/Update/Get/Remove-AzKubernetesExtension` and `New/Get/Remove-AzKubernetesConfiguration` From 53a25d0a4e594b42d119688cb19654b47decb68a Mon Sep 17 00:00:00 2001 From: lijinpei2008 Date: Tue, 24 May 2022 15:48:40 +0800 Subject: [PATCH 3/5] update module version to 0.6.0 --- src/KubernetesConfiguration/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/KubernetesConfiguration/README.md b/src/KubernetesConfiguration/README.md index 7420adc435e6..08dc27260bbd 100644 --- a/src/KubernetesConfiguration/README.md +++ b/src/KubernetesConfiguration/README.md @@ -57,7 +57,7 @@ input-file: - $(repo)/specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/stable/2022-03-01/kubernetesconfiguration.json title: KubernetesConfiguration -module-version: 0.2.0 +module-version: 0.6.0 subject-prefix: '' identity-correction-for-post: true From bf778a05fd9d7796826396923d81e6329dfa88a5 Mon Sep 17 00:00:00 2001 From: lijinpei2008 Date: Wed, 25 May 2022 09:59:11 +0800 Subject: [PATCH 4/5] update --- .../Az.KubernetesConfiguration.psd1 | 2 +- src/KubernetesConfiguration/ChangeLog.md | 9 ++++++--- src/KubernetesConfiguration/README.md | 2 +- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/KubernetesConfiguration/Az.KubernetesConfiguration.psd1 b/src/KubernetesConfiguration/Az.KubernetesConfiguration.psd1 index 85b5c22e451f..53d511ce2bc6 100644 --- a/src/KubernetesConfiguration/Az.KubernetesConfiguration.psd1 +++ b/src/KubernetesConfiguration/Az.KubernetesConfiguration.psd1 @@ -121,7 +121,7 @@ PrivateData = @{ # IconUri = '' # ReleaseNotes of this module - # ReleaseNotes = '' + ReleaseNotes = ' * Added cmdlets: * ''Get-AzKubernetesConfigFluxOperationStatus'' * ''Get-AzKubernetesConfigurationFlux'' * ''New-AzKubernetesConfigurationFlux'' * ''Update-AzKubernetesConfigurationFlux'' * ''Remove-AzKubernetesConfigurationFlux''' # Prerelease string of this module # Prerelease = '' diff --git a/src/KubernetesConfiguration/ChangeLog.md b/src/KubernetesConfiguration/ChangeLog.md index 4c1fad1836d2..2c6ebf9f0157 100644 --- a/src/KubernetesConfiguration/ChangeLog.md +++ b/src/KubernetesConfiguration/ChangeLog.md @@ -18,9 +18,12 @@ - Additional information about change #1 --> ## Upcoming Release - * Create Some cmdlets: - * {Get}-AzKubernetesConfigFluxOperationStatus/AzK8sConfigFluxOperationStatus - * {Get/New/Update/Remove}-AzKubernetesConfigurationFlux/AzK8sConfigurationFlux + * Added cmdlets: + * `Get-AzKubernetesConfigFluxOperationStatus` + * `Get-AzKubernetesConfigurationFlux` + * `New-AzKubernetesConfigurationFlux` + * `Update-AzKubernetesConfigurationFlux` + * `Remove-AzKubernetesConfigurationFlux` ## Version 0.5.0 * Onboarded cmdlets `New/Update/Get/Remove-AzKubernetesExtension` and `New/Get/Remove-AzKubernetesConfiguration` diff --git a/src/KubernetesConfiguration/README.md b/src/KubernetesConfiguration/README.md index 08dc27260bbd..a0d89f3bbe18 100644 --- a/src/KubernetesConfiguration/README.md +++ b/src/KubernetesConfiguration/README.md @@ -57,7 +57,7 @@ input-file: - $(repo)/specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/stable/2022-03-01/kubernetesconfiguration.json title: KubernetesConfiguration -module-version: 0.6.0 +module-version: 0.1.0 subject-prefix: '' identity-correction-for-post: true From 27beaae65febd283530b3ab5eada437ab0a9f429 Mon Sep 17 00:00:00 2001 From: lijinpei2008 Date: Wed, 25 May 2022 10:05:02 +0800 Subject: [PATCH 5/5] update --- src/KubernetesConfiguration/Az.KubernetesConfiguration.psd1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/KubernetesConfiguration/Az.KubernetesConfiguration.psd1 b/src/KubernetesConfiguration/Az.KubernetesConfiguration.psd1 index 53d511ce2bc6..85b5c22e451f 100644 --- a/src/KubernetesConfiguration/Az.KubernetesConfiguration.psd1 +++ b/src/KubernetesConfiguration/Az.KubernetesConfiguration.psd1 @@ -121,7 +121,7 @@ PrivateData = @{ # IconUri = '' # ReleaseNotes of this module - ReleaseNotes = ' * Added cmdlets: * ''Get-AzKubernetesConfigFluxOperationStatus'' * ''Get-AzKubernetesConfigurationFlux'' * ''New-AzKubernetesConfigurationFlux'' * ''Update-AzKubernetesConfigurationFlux'' * ''Remove-AzKubernetesConfigurationFlux''' + # ReleaseNotes = '' # Prerelease string of this module # Prerelease = ''